remove restart timer

This commit is contained in:
technyon
2023-04-09 10:15:12 +02:00
parent c34eeb11e1
commit 37aa03d925
4 changed files with 4 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
#pragma once
#define NUKI_HUB_VERSION "8.22"
#define NUKI_HUB_VERSION "8.23-pre-1"
#define MQTT_QOS_LEVEL 1
#define MQTT_CLEAN_SESSIONS false

View File

@@ -65,7 +65,7 @@ private:
preference_ip_dhcp_enabled, preference_ip_address, preference_ip_subnet, preference_ip_gateway, preference_ip_dns_server,
preference_network_hardware, preference_rssi_publish_interval,
preference_hostname, preference_network_timeout, preference_restart_on_disconnect,
preference_restart_timer, preference_restart_ble_beacon_lost, preference_query_interval_lockstate,
preference_restart_ble_beacon_lost, preference_query_interval_lockstate,
preference_query_interval_configuration, preference_query_interval_battery, preference_query_interval_keypad,
preference_keypad_control_enabled, preference_register_as_app, preference_command_nr_of_retries,
preference_command_retry_delay, preference_cred_user, preference_cred_password, preference_publish_authdata,

View File

@@ -361,11 +361,6 @@ bool WebCfgServer::processArgs(String& message)
_preferences->putBool(preference_restart_on_disconnect, (value == "1"));
configChanged = true;
}
else if(key == "RSTTMR")
{
_preferences->putInt(preference_restart_timer, value.toInt());
configChanged = true;
}
else if(key == "MQTTLOG")
{
_preferences->putBool(preference_mqtt_log_enabled, (value == "1"));
@@ -761,7 +756,6 @@ void WebCfgServer::buildMqttConfigHtml(String &response)
printInputField(response, "RSSI", "RSSI Publish interval (seconds; -1 to disable)", _preferences->getInt(preference_rssi_publish_interval), 6);
printInputField(response, "NETTIMEOUT", "Network Timeout until restart (seconds; -1 to disable)", _preferences->getInt(preference_network_timeout), 5);
printCheckBox(response, "RSTDISC", "Restart on disconnect", _preferences->getBool(preference_restart_on_disconnect));
printInputField(response, "RSTTMR", "Restart timer (minutes; -1 to disable)", _preferences->getInt(preference_restart_timer), 10);
printCheckBox(response, "MQTTLOG", "Enable MQTT logging", _preferences->getBool(preference_mqtt_log_enabled));
response.concat("</table>");
response.concat("* If no encryption is configured for the MQTT broker, leave empty. Only supported for WiFi connections.<br><br>");

View File

@@ -153,11 +153,6 @@ bool initPreferences()
preferences->putBool(preference_lock_enabled, true);
}
if(preferences->getInt(preference_restart_timer) == 0)
{
preferences->putInt(preference_restart_timer, -1);
}
return firstStart;
}
@@ -174,9 +169,9 @@ void setup()
CharBuffer::initialize();
if(preferences->getInt(preference_restart_timer) > 0)
if(preferences->getInt(preference_restart_timer) != 0)
{
restartTs = preferences->getInt(preference_restart_timer) * 60 * 1000;
preferences->remove(preference_restart_timer);
}
lockEnabled = preferences->getBool(preference_lock_enabled);