Fix rolling log
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user