potato

Dependencies:   mbed

Fork of analoghalls by N K

Revision:
4:f18f6bc5e1fd
Parent:
3:86ccde39f61b
--- a/main.cpp	Wed Feb 25 04:44:05 2015 +0000
+++ b/main.cpp	Thu Feb 26 04:49:21 2015 +0000
@@ -26,6 +26,7 @@
 #ifdef __DEBUG
 float *fbuffer;
 int bufidx = 0;
+int skipidx = 0;
 #endif
 #ifdef __USE_THROTTLE
     Ticker dtc_upd_ticker;
@@ -34,10 +35,13 @@
 
 float throttle_read;
 
-int main() {    
+int main() {
+#ifdef __DEBUG
+    pc.printf("%s\n", "Debug mode ON");
+#endif
     en = 1;
 #ifdef __DEBUG
-    fbuffer = (float*)malloc(10000*sizeof(float));
+    fbuffer = (float*)malloc(DBG_BUF_SZ*sizeof(float));
 #endif
     initTimers();
     initPins();
@@ -56,7 +60,7 @@
 #endif
     }
 #ifdef __DEBUG
-    for (int i = 0; i < 10000; i++) {
+    for (int i = 0; i < DBG_BUF_SZ; i++) {
         pc.printf("%f,", fbuffer[i]);
     }
 #endif