diff --git a/include/Settings.h b/include/Settings.h index 2826cdf..b679823 100644 --- a/include/Settings.h +++ b/include/Settings.h @@ -106,7 +106,7 @@ struct MqttSettings { struct EmergencySettings { float target = DEFAULT_HEATING_TARGET_TEMP; - unsigned short tresholdTime = 120; + unsigned short thresholdTime = 120; }; struct HeatingSettings { diff --git a/include/macros.h b/include/macros.h index 34b1306..8b1a874 100644 --- a/include/macros.h +++ b/include/macros.h @@ -28,8 +28,8 @@ #define DEFAULT_NTC_REF_RESISTANCE 10000.0f #define DEFAULT_NTC_BETA_FACTOR 3950.0f #define DEFAULT_NTC_VREF 3300.0f -#define DEFAULT_NTC_VLOW_TRESHOLD 25.0f -#define DEFAULT_NTC_VHIGH_TRESHOLD 3298.0f +#define DEFAULT_NTC_VLOW_THRESHOLD 25.0f +#define DEFAULT_NTC_VHIGH_THRESHOLD 3298.0f #ifndef BUILD_VERSION #define BUILD_VERSION "0.0.0" diff --git a/include/strings_shared.h b/include/strings_shared.h index 11c4288..f2e2913 100644 --- a/include/strings_shared.h +++ b/include/strings_shared.h @@ -206,7 +206,6 @@ inline const char S_THRESHOLD_LOW[] = "threshold_low"; inline const char S_THRESHOLD_TIME[] = "threshold_time"; inline const char S_TIMEZONE[] = "timezone"; inline const char S_TOTAL[] = "total"; -inline const char S_TRESHOLD_TIME[] = "treshold_time"; inline const char S_TRUE[] = "true"; inline const char S_TURBO[] = "turbo"; inline const char S_TURBO_FACTOR[] = "turbo_factor"; diff --git a/src/config.cpp b/src/config.cpp index 1017af7..578931f 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -1266,7 +1266,7 @@ static SettingResult applySetting(EmergencySettings& dst, std::string_view path, JsonVariant toJson(const EmergencySettings& src, JsonVariant dst) { auto emergency = dst.to(); emergency[S_TARGET] = roundf(convertTemp(src.target, UnitSystem::METRIC, settings.system.unitSystem), 2); - emergency[S_TRESHOLD_TIME] = src.tresholdTime; + emergency[S_THRESHOLD_TIME] = src.thresholdTime; return dst; } @@ -1274,13 +1274,13 @@ JsonVariant toJson(const EmergencySettings& src, JsonVariant dst) { SettingResult fromJson(JsonVariantConst src, EmergencySettings& dst) { SettingResult result; - if (src[S_TRESHOLD_TIME].is()) { - const auto value = src[S_TRESHOLD_TIME].as(); + if (src[S_THRESHOLD_TIME].is()) { + const auto value = src[S_THRESHOLD_TIME].as(); if (value >= 60 && value <= 1800) { result.accepted = true; - if (value != dst.tresholdTime) { - dst.tresholdTime = value; + if (value != dst.thresholdTime) { + dst.thresholdTime = value; result.changed = true; } } diff --git a/src/control.cpp b/src/control.cpp index 7132d26..e94805b 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -113,7 +113,7 @@ static Task emergencyTask("Emergency mode", [](void*) { } else if (emergencyDetected && !vars.emergency.state) { // enable emergency - if (millis() - emergencyFlipTime > (settings.emergency.tresholdTime * 1000)) { + if (millis() - emergencyFlipTime > (settings.emergency.thresholdTime * 1000)) { vars.emergency.state = true; ESP_LOGI(L_MAIN, "Emergency mode enabled (%hhu)", emergencyFlags); } @@ -127,7 +127,7 @@ static Task emergencyTask("Emergency mode", [](void*) { } else if (!emergencyDetected && vars.emergency.state) { // disable emergency - if (millis() - emergencyFlipTime > (settings.emergency.tresholdTime * 1000)) { + if (millis() - emergencyFlipTime > (settings.emergency.thresholdTime * 1000)) { vars.emergency.state = false; ESP_LOGI(L_MAIN, "Emergency mode disabled"); } diff --git a/src/sensors.cpp b/src/sensors.cpp index bbd52cd..17a91a5 100644 --- a/src/sensors.cpp +++ b/src/sensors.cpp @@ -893,7 +893,7 @@ static Task readNtcSensorsTask("Read NTC sensors", [](void*) { } const auto value = analogReadMilliVolts(sSensor->gpio); - if (value < DEFAULT_NTC_VLOW_TRESHOLD || value > DEFAULT_NTC_VHIGH_TRESHOLD) { + if (value < DEFAULT_NTC_VLOW_THRESHOLD || value > DEFAULT_NTC_VHIGH_THRESHOLD) { Sensors::setConnectionStatusById(sensorId, false, false); ESP_LOGW( diff --git a/src_data/locales/cn.json b/src_data/locales/cn.json index 690ade5..be3d9da 100644 --- a/src_data/locales/cn.json +++ b/src_data/locales/cn.json @@ -370,7 +370,7 @@ "title": "目标温度", "note": "重要提示: 若启用OpenTherm选项 «原生供暖控制»,此处设定值为目标室内温度;
其他所有情况下,此处设定值为 目标热媒出水温度." }, - "treshold": "阈值时间 (秒)" + "thresholdTime": "进入或退出应急模式的延时 (秒)" }, "equitherm": { "slope": { diff --git a/src_data/locales/en.json b/src_data/locales/en.json index c180e1a..40fb902 100644 --- a/src_data/locales/en.json +++ b/src_data/locales/en.json @@ -370,7 +370,7 @@ "title": "Target temperature", "note": "Important: Target indoor temperature if OT option «Native heating control» is enabled.
In all other cases, the target heat carrier temperature." }, - "treshold": "Treshold time (sec)" + "thresholdTime": "Delay before entering or leaving emergency mode (sec)" }, "equitherm": { "slope": { diff --git a/src_data/locales/it.json b/src_data/locales/it.json index 3e5176b..b9aa533 100644 --- a/src_data/locales/it.json +++ b/src_data/locales/it.json @@ -370,7 +370,7 @@ "title": "Temperatura impostata", "note": "Importante: Temperatura interna impostata se l'opzione OT «Controllo riscaldamento interno» è attivato.
In tutti gli altri casi, la target heat carrier temperature." }, - "treshold": "Tempo di soglia (sec)" + "thresholdTime": "Ritardo di entrata e uscita dalla modalità di emergenza (sec)" }, "equitherm": { "slope": { diff --git a/src_data/locales/nl.json b/src_data/locales/nl.json index 21ba8f9..7d7f381 100644 --- a/src_data/locales/nl.json +++ b/src_data/locales/nl.json @@ -370,7 +370,7 @@ "title": "Doeltemperatuur", "note": "Belangrijk: Doel binnentemperatuur als OT-optie «Natuurlijke verwarmingsregeling» is ingeschakeld.
In alle andere gevallen, de doel warmtedragertemperatuur." }, - "treshold": "Drempeltijd (sec)" + "thresholdTime": "Vertraging bij in- en uitschakelen van de noodmodus (sec)" }, "equitherm": { "slope": { diff --git a/src_data/locales/ru.json b/src_data/locales/ru.json index 3b91120..2da821d 100644 --- a/src_data/locales/ru.json +++ b/src_data/locales/ru.json @@ -370,7 +370,7 @@ "title": "Целевая температура", "note": "Важно: Целевая температура в помещении, если включена ОТ опция «Передать управление отоплением котлу».
Во всех остальных случаях целевая температура теплоносителя." }, - "treshold": "Пороговое время включения (сек)" + "thresholdTime": "Задержка входа в аварийный режим и выхода из него (сек)" }, "equitherm": { "slope": { diff --git a/src_data/pages/settings.html b/src_data/pages/settings.html index 53d9fe0..5c54f69 100644 --- a/src_data/pages/settings.html +++ b/src_data/pages/settings.html @@ -366,8 +366,8 @@ @@ -1302,7 +1302,7 @@ "max": data.heating.max_temp, }, form); } - setInputValue("[name='treshold_time']", data.emergency.treshold_time, {}, form); + setInputValue("[name='threshold_time']", data.emergency.threshold_time, {}, form); } else if (section === 'equitherm') { setCheckboxValue("[name='enabled']", data.equitherm.enabled, form); diff --git a/src_data/scripts/settings-converter.js b/src_data/scripts/settings-converter.js index 1bf4725..b02cd2d 100644 --- a/src_data/scripts/settings-converter.js +++ b/src_data/scripts/settings-converter.js @@ -54,7 +54,7 @@ const convertLegacyBackup = (data) => { thresholdHigh: 'threshold_high', thresholdLow: 'threshold_low', thresholdTime: 'threshold_time', - tresholdTime: 'treshold_time', + tresholdTime: 'threshold_time', turboFactor: 'turbo_factor', unitSystem: 'unit_system', useDhcp: 'use_dhcp',