2
Dependencies: RemoteIR TextLCD
Diff: main.cpp
- Revision:
- 65:7657ef347d6d
- Parent:
- 64:c74082c792ed
- Child:
- 66:2e2091dc7932
--- a/main.cpp Tue Sep 08 03:26:32 2020 +0000 +++ b/main.cpp Tue Sep 08 03:31:27 2020 +0000 @@ -4,7 +4,7 @@ */ /* - Version 0.07 + Version 0.08 Date 2020/09/08 Uploader Taku Nishimura @@ -157,8 +157,8 @@ /* bChange, lcdbacklight用変数 */ TextLCD_I2C lcd(&i2c_lcd, (0x27 << 1), TextLCD::LCD16x2, TextLCD::HD44780); int b10[10]; // バッテリー残量 -int b; -int aaaaa = 0; +int b = 0; +int k = 0; int flag_b = 0; // バックライト点滅フラグ int flag_t = 0; // バックライトタイマーフラグ @@ -858,9 +858,9 @@ /* バッテリー残量更新関数 */ void bChange(){ //pc.printf(" bChange1\r\n"); - b10[aaaaa++] = (int)(((battery.read() * 3.3 - MIN_V)/0.7)*10+0.5)*10; - if(aaaaa == 10){ - aaaaa = 0; + b10[k++] = (int)(((battery.read() * 3.3 - MIN_V)/0.7)*10+0.5)*10; + if(k == 10){ + k = 0; } b = 0; for(int i=0;i<10;i++){