unnecessary pub functions removing
and use OMG method instead of low level ones
This commit is contained in:
1 parent
1eebf138c2
commit
25375bb37c
2 files changed
+2
-4
No files matched your search
@@ -67,7 +67,7 @@ void MeasureGPIOKeyCode()
|
||||
sprintf(hex, "%02x", InputStateGPIOKeyCode);
|
||||
hex[2] = 0;
|
||||
Serial.printf("GPIOKeyCode %s\n", hex);
|
||||
client.publish(subjectGPIOKeyCodetoMQTT, hex);
|
||||
pub(subjectGPIOKeyCodetoMQTT, hex);
|
||||
lastLatchStateGPIOKeyCode = latch;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void MeasureGPIOKeyCode()
|
||||
lastLatchStateGPIOKeyCode = latch;
|
||||
Serial.printf("GPIOKeyCode latch %d\n", latch);
|
||||
if (latch == 0)
|
||||
client.publish(subjectGPIOKeyCodeStatetoMQTT, "done");
|
||||
pub(subjectGPIOKeyCodeStatetoMQTT, "done");
|
||||
}
|
||||
|
||||
// save the reading. Next time through the loop, it'll be the lastInputState:
|
||||
|
||||
Reference in new issue
Block a user