move publish uptime to Network.cpp

This commit is contained in:
technyon
2022-09-10 10:30:33 +02:00
parent 6bfc7f686d
commit 5785e6c3ae
5 changed files with 20 additions and 18 deletions

View File

@@ -69,18 +69,6 @@ void NetworkLock::initialize()
}
}
void NetworkLock::update()
{
unsigned long ts = millis();
if(_lastMaintenanceTs == 0 || (ts - _lastMaintenanceTs) > 30000)
{
_lastMaintenanceTs = ts;
publishULong(mqtt_topic_uptime, ts / 1000 / 60);
// publishUInt(mqtt_topic_freeheap, esp_get_free_heap_size());
}
}
void NetworkLock::onMqttDataReceived(char *&topic, byte *&payload, unsigned int &length)
{
char value[50] = {0};