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:
23:e0923403be2f
Parent:
22:357327fe25af
Child:
24:2e56d3bebb24
--- a/main.cpp	Fri Apr 24 19:35:18 2015 +0000
+++ b/main.cpp	Mon Apr 27 21:57:54 2015 +0000
@@ -24,14 +24,24 @@
 
 // periodicFcns runs at the start of every control loop cycle
 // It initiates communication with dataBed, checks for errors/safety, and starts the FSM
+
+union float_to_short {
+    float f;
+    uint32_t u;
+} q;
 void periodicFcns()
 {
     dbg.reset();
 //    dataOut[1]=encoder_L.readRaw();
     float f1 = encoder_L.read_angle();
     float f2 = fsm.read_angle_y();
-    dataOut[1] = (short)f1;
-    dataOut[2] = (short)f2;
+    //float f2 = -87.43423;
+    short s1 = (short)(f1*91);
+    short s2 = (short)(f2*91);
+    dataOut[1] = s1;
+    dataOut[2] = s2;
+    pc.printf("first is %f %d\r\n", f1, s1);
+    pc.printf("second is %f %d\r\n", f2, s2);
     //dataOut[3] = (short)f1;
     //dataOut[4] = (short)f2;
     //dataOut[5] = (short)f2;