Calibration program for my port of FreeIMU library. Use it with the FreeIMU Cube program or the python calibration program.
Dependencies: FreeIMU mbed-rtos mbed
Diff: main.cpp
- Revision:
- 1:622d7b18a1c0
- Parent:
- 0:1b3e1eec2577
- Child:
- 2:ba8ce2dbc778
--- a/main.cpp Mon Dec 23 08:46:06 2013 +0000 +++ b/main.cpp Mon Dec 23 09:18:24 2013 +0000 @@ -66,6 +66,9 @@ } } +//if the Processing program cannot accept serial inputs, uncomment this to send quaternion information automatically +#define AUTO_OUTPUT + int main() { pc.baud(115200); @@ -78,7 +81,10 @@ int16_t raw_values[9]; Thread::wait(10); - char cmd = 'q';//pc.getc(); + char cmd = 'q'; +#ifndef AUTO_OUTPUT + cmd = pc.getc(); +#endif if(cmd=='v') { char str[256]; @@ -88,8 +94,10 @@ } if (cmd=='q') { - uint8_t count = 32;//pc.getc(); - + uint8_t count = 32; +#ifndef AUTO_OUTPUT + count = pc.getc(); +#endif for(uint8_t i=0; i<count; i++) { osEvent evt = imu_queue.get(); if (evt.status == osEventMail) {