Fix rolling log

This commit is contained in:
iranl
2025-09-15 22:17:01 +02:00
parent 55fb133d5b
commit 1a42f4264e
5 changed files with 14 additions and 0 deletions

View File

@@ -23,6 +23,8 @@ NukiNetworkOpener::NukiNetworkOpener(NukiNetwork* network, Preferences* preferen
void NukiNetworkOpener::initialize()
{
_lastRollingLog = _preferences->getInt(preference_opener_log_num, 0);
String mqttPath = _preferences->getString(preference_mqtt_lock_path, "");
mqttPath.concat("/opener");
@@ -155,6 +157,7 @@ void NukiNetworkOpener::onMqttDataReceived(const char* topic, byte* payload, con
return;
}
/*
if(comparePrefixedPath(topic, mqtt_topic_lock_log_rolling_last))
{
if(strcmp(data, "") == 0 ||
@@ -168,6 +171,7 @@ void NukiNetworkOpener::onMqttDataReceived(const char* topic, byte* payload, con
_lastRollingLog = atoi(data);
}
}
*/
if(comparePrefixedPath(topic, mqtt_topic_lock_action))
{
@@ -684,6 +688,7 @@ void NukiNetworkOpener::publishAuthorizationInfo(const std::list<NukiOpener::Log
}
_lastRollingLog = log.index;
_preferences->putInt(preference_opener_log_num, _lastRollingLog);
}
}