Torque calculation added to leg readout

Dependencies:   AS5048 LCM101 MODSERIAL PinDetect SDFileSystem mbed

Fork of heros_leg_readout by Martijn Grootens

Revision:
1:417a5b28ac84
Parent:
0:3855d4588f76
Child:
2:84d479fe9b5e
--- a/main.cpp	Fri Dec 01 11:14:38 2017 +0000
+++ b/main.cpp	Wed Dec 06 11:22:54 2017 +0000
@@ -189,6 +189,7 @@
         } else {
             fprintf(fp_data, "time_ms, theta_toe, theta_ankle, theta_knee, theta_hip, force");
             tick_logging.attach_us(&LogData,timing::kTimeLogDataUs);
+            timer.start();
             pc.printf("\t> Logging started.\r\n");
             
             is_logging = true;
@@ -210,6 +211,8 @@
         // close data file, stop logging
         fclose(fp_data);
         tick_logging.detach();
+        timer.stop();
+        timer.reset();
         pc.printf("\r> Stopped.");
     } else {
         pc.printf("\t> No data was logged.");