From 18e4c3aa881085e83aad16bd41ef870bac6b8459 Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 16:45:58 +0200 Subject: [PATCH] fix odd spelling mistakes --- interface/public/css/roboto.css | 2 +- interface/src/api/system.ts | 16 ++++++++-------- src/analogsensor.cpp | 2 +- src/devices/thermostat.cpp | 6 +++--- src/emsesp_stub.hpp | 2 +- src/mqtt.cpp | 10 +++++----- src/mqtt.h | 2 +- src/shower.cpp | 2 +- src/system.cpp | 4 ++-- src/temperaturesensor.cpp | 2 +- src/test/test.cpp | 10 +++++----- src/web/WebSchedulerService.cpp | 2 +- src/web/WebStatusService.cpp | 6 +++--- 13 files changed, 33 insertions(+), 33 deletions(-) diff --git a/interface/public/css/roboto.css b/interface/public/css/roboto.css index c22e70868..36f599b8a 100644 --- a/interface/public/css/roboto.css +++ b/interface/public/css/roboto.css @@ -1,5 +1,5 @@ /* -* Uses font-size 400 (normal) only and Latin (plus extra unicode chars) to keep flash memory to a minimun +* Uses font-size 400 (normal) only and Latin (plus extra unicode chars) to keep flash memory to a minimum * View fonts on https://fonts.google.com/ * Download woff2 using e.g. https://fonts.googleapis.com/css2?family=Lato or https://fonts.googleapis.com/css2?family=Roboto */ diff --git a/interface/src/api/system.ts b/interface/src/api/system.ts index 29629a5d7..91b35e239 100644 --- a/interface/src/api/system.ts +++ b/interface/src/api/system.ts @@ -21,22 +21,22 @@ export const fetchLog = () => alovaInstance.Post('/rest/fetchLog'); // Get versions from github export const getStableVersion = () => alovaInstanceGH.Get('releases/latest', { - transformData(reponse: any) { + transformData(response: any) { return { - version: reponse.data.name, - url: reponse.data.assets[1].browser_download_url, - changelog: reponse.data.assets[0].browser_download_url + version: response.data.name, + url: response.data.assets[1].browser_download_url, + changelog: response.data.assets[0].browser_download_url }; } }); export const getDevVersion = () => alovaInstanceGH.Get('releases/tags/latest', { - transformData(reponse: any) { + transformData(response: any) { return { - version: reponse.data.name.split(/\s+/).splice(-1), - url: reponse.data.assets[1].browser_download_url, - changelog: reponse.data.assets[0].browser_download_url + version: response.data.name.split(/\s+/).splice(-1), + url: response.data.assets[1].browser_download_url, + changelog: response.data.assets[0].browser_download_url }; } }); diff --git a/src/analogsensor.cpp b/src/analogsensor.cpp index f37c0947a..2ba285abc 100644 --- a/src/analogsensor.cpp +++ b/src/analogsensor.cpp @@ -498,7 +498,7 @@ void AnalogSensor::publish_values(const bool force) { config["val_tpl"] = (std::string) "{{" + val_obj + " if " + val_cond + " else " + sample_val + "}}"; char uniq_s[70]; - if (Mqtt::entity_format() == Mqtt::entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == Mqtt::entityFormat::MULTI_SHORT) { snprintf(uniq_s, sizeof(uniq_s), "%s_analogsensor_%02d", Mqtt::basename().c_str(), sensor.gpio()); } else { snprintf(uniq_s, sizeof(uniq_s), "analogsensor_%02d", sensor.gpio()); diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 5f6bae89b..a7233fc36 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1139,8 +1139,8 @@ void Thermostat::process_RC300Settings(std::shared_ptr telegram) // 0x2CC - e.g. wwprio for RC310 hcx parameter void Thermostat::process_RC300Set2(std::shared_ptr telegram) { // typeids are not in a raw. hc:0x2CC, hc2: 0x2CE for RC310 - // telegram is either offset 3 with data lenght of 1 and values 0/1 (radiators) - 10 0B FF 03 01 CC 01 F6 - // or offset 0 with data lenght of 6 bytes - offset 3 values are 0x00 or 0xFF - 10 0B FF 00 01 CE FF 13 0A FF 1E 00 20 + // telegram is either offset 3 with data length of 1 and values 0/1 (radiators) - 10 0B FF 03 01 CC 01 F6 + // or offset 0 with data length of 6 bytes - offset 3 values are 0x00 or 0xFF - 10 0B FF 00 01 CE FF 13 0A FF 1E 00 20 std::shared_ptr hc = heating_circuit(telegram); if (hc == nullptr) { @@ -2727,7 +2727,7 @@ bool Thermostat::set_controlmode(const char * value, const int8_t id) { return false; } -// sets the thermostat time for nightmode for RC10, telegrm 0xB0 +// sets the thermostat time for nightmode for RC10, telegram 0xB0 bool Thermostat::set_reducehours(const char * value, const int8_t id) { uint8_t hc_num = (id == -1) ? AUTO_HEATING_CIRCUIT : id; std::shared_ptr hc = heating_circuit(hc_num); diff --git a/src/emsesp_stub.hpp b/src/emsesp_stub.hpp index b00cad107..69ece6f7e 100644 --- a/src/emsesp_stub.hpp +++ b/src/emsesp_stub.hpp @@ -28,7 +28,7 @@ #include -// forward declarators +// forward declarator // used to bind EMS-ESP functions to external frameworks namespace emsesp { class EMSESP { diff --git a/src/mqtt.cpp b/src/mqtt.cpp index e3eec030b..ef2f4d061 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -315,7 +315,7 @@ void Mqtt::show_topic_handlers(uuid::console::Shell & shell, const uint8_t devic // called when an MQTT Publish ACK is received void Mqtt::on_publish(uint16_t packetId) const { - LOG_DEBUG("Packet %d sent successfull", packetId); + LOG_DEBUG("Packet %d sent successful", packetId); } // called when MQTT settings have changed via the Web forms @@ -521,7 +521,7 @@ void Mqtt::ha_status() { StaticJsonDocument doc; char uniq[70]; - if (Mqtt::entity_format() == entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == entityFormat::MULTI_SHORT) { snprintf(uniq, sizeof(uniq), "%s_system_status", mqtt_basename_.c_str()); } else { strcpy(uniq, "system_status"); @@ -799,10 +799,10 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev // build unique identifier also used as object_id which also becomes the Entity ID in HA char uniq_id[80]; - if (Mqtt::entity_format() == entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == entityFormat::MULTI_SHORT) { // prefix base name to each uniq_id and use the shortname snprintf(uniq_id, sizeof(uniq_id), "%s_%s_%s", mqtt_basename_.c_str(), device_name, entity_with_tag); - } else if (Mqtt::entity_format() == entitiyFormat::SINGLE_SHORT) { + } else if (Mqtt::entity_format() == entityFormat::SINGLE_SHORT) { // shortname, no mqtt base. This is the default version. snprintf(uniq_id, sizeof(uniq_id), "%s_%s", device_name, entity_with_tag); } else { @@ -1166,7 +1166,7 @@ bool Mqtt::publish_ha_climate_config(const uint8_t tag, const bool has_roomtemp, snprintf(name_s, sizeof(name_s), "Hc%d", hc_num); - if (Mqtt::entity_format() == entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == entityFormat::MULTI_SHORT) { snprintf(uniq_id_s, sizeof(uniq_id_s), "%s_thermostat_hc%d", mqtt_basename_.c_str(), hc_num); // add basename } else { snprintf(uniq_id_s, sizeof(uniq_id_s), "thermostat_hc%d", hc_num); // backward compatible with v3.4 diff --git a/src/mqtt.h b/src/mqtt.h index 15e87f8ca..dc530c25c 100644 --- a/src/mqtt.h +++ b/src/mqtt.h @@ -36,7 +36,7 @@ using mqtt_sub_function_p = std::function; class Mqtt { public: enum discoveryType : uint8_t { HOMEASSISTANT, DOMOTICZ }; - enum entitiyFormat : uint8_t { SINGLE_LONG, SINGLE_SHORT, MULTI_SHORT }; + enum entityFormat : uint8_t { SINGLE_LONG, SINGLE_SHORT, MULTI_SHORT }; void loop(); void start(); diff --git a/src/shower.cpp b/src/shower.cpp index 477230671..f09e1b7a5 100644 --- a/src/shower.cpp +++ b/src/shower.cpp @@ -155,7 +155,7 @@ void Shower::set_shower_state(bool state, bool force) { doc["name"] = "Shower Active"; char str[70]; - if (Mqtt::entity_format() == Mqtt::entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == Mqtt::entityFormat::MULTI_SHORT) { snprintf(str, sizeof(str), "%s_shower_active", Mqtt::basename().c_str()); } else { snprintf(str, sizeof(str), "shower_active"); // v3.4 compatible diff --git a/src/system.cpp b/src/system.cpp index 392861e6b..ca5ba032a 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -536,7 +536,7 @@ void System::loop() { // send MQTT info topic appended with the version information as JSON, as a retained flag void System::send_info_mqtt(const char * event_str, bool send_ntp) { - // use dynamic json becaues it is called from NTP-callback from lwip task with small stack + // use dynamic json because it is called from NTP-callback from lwip task with small stack DynamicJsonDocument doc = DynamicJsonDocument(EMSESP_JSON_SIZE_MEDIUM); doc["event"] = event_str; doc["version"] = EMSESP_APP_VERSION; @@ -1503,7 +1503,7 @@ std::string System::reset_reason(uint8_t cpu) const { break; } #endif - return ("Unkonwn"); + return ("Unknown"); } #pragma GCC diagnostic pop diff --git a/src/temperaturesensor.cpp b/src/temperaturesensor.cpp index a13b848db..ee64c67af 100644 --- a/src/temperaturesensor.cpp +++ b/src/temperaturesensor.cpp @@ -528,7 +528,7 @@ void TemperatureSensor::publish_values(const bool force) { config["val_tpl"] = (std::string) "{{" + val_obj + " if " + val_cond + " else -55}}"; char uniq_s[70]; - if (Mqtt::entity_format() == Mqtt::entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == Mqtt::entityFormat::MULTI_SHORT) { snprintf(uniq_s, sizeof(uniq_s), "%s_temperaturesensor_%s", Mqtt::basename().c_str(), sensor.id().c_str()); } else { snprintf(uniq_s, sizeof(uniq_s), "temperaturesensor_%s", sensor.id().c_str()); diff --git a/src/test/test.cpp b/src/test/test.cpp index 7792a1efd..4ee9df204 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -1001,14 +1001,14 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const EMSESP::mqtt_.incoming("ems-esp/thermostat/hc2/mode", "auto"); EMSESP::mqtt_.incoming("ems-esp/thermostat/wwc3/mode", "auto"); EMSESP::mqtt_.incoming("ems-esp/boiler/wwcircpump", "off"); - EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload, sends reponse + EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload EMSESP::mqtt_.incoming("ems-esp/thermostat_hc1", "22"); // HA only EMSESP::mqtt_.incoming("ems-esp/thermostat_hc1", "off"); // HA only EMSESP::mqtt_.incoming("ems-esp/system/send", "11 12 13"); - EMSESP::mqtt_.incoming("ems-esp/boiler/syspress"); // empty payload, sends reponse - EMSESP::mqtt_.incoming("ems-esp/thermostat/mode"); // empty payload, sends reponse + EMSESP::mqtt_.incoming("ems-esp/boiler/syspress"); // empty payload + EMSESP::mqtt_.incoming("ems-esp/thermostat/mode"); // empty payload EMSESP::mqtt_.incoming("ems-esp/system/publish"); - EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload, sends reponse + EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload EMSESP::mqtt_.incoming("ems-esp/boiler/wwseltemp", "59"); EMSESP::mqtt_.incoming("ems-esp/boiler/wwseltemp"); @@ -1022,7 +1022,7 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const // check extended MQTT base Mqtt::base("home/cellar/heating"); - EMSESP::mqtt_.incoming("home/cellar/heating/thermostat/mode"); // empty payload, sends reponse + EMSESP::mqtt_.incoming("home/cellar/heating/thermostat/mode"); // empty payload // Web API TESTS AsyncWebServerRequest request; diff --git a/src/web/WebSchedulerService.cpp b/src/web/WebSchedulerService.cpp index 753cd9a82..f04a12bfc 100644 --- a/src/web/WebSchedulerService.cpp +++ b/src/web/WebSchedulerService.cpp @@ -50,7 +50,7 @@ void WebScheduler::read(WebScheduler & webScheduler, JsonObject & root) { } } -// call on initialization and also when the Scheduile web page is saved +// call on initialization and also when the Schedule web page is saved // this loads the data into the internal class StateUpdateResult WebScheduler::update(JsonObject & root, WebScheduler & webScheduler) { #ifdef EMSESP_STANDALONE diff --git a/src/web/WebStatusService.cpp b/src/web/WebStatusService.cpp index 231a7ef41..86ec82683 100644 --- a/src/web/WebStatusService.cpp +++ b/src/web/WebStatusService.cpp @@ -229,7 +229,7 @@ const char * WebStatusService::disconnectReason(uint8_t code) { #ifndef EMSESP_STANDALONE switch (code) { case WIFI_REASON_UNSPECIFIED: // = 1, - return "unspecifiied"; + return "unspecified"; case WIFI_REASON_AUTH_EXPIRE: // = 2, return "auth expire"; case WIFI_REASON_AUTH_LEAVE: // = 3, @@ -239,9 +239,9 @@ const char * WebStatusService::disconnectReason(uint8_t code) { case WIFI_REASON_ASSOC_TOOMANY: // = 5, return "assoc too many"; case WIFI_REASON_NOT_AUTHED: // = 6, - return "not authed"; + return "not authenticated"; case WIFI_REASON_NOT_ASSOCED: // = 7, - return "not assoced"; + return "not assoc"; case WIFI_REASON_ASSOC_LEAVE: // = 8, return "assoc leave"; case WIFI_REASON_ASSOC_NOT_AUTHED: // = 9,