bChange
Dependencies: TextLCD
Revision 8:0719ca2421b4, committed 2020-07-29
- Comitter:
- nishimura_taku_pet
- Date:
- Wed Jul 29 02:32:43 2020 +0000
- Parent:
- 7:3fc517224e66
- Commit message:
- commit
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 3fc517224e66 -r 0719ca2421b4 main.cpp --- a/main.cpp Wed Jul 29 02:24:28 2020 +0000 +++ b/main.cpp Wed Jul 29 02:32:43 2020 +0000 @@ -29,8 +29,8 @@ void bChange(){ lcd.setBacklight(TextLCD::LightOn); while(true){ - double test = battery.read(); - b = (int)(((test* 3.3 - MIN_V)/0.67)*10+0.5)*10; + //double test = battery.read(); + b = (int)(((battery.read() * 3.3 - MIN_V)/0.67)*10+0.5)*10; //b = (int)(((test*3.3 - MIN_V))/(MAX_V) + 0.5)*10; pc.printf("test*3.3=%f,b = %d\r\n",test*3.3,b); if(b < 0){//すべての機能停止