Matthias Praja / Mbed 2 deprecated All-15Final

Dependencies:   mbed

Fork of All-15 by Ladner-Praja

Revision:
10:389c1c4c1f2b
Parent:
9:b627760fd5d9
Child:
11:4084ae1f1be8
--- a/main.cpp	Tue Jul 07 21:42:17 2015 +0000
+++ b/main.cpp	Tue Jul 07 21:51:30 2015 +0000
@@ -84,18 +84,32 @@
             else
             {
                 if((myline&0x01)>0)
-                    MotorR_EN=0.0;
-                else if((myline&0x02)>0)
-                    MotorR_EN=0.25;
+                {
+                    MotorR_FORWARD = 0;  
+                    MotorR_EN=0;
+                }
                 else
-                    MotorR_EN=0.5;
+                {
+                    MotorR_FORWARD = 1;  
+                    if((myline&0x02)>0)
+                        MotorR_EN=0.25;
+                    else
+                        MotorR_EN=0.5;
+                }
                 
                 if((myline&0x08)>0)
-                    MotorL_EN=0.0;
-                else if((myline&0x04)>0)
-                    MotorL_EN=0.25;
+                {
+                    MotorL_EN=0;
+                    MotorL_FORWARD = 0;  
+                }
                 else
-                    MotorL_EN=0.5;
+                {
+                    MotorL_FORWARD = 0;  
+                    if((myline&0x04)>0)
+                        MotorL_EN=0.25;
+                    else
+                        MotorL_EN=0.5;
+                }
             }
             myrgb=3;
         }