bChange

Dependencies:   TextLCD

Files at this revision

API Documentation at this revision

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
--- 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){//すべての機能停止