fix odd spelling mistakes

This commit is contained in:
Proddy
2023-07-14 16:45:58 +02:00
parent 116c51443e
commit 18e4c3aa88
13 changed files with 33 additions and 33 deletions

View File

@@ -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
*/

View File

@@ -21,22 +21,22 @@ export const fetchLog = () => alovaInstance.Post('/rest/fetchLog');
// Get versions from github
export const getStableVersion = () =>
alovaInstanceGH.Get<Version>('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<Version>('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
};
}
});

View File

@@ -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());

View File

@@ -1139,8 +1139,8 @@ void Thermostat::process_RC300Settings(std::shared_ptr<const Telegram> telegram)
// 0x2CC - e.g. wwprio for RC310 hcx parameter
void Thermostat::process_RC300Set2(std::shared_ptr<const Telegram> 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<Thermostat::HeatingCircuit> 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<Thermostat::HeatingCircuit> hc = heating_circuit(hc_num);

View File

@@ -28,7 +28,7 @@
#include <uuid/log.h>
// forward declarators
// forward declarator
// used to bind EMS-ESP functions to external frameworks
namespace emsesp {
class EMSESP {

View File

@@ -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<EMSESP_JSON_SIZE_LARGE> 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

View File

@@ -36,7 +36,7 @@ using mqtt_sub_function_p = std::function<bool(const char * message)>;
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();

View File

@@ -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

View File

@@ -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

View File

@@ -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());

View File

@@ -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;

View File

@@ -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

View File

@@ -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,