Prathamesh Joshi / Mbed 2 deprecated EDiffMain
Revision:
4:66b2a94a607f
Parent:
3:68d91895d991
Child:
5:ee37889edcab
--- a/main.cpp	Fri Mar 08 18:58:02 2013 +0000
+++ b/main.cpp	Fri Mar 08 21:54:08 2013 +0000
@@ -270,17 +270,14 @@
         throttle_comparison_fmea();
         break;
         case 3: 
-        steering2_pulldown_fmea();
+        steering_comparison_fmea();
         break;
         case 4: 
-        steering_comparison_fmea();
-        break;
-        case 5: 
         mux_feedback_fmea();
         break;
     }
     fmea_switch++;
-    if (fmea_switch == 6)
+    if (fmea_switch == 5)
     {
         fmea_switch = 0;
     }    
@@ -308,21 +305,18 @@
 
     while(1)
     {
-        //openloop_driver is set if driver gives approval to dash message request for openloop
+        //openloop_driver is set & corresponding bit(s) from flagsFromICAP is reset if driver gives approval to dash message request for openloop
         
-        // useBoschSteeringDriverApproval is set if driver gives approval to dash message request for using Bosch Steering
+        // useBoschSteeringDriverApproval is set & useBoschSteeringRequest is reset if driver gives approval to dash message request for using Bosch Steering
         
-        if (Dash == true)
+        if ((flagsFromICAP & 0x78) && !openloop_driver) //0b 0111 1000
         {
-            if (flagsFromICAP & 0x78) //0b 0111 1000
-            {
-                //send message to DASH that asks driver permission for open loop
-            }
-            if (useBoschSteeringRequest)
-            {
-                //send message to DASH that asks driver permission for using Bosch Steering
-            }  
+            //send message to DASH that asks driver permission for open loop
         }
+        if (useBoschSteeringRequest)
+        {
+            //send message to DASH that asks driver permission for using Bosch Steering
+        }  
     }    
 }