Mini en Maxi zijn virtuele robots, bedoeld om software en logica te testen.
- Doelstelling/eisen
|
- Verschil Mini vs Maxi
Mini is een robot waarvan alle onderdelen ook daadwerkelijk gebouwd en tezamen getest zijn. Dit in tegenstelling tot Maxi. Maxi bevat alle denkbare onderdelen, zelfs als die nog nooit gebouwd zijn. Maxi is nog meer dan Mini meer een gedachtespel.
- Doelstelling
Verder hoe werkt het als ik gewoon met een Joystick wil sturen. Bepalend is een universeel besturingssysteem met mogelijkheden om zowel mr Blue alsook de bolderbot te kunnen besturen. Begin met de actuator machine. Zonder actuatoren tenslotte geen robot. Meer specifiek is de vraag mr Blue en bolderbot via 1 engine aangestuurd kunnen worden. De drivers zouden dan verschillend mogen zijn.
|
//SHOW ALL PARTS USED IN THIS ROBOT *****************************************
// Location:/robotigs/includes/ list_parts_per_bot.php
// This is an include, so no parsing needed
// DISPLAY $PART_LIST
if ($part_list){
$lijst = explode(" , ", $part_list);
$aantal = str_word_count($part_list, 0, " ") - 2; //Needed for positioning
$bedrag = 0;
$cntrlp = 0;
echo (" ");
echo ("");
echo ("Onderdelen van deze robot:");
echo (" | ");
echo (" ");
//*** SHOW PARTS IN STORED SEQUENCE ($parts_list) ---------------------------
while(isset($lijst[$cntrlp])){
$partkey = $lijst[$cntrlp];
$qrylp=("SELECT tblsystext.txtname
, onderdelen.prt_icon_link
, onderdelen.prijseurinclbtw
, onderdelen.idsrtodd
, onderdelen.lanid
FROM onderdelen INNER JOIN tblsystext ON onderdelen.partid = tblsystext.recordid
WHERE tblsystext.lanid = onderdelen.lanid
AND tblsystext.txlid = 19
AND onderdelen.partid = $partkey
;");
$resultlp = pg_query($con1, $qrylp);
$rowlp = pg_fetch_array($resultlp);
if ($rowlp[4] == 1) {$imgname = "nederland.gif";}
if ($rowlp[4] == 2) {$imgname = "deutschland.gif";}
if ($rowlp[4] == 3) {$imgname = "uk.gif";}
if ($rowlp[4] == 4) {$imgname = "france.gif";}
//*** SHOW RECORD
echo ("");
echo ("");
echo (" | ");
echo ("");
echo ("$rowlp[0] | ");
echo (""); //Show group
$prtsrttxt = get_prtsrt_name2($con1, $koekje[2], $rowlp[3]);
echo ("");
echo ("$prtsrttxt | "); //End of show group
if ($koekje[3]=="1") { //If this user wants to translate then
//echo (" ");
//echo ("");
//echo (" | ");
echo ("");
echo ("");
echo (" ");
if ($cntrlp==0){
echo (" ");
}else{
echo ("");
echo (" ");
}
if ($cntrlp == $aantal){
echo (" ");
}else{
echo ("");
echo ("");
}
echo (" | ");
}
echo (" ");
$bedrag = $bedrag + $rowlp[2]; //Calculate total robot price
$cntrlp++;
} //End of while displaying this mother part AND childparts
echo (" ");
if ($koekje[0]>0 and $koekje[3]>0){ //User is logged in and translates
$bedrag_formatted = number_format($bedrag / 100, 0, ',', '.');
echo ("Project costs: € $bedrag_formatted");
}
} //End of if ($part_list) -----------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
function get_prtsrt_name2($conid, $lan, $recid){
$qry = ("SELECT * FROM tblsystext
WHERE txlid = 26
AND lanid = $lan
AND recordid = $recid
;");
$result = pg_query($conid, $qry);
$row = pg_fetch_array($result);
return ("$row[1]");
}
?>
// LIST ALL SOFTWARE THAT WILL RUN OM THIS PLATFORM **************************
// INCLUDED IN ALL ROBOTS TO CHECK THEIR DIRECTORY
$qry=("SELECT software_basedir
FROM farmbotversie
WHERE id = $idbot;");
$result = pg_query($con1, $qry);
$col = pg_fetch_array ($result ,0);
$dir1 = "/var/www/html/robotigs/software/$col[0]";
$arr1 = glob($dir1, GLOB_ONLYDIR);
if (isset($arr1[0])){
echo (" ");
$folder = $arr1[0];
$countertmp = 0;
foreach (scandir($folder, 1) as $filename) {
if ($filename<>"." AND $filename <>".."){
if ($countertmp == 0){
$countertmp++;
echo ("Software voor deze robot");
echo (" | ");
} //End of if ($countertmp == 0)
$tmp = "/";
$dir = substr($folder, 14) ."/";
$link = $tmp .$dir .$filename;
$showname = substr($filename, 0 ,-4);
echo "$showname | ";
} //End of if ($filename<>"." AND $filename <>".."){
} //End of foreach (scandir($folder, 1) as $filename)
echo (" ");
} //End of if (isset($arr1[0]))
?>
//ONLY FOR SYS MANAGER ******************************************************
//*** ADD A PART TO THIS ROBOT -------------------------------------------------
//This is an include, so no parsing needed
if ($koekje[0]>0 and $koekje[3]>0){ //User is logged in and translates
echo ("");
echo ("Add a part to this robot ");
echo (" | ");
$qryap=("SELECT tblsystext.txtname
, tblsystext.recordid
FROM onderdelen
INNER JOIN tblsystext ON onderdelen.partid = tblsystext.recordid
WHERE txlid = 19
AND tblsystext.lanid = onderdelen.lanid
AND selectable = 0
AND '$part_list' NOT LIKE '% ' || tblsystext.recordid || ' %'
ORDER BY tblsystext.txtname
;");
$resultap = pg_query($con1, $qryap);
echo ("");
echo ("  ");
echo ("==> Add");
echo (' | ');
} //End of if ($koekje[0]>0) End of only for logged in users
//SPECIFIC INFO FOR SYS MANAGER *********************************************
//This is an include, so no parsing needed
if ($koekje[0]>0 and $koekje[3]>0){ //User is logged in and translates
$qrydb=("SELECT farmbotversie.*
FROM farmbotversie
WHERE id = $idbot
;");
$resultdb = pg_query($con1, $qrydb);
while($row = pg_fetch_array($resultdb)){ //Fields accesible by their name
foreach( $row AS $key => $val ){
$$key = stripslashes( $val );
}
}
$jaar = substr($changeddate,0,4);
$maand = substr($changeddate,5,2);
$dag = substr($changeddate,8,2);
$last_stamp = ("$dag $maand $jaar");
$jaar = substr($createddate,0,4);
$maand = substr($createddate,5,2);
$dag = substr($createddate,8,2);
$create_stamp = ("$dag $maand $jaar");
echo ("");
echo ("");
echo ("");
echo ("General information ");
echo ("(");
echo ("edit)");
echo (" | ");
//*** LAST CHANGE MADE TO THIS ROBOT ----------------------------------------
echo ("Laatste wijziging   | ");
echo("$last_stamp | ");
//*** RECORD CREATED DATE ---------------------------------------------------
echo ("Aangemaakt   | ");
echo("$create_stamp | ");
// *** PART OWNER -----------------------------------------------------------
echo ("Eigenaar   | ");
//Needs botmaster from the file, tblsysuser.usrid
$name = get_person_name($con1, $bot_master, $koekje[2]);
echo("$name | ");
// *** VERSIENAAM -----------------------------------------------------------
echo ("Versienaam:   | ");
echo("$versienaam | ");
// *** FLESSENHALS -----------------------------------------------------------
echo ("Flessenhals:   | ");
echo("$flessenhals | ");
// *** RECORD STATUS --------------------------------------------------------
echo ("Record status   | ");
$statTxt = getStatTxt($con1, $status, $koekje[2]);
echo("$statTxt");
echo (" | ");
if ($koekje[0]>0 and $koekje[3]>0){ //User is logged in and translates
$tmp = get_txt($con1, 9, $koekje[2], 3918); //Fieldname at screen LANGUAGE
if ($lanid == 1) {$imgname = "nederland.png";}
if ($lanid == 2) {$imgname = "deutschland.png";}
if ($lanid == 3) {$imgname = "uk.png";}
if ($lanid == 4) {$imgname = "france.png";}
echo ("$tmp | ");
echo ("");
echo (" | ");
}
echo (" ");
} //End of if ($koekje[0]>0)
| //Location:/robotigs/includes/ picts_show.php
// Requieres: $pict_list and several picture handling javascript routines
//*** FROM HERE ON THE PICTURE CORNER STARTS -----------------------------------
if ($pict_list){ //There are 1 or more pictures to be printed
echo ("");
$counter = 0;
$aantal = str_word_count($pict_list, 0, "0123456789");
$lijst = str_word_count($pict_list, 1, "0123456789");
while($counter < $aantal){
$pictkey = $lijst[$counter];
$qryy1 = ("SELECT *
FROM illustrations
WHERE ill_id = $pictkey
;");
$resulty1 = pg_query($con1, $qryy1);
while($row = pg_fetch_array($resulty1)){ //Fields accesible by their name
foreach( $row AS $key => $val ){
$$key = stripslashes( $val );
}
}
$image = ("/robotigs/documentatie/plaatjes/$ill_name");
$pictfull = str_replace('_small', '', $image); //Pictfull=biggest version
$alt = ("Just wait till your 57....");
$txtname = get_txt($con1, 18, $koekje[2], $ill_id); //Robot illustrations subtitles
echo ("");
echo (' ');
$nummer = $counter + 1;
$txtAfb = get_txt($con1, 9, $koekje[2], 3865); //Pic Afb
if ($koekje[0]>0 and $koekje[3]>0){ //User is logged in and translates
echo ("$txtAfb $nummer: ");
echo ("$txtname");
echo (" ");
echo ("Ontkoppelen ");
if ($counter==0){
echo ("Up ");
}else{
echo ("Up ");
}
if ($nummer == $aantal){
echo ("Down");
}else{
echo ("Down");
}
}else{ //Else of if Meaning the current useer is logged in
echo ("$txtAfb $nummer: $txtname");
}
echo (''); //End of this picture
$counter++; //Prepair for next picture
}
echo (' | '); //All pictures are printed
} //End of if there are 1 or more pictures to be printed ----------------------
?>