Skip to content
Snippets Groups Projects
Commit 75c14daf authored by Cyril Danilevski's avatar Cyril Danilevski Committed by Cyril Danilevski
Browse files

Validate MCP port expander logic

Add poll once on start to have accurate information on webpage
parent bd36aa98
No related branches found
No related tags found
No related merge requests found
Pipeline #162433 passed
...@@ -39,7 +39,7 @@ void isr_check_loop() ...@@ -39,7 +39,7 @@ void isr_check_loop()
Serial.print(regval, BIN); Serial.print(regval, BIN);
uint8_t mask = 1 << 0; uint8_t mask = 1 << 0;
if ((regval & mask)) { if (!(regval & mask)) {
Serial.print(" UPS"); Serial.print(" UPS");
PINS.ups = true; PINS.ups = true;
} }
...@@ -71,7 +71,7 @@ void poll_port_expander() ...@@ -71,7 +71,7 @@ void poll_port_expander()
int regval = MCP.read8(); int regval = MCP.read8();
uint8_t mask = 1 << 0; uint8_t mask = 1 << 0;
if ((regval & mask)) { if (!(regval & mask)) {
Serial.print(" UPS"); Serial.print(" UPS");
PINS.ups = true; PINS.ups = true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment