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.
Diff: main.cpp
- Revision:
- 8:93207ec694bd
- Parent:
- 7:81d62e1be97a
- Child:
- 9:707209a8a929
diff -r 81d62e1be97a -r 93207ec694bd main.cpp
--- a/main.cpp Sun Nov 22 13:03:30 2020 +0000
+++ b/main.cpp Sat Nov 28 09:57:45 2020 +0000
@@ -2,12 +2,12 @@
#include "IWCMD.h"
/* 設定 */
-#define kModuleID 2 // パワーモジュールのID( 1 or 2 )
+#define kModuleID 1 // パワーモジュールのID( 1 or 2 )
const double WDT_PERIOD = 4.0; // WatchDogTimerの周期[sec.] 最後の接続確認からWDT_PERIOD以上2*WDT_PERIOD未満の時間でWDT発動.
//#define USB_DEBUG // USBデバッグをオン(Xbeeはオフ)
#define SIMPLE_LOG // Xbeeで送信できる情報量に制限
const float k_vbat_offset[] = { // 電圧読み取りオフセット
- 1.4f,
+ 0.53f,
0.35f
};
const float k_Im_offset[] = { // 電流読み取りオフセット
@@ -15,12 +15,18 @@
0.0f
};
+/* 設定確認 */
+#if kModuleID == 1
+#warning PM 1 's program
+#elif kModuleID == 2
+#warning PM 2 's program
+#endif
/* ピン設定 */
#if kModuleID == 1
-DigitalOut sluster(PA_11); // default : PA_8
-DigitalOut pump(PA_8); // default : PA_11
+DigitalOut sluster(PA_8); // default : PA_8
+DigitalOut pump(PA_11); // default : PA_11
#elif kModuleID == 2
DigitalOut sluster(PA_8); // default : PA_8
DigitalOut pump(PA_11); // default : PA_11
@@ -218,7 +224,7 @@
#ifndef SIMPLE_LOG
ser.printf("p1 : %03d, p2 : %03d\n", sluster_power, pump_power);
#endif //SIMPLE_LOG
- led[1] =~ led[1];
+ led[1] = !led[1];
}
/* センシング */
@@ -308,5 +314,5 @@
break;
}
motors_limitter();
- led[2] =~ led[2];
+ led[2] = !led[2];
}
\ No newline at end of file