2018年度計器mbed用プログラム
Dependencies: BufferedSoftSerial2 INA226_ver1 mbed-rtos mbed SDFileSystem-RTOS
Fork of keiki2017 by
Revision 76:2514b70fd710, committed 2017-06-30
- Comitter:
- YusukeWakuta
- Date:
- Fri Jun 30 07:06:49 2017 +0000
- Branch:
- SDandCadenceThread
- Parent:
- 73:2122c87cac9b
- Child:
- 77:ba2dac12ce56
- Child:
- 78:bd7ac42aa543
- Commit message:
- 7?1?TF?
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Jun 16 14:33:37 2017 +0000 +++ b/main.cpp Fri Jun 30 07:06:49 2017 +0000 @@ -21,17 +21,17 @@ #define INIT_SERVO_PERIOD_MS 20 //-----------------------------------(resetInterrupt def) -extern "C" void mbed_reset(); -InterruptIn resetPin(p25); -Timer resetTimeCount; -void resetInterrupt() -{ - while(resetPin) { - resetTimeCount.start(); - if(resetTimeCount.read()>3) mbed_reset(); - } - resetTimeCount.reset(); -} +//extern "C" void mbed_reset(); +//InterruptIn resetPin(p25); +//Timer resetTimeCount; +//void resetInterrupt() +//{ +// while(resetPin) { +// resetTimeCount.start(); +// if(resetTimeCount.read()>3) mbed_reset(); +// } +// resetTimeCount.reset(); +//} //------------------------------------------------------- //SDFileSystem sd(p5, p6, p7, p8, "sd"); @@ -192,8 +192,8 @@ { pc.printf("(BUILD:[" __DATE__ "/" __TIME__ "])\n\r"); //--------------------------------------(resetInterrupt init) - resetPin.rise(resetInterrupt); - resetPin.mode(PullDown); + // resetPin.rise(resetInterrupt); + // resetPin.mode(PullDown); //----------------------------------------------------------- twe.baud(14400);//BufferedSoftSerialでは19200が上限。twelite側でもBPS無効化が必要 android.baud(9600); @@ -211,7 +211,7 @@ val = 0; if(VCmonitor.rawRead(0x00,&val) != 0) { printf("VCmonitor READ ERROR\n"); - while(1) {} + // while(1) {} } VCmonitor.setCurrentCalibration(); }