ボタンを押すと、 バッテリ更新を停止し、 他のボタンもロックさせる

Dependencies:   RemoteIR TextLCD

Revision:
34:040474bf6fe0
Parent:
33:a6f1090e0174
Child:
35:4cda290bdb87
--- a/main.cpp	Thu Aug 06 07:09:11 2020 +0000
+++ b/main.cpp	Mon Aug 17 02:53:18 2020 +0000
@@ -102,7 +102,6 @@
 int bufflen, DataRX, ount, getcount, replycount, servreq, timeout;
 int bufl, ipdLen, linkID, weberror, webcounter,click_flag;
 float R1=100000, R2=10000; // resistor values to give a 10:1 reduction of measured AnalogIn voltage
-char Vcc[10];
 char webcount[8];
 char type[16];
 char channel[2];
@@ -315,7 +314,6 @@
             int sensor5 = ss5;
             pc.printf("%d  %d  %d  %d  %d  \r\n",sensor1,sensor2,sensor3,sensor4,sensor5); 
             int sensD = 0;
-            int sensorNum;
             
             /* センサー値の決定 */
             if(sensor1 > 0) sensD |= 0x10;
@@ -324,10 +322,8 @@
             if(sensor4 > 0) sensD |= 0x02;
             if(sensor5 > 0) sensD |= 0x01;
             
-            sensorNum = sensArray[sensD];
-            
             /* センサー値によって場合分け */
-            switch(sensorNum){
+            switch(sensArray[sensD]){
                 case 1:
                     run = ADVANCE;      // 低速で前進
                     break;