Bayley Wang
/
analoghalls
potato
Fork of analoghalls by
Diff: main.cpp
- Revision:
- 3:86ccde39f61b
- Parent:
- 2:b5c19d4eddcc
- Child:
- 4:f18f6bc5e1fd
diff -r b5c19d4eddcc -r 86ccde39f61b main.cpp --- a/main.cpp Mon Feb 23 19:42:50 2015 +0000 +++ b/main.cpp Wed Feb 25 04:44:05 2015 +0000 @@ -23,6 +23,10 @@ Motor* motor; +#ifdef __DEBUG +float *fbuffer; +int bufidx = 0; +#endif #ifdef __USE_THROTTLE Ticker dtc_upd_ticker; Ticker throttle_upd_ticker; @@ -32,7 +36,9 @@ int main() { en = 1; - +#ifdef __DEBUG + fbuffer = (float*)malloc(10000*sizeof(float)); +#endif initTimers(); initPins(); initData(); @@ -45,5 +51,13 @@ #ifndef __USE_THROTTLE dtc_update(); #endif +#ifdef __DEBUG + if (motor->debug_stop) break; +#endif } +#ifdef __DEBUG + for (int i = 0; i < 10000; i++) { + pc.printf("%f,", fbuffer[i]); + } +#endif }