HeRoS: read out and log joint angles and force sensor data from the leg test bench.
Dependencies: AS5048 LCM101 MODSERIAL PinDetect SDFileSystem mbed
Diff: main.cpp
- Revision:
- 1:417a5b28ac84
- Parent:
- 0:3855d4588f76
diff -r 3855d4588f76 -r 417a5b28ac84 main.cpp --- 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.");