The Code Repository for the REV0 Steering Wheel.

Dependencies:   CANBuffer KS0108_fork mbed-rtos mbed CAN Addresses

Fork of REVO_Updated_Steering by Penn Electric

Revision:
27:3a6d5243e5e7
Parent:
14:3e21d6c764a5
--- a/Steering.cpp	Sat Oct 18 17:17:02 2014 +0000
+++ b/Steering.cpp	Sat Oct 18 17:21:36 2014 +0000
@@ -209,39 +209,32 @@
 
 void request_status_change()
 {
-    
-    char drive_status_request = !drive_status;
-    char * status_string;
+    //drive_status != drive_status;   
+    //wait(0.1);
     
-    if(drive_status_request){
-        status_string = "ON";
-    }
-    else{
-        status_string = "OFF";
-    }
-    
-    for(int i = 0; i < 10; i++){
-        CAN_Steering.write(Txmsg_drive_status_request);
-    }
+    //char status_string = (drive_status == 1 ? "ON" : "OFF");
 
     display.ClearScreen();
     display.SelectFont(Arial12,BLACK,ReadData);
     display.GotoXY(26,16);
-    display.PrintString("REQUEST SENT TO CHANGE DRIVE STATUS TO: ");
-    display.PrintString(status_string);
-    display.PrintString(".\n");
+    display.PrintString("REQUEST SENT TO CHANGE DRIVE STATUS TO ");
+    printf("DRIVE STATUS CHANGE Initiated\n\r");
     
-    printf("DRIVE STATUS CHANGE Initiated\n\r");
+    
+    
     return;
 }
 
 void reset()
 {
-    display.ClearScreen();
-    display.SelectFont(Arial12,BLACK,ReadData);
-    display.GotoXY(16,16);
-    display.PrintString(" RESET INITIATED");
-    printf("Reset Initiated\n\r");
+    txWriteDirect(Txmsg_reset);
+    mbed_reset();
+    
+//    display.ClearScreen();
+//    display.SelectFont(Arial12,BLACK,ReadData);
+//    display.GotoXY(16,16);
+//    display.PrintString(" RESET INITIATED");
+//    printf("Reset Initiated\n\r");
     
     return;
 }    
@@ -270,7 +263,6 @@
     pc.baud(230400);
     CAN_Steering.frequency(500000);
     drive_status = 0;
-    drive_status_request = 1;
     reset_body = 0;
     ledstream.write(0);
     call_ledstream.attach(&Powerstream,0.1);