move initial send_settings out of main loop

This commit is contained in:
2022-05-24 19:35:45 +02:00
parent b37d685690
commit 39f9c1691a

11
main.c
View File

@@ -198,16 +198,13 @@ int main()
set_Output(BitPH5, ON); set_Output(BitPH5, ON);
while(1)
{
wdt_reset(); // WDT reset at least every sec
#if PLC_MQTT_ENABLED #if PLC_MQTT_ENABLED
if(millis() < 10) send_settings();
send_settings();
#endif #endif
while(1){
wdt_reset(); // WDT reset at least every sec
ioHelperReadPins(); ioHelperReadPins();
ioHelperDebounce(); ioHelperDebounce();
ioHelperEdgeDetector(); ioHelperEdgeDetector();