Corrected header file include guards.

Dependencies:   FiniteStateMachine HipControl Knee LinearBlend1 LocalFileSystem_Read dataComm hapticFeedback initExoVars mbed Blend_Generator Brad_poly_gait Gait_Generator MM_gait Encoders IMUdriver

Fork of Motion Control by HEL's Angels

Revision:
17:b77c31807825
Parent:
16:e69f063a2068
Child:
18:03d7c5fdc0c7
--- a/main.cpp	Sat Mar 14 00:08:52 2015 +0000
+++ b/main.cpp	Tue Mar 17 21:16:43 2015 +0000
@@ -18,12 +18,13 @@
 
 dataComm *dc = new dataComm();
 short int dataIn[32];
-short int dataOut[]={0xFF,30,31,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFE};
+short int dataOut[]= {0xFF,30,31,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFE};
+bool flag=0;
 
-union short_or_char {
+/*union short_or_char {
     char c[2];
     short s;
-} short_or_char;
+} short_or_char;*/
 
 //short_or_char soc;
 
@@ -34,20 +35,25 @@
 // It initiates communication with dataBed, checks for errors/safety, and starts the FSM
 void periodicFcns()
 {
-
+    //pc.printf("Blah\r\n");
     dataOut[1]=encoder_L.readRaw();
     dataOut[2]=fsm.error();
     int* ptr=(int*)dataIn;
     ptr=sendData((int*)dataOut, 21, (int*)dataIn);
-    dc->process_write((char*)dataIn,42);
+    flag=1;
+    /*for (int i=0;i<21;i++) {
+        pc.printf("%x, ", dataIn[i]);
+    }*/
+    //pc.printf("\r\n");
+    //dc->process_write((char*)dataIn,42);
 
-   //dc->process_write(dataIn, 21);   
+    //dc->process_write(dataIn, 21);
 
     //pc.printf("%d, %d, %d, %d,", dataIn[0], dataIn[1], dataIn[2], dataIn[3]);
-    
+
     // Run state change/analysis in FSM
-    //int exoState=fsm.state(dataIn[1]);
-    
+    int exoState=fsm.state(dataIn[1]);
+
 }
 
 int main()
@@ -65,5 +71,13 @@
     dataBedSPI.format(16,0);
     doControl.attach(&periodicFcns, SAMPLE_TIME);
 
-    while (1);
+    while (1) {
+        //pc.printf("!");
+        if(flag==1) {
+            flag=0;
+            for (int i=0; i<21; i++) {
+                pc.printf("%x, ", dataIn[i]);
+            }
+        }
+    };
 }