Fix KNX Reconnection Bug

This commit is contained in:
Adrian Scillato 2018-05-10 05:13:31 -03:00 committed by GitHub
parent 0c0fd486a0
commit e172f66ec4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,6 +35,10 @@ byte oswatch_blocked_loop = 0;
//void OsWatchTicker() ICACHE_RAM_ATTR;
#endif // USE_WS2812_DMA
#ifdef USE_KNX
bool KNX_Started = false;
#endif // USE_KNX
void OsWatchTicker()
{
unsigned long t = millis();
@ -822,13 +826,19 @@ void WifiCheck(uint8_t param)
#endif // USE_EMULATION
#endif // USE_WEBSERVER
#ifdef USE_KNX
KNXStart();
#endif // USE_KNX
if (!KNX_Started && Settings.flag.knx_enabled) {
KNXStart();
KNX_Started = true;
}
#endif // USE_KNX
} else {
#if defined(USE_WEBSERVER) && defined(USE_EMULATION)
UdpDisconnect();
#endif // USE_EMULATION
mdns_begun = false;
#ifdef USE_KNX
KNX_Started = false;
#endif // USE_KNX
}
}
}