API Server and DHCP Lease Management

This commit is contained in:
Thomas Göttgens
2022-10-26 11:09:59 +02:00
parent 6e1b1e3ed7
commit b7ebe03ca8
9 changed files with 241 additions and 5 deletions

View File

@@ -107,6 +107,11 @@ MQTT::MQTT() : concurrency::OSThread("mqtt"), pubSub(mqttClient)
// preflightSleepObserver.observe(&preflightSleep);
}
bool MQTT::connected()
{
return pubSub.connected();
}
void MQTT::reconnect()
{
if (wantsLink()) {
@@ -197,6 +202,7 @@ bool MQTT::wantsLink() const
#if HAS_ETHERNET
return hasChannel && (Ethernet.linkStatus() == LinkON);
#endif
return false;
}
int32_t MQTT::runOnce()