@@ -98,19 +98,19 @@ uint8_t System::readTouchpad(uint8_t _pad)
98
98
*/
99
99
double System::readBattery ()
100
100
{
101
- pinModeInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , INPUT);
102
- int state = digitalReadInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 );
103
- pinModeInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , OUTPUT);
104
-
105
- if (state)
106
- {
107
- digitalWriteInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , LOW);
108
- }
109
- else
110
- {
111
- digitalWriteInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , HIGH);
112
- }
113
- /*
101
+ pinModeInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , INPUT);
102
+ int state = digitalReadInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 );
103
+ pinModeInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , OUTPUT);
104
+
105
+ if (state)
106
+ {
107
+ digitalWriteInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , LOW);
108
+ }
109
+ else
110
+ {
111
+ digitalWriteInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , HIGH);
112
+ }
113
+ /*
114
114
#ifdef ARDUINO_ESP32_DEV
115
115
digitalWriteInternal(MCP23017_INT_ADDR, mcpRegsInt, 9, LOW);
116
116
#else
@@ -119,19 +119,18 @@ double System::readBattery()
119
119
*/
120
120
delay (1 );
121
121
int adc = analogRead (35 );
122
- if (state)
123
- {
124
- pinModeInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , INPUT);
125
- }
126
- else
127
- {
128
- digitalWriteInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , LOW);
129
- }
130
-
131
-
132
-
133
- /*
134
-
122
+ if (state)
123
+ {
124
+ pinModeInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , INPUT);
125
+ }
126
+ else
127
+ {
128
+ digitalWriteInternal (MCP23017_INT_ADDR, mcpRegsInt, 9 , LOW);
129
+ }
130
+
131
+
132
+ /*
133
+
135
134
#ifdef ARDUINO_ESP32_DEV
136
135
digitalWriteInternal(MCP23017_INT_ADDR, mcpRegsInt, 9, HIGH);
137
136
#else
0 commit comments