Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Adafruit_RTCLib BNO055 SDFileSystem_SlowLogger analoghalls mbed
Fork of analoghalls by
Diff: main.cpp
- Revision:
- 3:86ccde39f61b
- Parent:
- 2:b5c19d4eddcc
- Child:
- 4:f18f6bc5e1fd
--- 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
}
