From 1083705d1be594e8dd952185833c930612f551ee Mon Sep 17 00:00:00 2001 From: technyon Date: Sat, 28 Jan 2023 18:41:47 +0100 Subject: [PATCH] change rssi publish interval unit to seconds --- Network.cpp | 2 +- NukiOpenerWrapper.cpp | 2 +- NukiWrapper.cpp | 2 +- WebCfgServer.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Network.cpp b/Network.cpp index 8606b65..b2524fe 100644 --- a/Network.cpp +++ b/Network.cpp @@ -81,7 +81,7 @@ void Network::setupDevice() void Network::initialize() { _restartOnDisconnect = _preferences->getBool(preference_restart_on_disconnect); - _rssiPublishInterval = _preferences->getInt(preference_rssi_publish_interval); + _rssiPublishInterval = _preferences->getInt(preference_rssi_publish_interval) * 1000; _hostname = _preferences->getString(preference_hostname); diff --git a/NukiOpenerWrapper.cpp b/NukiOpenerWrapper.cpp index 75908c4..7ba2685 100644 --- a/NukiOpenerWrapper.cpp +++ b/NukiOpenerWrapper.cpp @@ -45,7 +45,7 @@ void NukiOpenerWrapper::initialize() _hassEnabled = _preferences->getString(preference_mqtt_hass_discovery) != ""; _nrOfRetries = _preferences->getInt(preference_command_nr_of_retries); _retryDelay = _preferences->getInt(preference_command_retry_delay); - _rssiPublishInterval = _preferences->getInt(preference_rssi_publish_interval); + _rssiPublishInterval = _preferences->getInt(preference_rssi_publish_interval) * 1000; if(_intervalLockstate == 0) { diff --git a/NukiWrapper.cpp b/NukiWrapper.cpp index 727383f..12dec2f 100644 --- a/NukiWrapper.cpp +++ b/NukiWrapper.cpp @@ -50,7 +50,7 @@ void NukiWrapper::initialize(const bool& firstStart) _hassEnabled = _preferences->getString(preference_mqtt_hass_discovery) != ""; _nrOfRetries = _preferences->getInt(preference_command_nr_of_retries); _retryDelay = _preferences->getInt(preference_command_retry_delay); - _rssiPublishInterval = _preferences->getInt(preference_rssi_publish_interval); + _rssiPublishInterval = _preferences->getInt(preference_rssi_publish_interval) * 1000; if(firstStart) { diff --git a/WebCfgServer.cpp b/WebCfgServer.cpp index 0bf0db6..2751842 100644 --- a/WebCfgServer.cpp +++ b/WebCfgServer.cpp @@ -603,7 +603,7 @@ void WebCfgServer::buildMqttConfigHtml(String &response) printTextarea(response, "MQTTCRT", "MQTT SSL Client Certificate (*, optional)", _preferences->getString(preference_mqtt_crt).c_str(), TLS_CERT_MAX_SIZE); printTextarea(response, "MQTTKEY", "MQTT SSL Client Key (*, optional)", _preferences->getString(preference_mqtt_key).c_str(), TLS_KEY_MAX_SIZE); printDropDown(response, "NWHWDT", "Network hardware detection", String(_preferences->getInt(preference_network_hardware_detect)), getNetworkDetectionOptions()); - printInputField(response, "RSSI", "RSSI Publish interval (milliseconds; -1 to disable)", _preferences->getInt(preference_rssi_publish_interval), 6); + 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);