Roboshark / Mbed 2 deprecated Roboshark_V7

Dependencies:   mbed

Fork of Roboshark_V62 by Roboshark

Files at this revision

API Documentation at this revision

Comitter:
Jacqueline
Date:
Mon Apr 23 11:57:53 2018 +0000
Parent:
0:6d0671ae4648
Child:
2:402b1a74fff6
Commit message:
neu

Changed in this revision

Fahren.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Fahren.h	Mon Apr 23 11:28:11 2018 +0000
+++ b/Fahren.h	Mon Apr 23 11:57:53 2018 +0000
@@ -15,7 +15,7 @@
     void geradeaus();
     void rechts90();
     void rechts180();
-    void rechts270();                                              
+    void links90();                                              
     
     
     private:
--- a/main.cpp	Mon Apr 23 11:28:11 2018 +0000
+++ b/main.cpp	Mon Apr 23 11:57:53 2018 +0000
@@ -98,7 +98,7 @@
         int IrR = iRSensor.codeR();     // min Distanz unterschritten = 1
         int IrL = iRSensor.codeL();
         int IrF = iRSensor.codeF();
-        int caseDrive = stateMachine.drive(); //entscheidung welcher Drive Case
+        /*int caseDrive = stateMachine.drive();*/ //entscheidung welcher Drive Case
         
         
         printf ("IR Right = %d \n", IrR);
@@ -126,20 +126,20 @@
 
         wait (1.0);
         
-        /*switch (caseDrive){
-            caseDrive '2': 
-                buttonNow = button->read();
-                if (buttonNow && !buttonBefore){*/
+
         
         
         if(caseDrive == 1){
             fahren.geradeaus();
         } else if (caseDrive == 2){
             fahren.rechts90();
+            fahren.geradeaus();
         } else if (caseDrive == 3){
             fahren.rechts270();
+            fahren.geradeaus();
         } else if (caseDrive == 4){
             fahren.rechts180();
+            fahren.geradeaus();
         }