2018年度計器mbed用プログラム

Dependencies:   BufferedSoftSerial2 INA226_ver1 mbed-rtos mbed SDFileSystem-RTOS

Fork of keiki2017 by albatross

Files at this revision

API Documentation at this revision

Comitter:
tsumagari
Date:
Sat Jul 15 00:45:45 2017 +0000
Branch:
SDandCadenceThread
Parent:
76:2514b70fd710
Commit message:
debug????????pc.printf?????????????????????debug?????????

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 2514b70fd710 -r bd7ac42aa543 main.cpp
--- a/main.cpp	Fri Jun 30 07:06:49 2017 +0000
+++ b/main.cpp	Sat Jul 15 00:45:45 2017 +0000
@@ -20,6 +20,8 @@
 #define MPU_DELT_MIN 250
 #define INIT_SERVO_PERIOD_MS 20
 
+#define debug // pc.printf
+
 //-----------------------------------(resetInterrupt def)
 //extern "C" void mbed_reset();
 //InterruptIn resetPin(p25);
@@ -321,7 +323,7 @@
         drugL = soudaDatas[26]- '0';
         inputL = atof(cErebonL);
         
-        pc.printf("erebonR:%5.5f,   drugR:%d     erebonL:%5.5f   drugL:%d",inputR,drugR,inputL,drugL);
+        debug("erebonR:%5.5f,   drugR:%d     erebonL:%5.5f   drugL:%d",inputR,drugR,inputL,drugL);
 //        pc.printf("erebonR:%s,   drugR:%d     erebonL:%s   drugL:%d",cErebonR,drugR,cErebonL,drugL);
     }//if
 //    }//while(1)
@@ -429,7 +431,7 @@
 //              soudaDatas[YOKUTAN_DATAS_NUM],soudaDatas[sizeof(int) + YOKUTAN_DATAS_NUM + 2],(int)soudaDatas[SOUDA_DATAS_NUM - sizeof(int) - 3],soudaDatas[SOUDA_DATAS_NUM-1],
 //              pitch,roll,yaw,
 //              airSpeed,sonarDist,cadenceResult);
-    pc.printf("cadence:%5.5f\n\r",cadenceResult);
+    debug("cadence:%5.5f\n\r",cadenceResult);
 
 //    for(int i = 0; i < strlen(cadence_twe.myBuff); i++){
 //        ////pc.printf("%c",*(cadence_twe.myBuff+i));
@@ -478,7 +480,7 @@
     while(1) {
         if(VCcounter%20 == 0 ) {
             if( VCmonitor.getVoltage(&V) == 0) {
-                pc.printf("e:%f\n",V);
+                debug("e:%f\n",V);
             }
         }
         VCcounter++;