Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EPOS2 mbed-rtos mbed
Fork of MarsRover_ExoMars by
Diff: main.cpp
- Revision:
- 4:8fb30d6c2855
- Parent:
- 3:fbc9de097e4f
- Child:
- 5:524e83ec5174
--- a/main.cpp Thu Sep 22 07:39:21 2016 +0000
+++ b/main.cpp Thu Sep 22 07:58:15 2016 +0000
@@ -23,13 +23,14 @@
int counter=0;
int counter2=0;
bool start = true;
-int current_step = 1;
+
int counter_s = false;
int counter_s2 = false;
*/
int ausfahren = false;
int einfahren = false;
-
+int current_step = 1;
+
int main(){ ///////// Main
pc.baud(9600);
@@ -88,21 +89,21 @@
MyEpos1.Homing(); //Solarpanel_Aussen_Links
MyEpos3.Homing(); //Solarpanel_Aussen_Rechts
MyEpos7.Homing(); //Bohrer
- while (MyEpos2.GetDigIn(4)!1) or (MyEpos4.GetDigIn(4)!1){ //warten solange Solarpanels Aussen NICHT in Grundposition
+ while (MyEpos2.GetDigIn(4)!=1 or MyEpos4.GetDigIn(4)!=1){ //warten solange Solarpanels Aussen NICHT in Grundposition
wait(0.1);
}
MyEpos2.Homing(); //Solarpanel_Innen_Links
MyEpos4.Homing(); //Solarpanel_Innen_Rechts
- while (MyEpos7.GetDigIn(4)!1){ //warten solange Bohrer NICHT eingefahren
+ while (MyEpos7.GetDigIn(4)!=1){ //warten solange Bohrer NICHT eingefahren
wait(0.1);
}
MyEpos6.Homing();//Bohrgestell
- while (MyEpos1.GetDigIn(4)!1) or (MyEpos3.GetDigIn(4)!1) { //warten solange Solarpanels Innen NICHT in Grundposition
+ while (MyEpos1.GetDigIn(4)!=1 or MyEpos3.GetDigIn(4)!=1) { //warten solange Solarpanels Innen NICHT in Grundposition
wait(0.1);
}
MyEpos5.Homing();//Kopf
- while (MyEpos5.GetDigIn(4)!1) { //warten solange Kopf NICHT in Grundposition
+ while (MyEpos5.GetDigIn(4)!=1) { //warten solange Kopf NICHT in Grundposition
wait(0.1);
}
current_step = 2;//BEREIT;
@@ -110,7 +111,7 @@
case 2://BEREIT:
- while (MyEpos6.GetDigIn(1)!1) { //Kontrolle ob: Kopf in Grundposition
+ while (MyEpos6.GetDigIn(1)!=1) { //Kontrolle ob: Kopf in Grundposition
wait_ms(10);
}
current_step = 3;//START_AUSFAHREN
@@ -170,7 +171,7 @@
case 5://USV:
- while (MyEpos.GetDigIn()){
+ while (MyEpos1.GetDigIn()){
MyEpos1.MoveAbsolute(0,200,500,500); //Panel_Aussen_Links
MyEpos3.MoveAbsolute(0,200,500,500); //Panel_Aussen_Rechts
MyEpos7.MoveAbsolute(0,200,500,500); // Bohrer
@@ -179,6 +180,7 @@
MyEpos4.MoveAbsolute(0,200,500,500); //Panel_Innen_Rechts
if (MyEpos2.TargetReached()==1 && MyEpos4.TargetReached()==1){
MyEpos5.MoveAbsolute(0,200,500,500); //Kopf
+ }
}
if (MyEpos7.TargetReached()==1){
MyEpos6.MoveAbsolute(0,200,500,500); //Bohrgestell
