fix all typos

This commit is contained in:
proddy
2024-09-11 20:23:58 +02:00
parent 426555bac6
commit 44ef7dd0bc
30 changed files with 1630 additions and 307 deletions

View File

@@ -657,7 +657,7 @@ bool AnalogSensor::get_value_info(JsonObject output, const char * cmd, const int
// match custom name or sensor GPIO
if (cmd == Helpers::toLower(sensor.name()) || Helpers::atoint(cmd) == sensor.gpio()) {
get_value_json(output, sensor);
return Command::set_attirbute(output, cmd, attribute_s);
return Command::set_attribute(output, cmd, attribute_s);
}
}

View File

@@ -294,7 +294,7 @@ const char * Command::get_attribute(const char * cmd) {
return nullptr;
}
bool Command::set_attirbute(JsonObject output, const char * cmd, const char * attribute) {
bool Command::set_attribute(JsonObject output, const char * cmd, const char * attribute) {
if (attribute == nullptr) {
return true;
}

View File

@@ -136,7 +136,7 @@ class Command {
static const char * parse_command_string(const char * command, int8_t & id);
static const char * get_attribute(const char * cmd);
static bool set_attirbute(JsonObject output, const char * cmd, const char * attirbute);
static bool set_attribute(JsonObject output, const char * cmd, const char * attribute);
static const char * return_code_string(const uint8_t return_code);

View File

@@ -2673,7 +2673,7 @@ bool Boiler::set_ww_circulation_pump(const char * value, const int8_t id) {
}
// Set the mode of circulation, 1x3min, ... 6x3min, continuous
// if 0-off, switching is not possibe, if 1-7 switching to off is not possible
// if 0-off, switching is not possible, if 1-7 switching to off is not possible
bool Boiler::set_ww_circulation_mode(const char * value, const int8_t id) {
uint8_t v;
if (!Helpers::value2enum(value, v, FL_(enum_freq))) {

View File

@@ -307,8 +307,8 @@ class Boiler : public EMSdevice {
uint8_t wwValve_;
// special
double nrgHeatF_; // double calcutate for nrgHeat
double nrgWwF_; // double calcutate for nrgWw
double nrgHeatF_; // double calculate for nrgHeat
double nrgWwF_; // double calculate for nrgWw
uint8_t nomPower_;
/*

View File

@@ -25,7 +25,7 @@ REGISTER_FACTORY(Extension, EMSdevice::DeviceType::EXTENSION);
Extension::Extension(uint8_t device_type, uint8_t device_id, uint8_t product_id, const char * version, const char * name, uint8_t flags, uint8_t brand)
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
if (device_id == 0x16) {
// no entities for T1RF outdoor sensor, values are comming from RFbase 0x50 (connect)
// no entities for T1RF outdoor sensor, values are coming from RFbase 0x50 (connect)
return;
}
// Extension module EM100 device_id 0x12

View File

@@ -55,7 +55,7 @@ class Thermostat : public EMSdevice {
uint8_t summertemp;
int8_t nofrosttemp; // signed -20°C to +10°C
uint8_t designtemp; // heating curve design temp at MinExtTemp
int8_t offsettemp; // heating curve offest temp at roomtemp signed!
int8_t offsettemp; // heating curve offset temp at roomtemp signed!
uint8_t manualtemp;
uint8_t summersetmode;
uint8_t hpoperatingmode;

View File

@@ -1462,7 +1462,7 @@ bool EMSdevice::get_value_info(JsonObject output, const char * cmd, const int8_t
if (cmd == Helpers::toLower(dv.short_name) && (tag <= 0 || tag == dv.tag)) {
get_value_json(output, dv);
// if we're filtering on an attribute, go find it
return Command::set_attirbute(output, cmd, attribute_s);
return Command::set_attribute(output, cmd, attribute_s);
}
}
return false; // not found, but don't return a message error yet
@@ -1664,7 +1664,7 @@ bool EMSdevice::generate_values(JsonObject output, const int8_t tag_filter, cons
if (have_tag) {
snprintf(name, sizeof(name), "%s %s (%s)", tag_to_string(dv.tag), fullname.c_str(), dv.short_name); // prefix tag
// TAG https://github.com/emsesp/EMS-ESP32/issues/1338
// snprintf(name, sizeof(name), "%s %s (%s)", fullname.c_str(), tag_to_string(dv.tag), dv.short_name); // sufix tag
// snprintf(name, sizeof(name), "%s %s (%s)", fullname.c_str(), tag_to_string(dv.tag), dv.short_name); // suffix tag
} else {
snprintf(name, sizeof(name), "%s (%s)", fullname.c_str(), dv.short_name);
}

View File

@@ -354,7 +354,7 @@ class EMSdevice {
ANALOGSENSOR, // for internal analog sensors
SCHEDULER, // for internal schedule
CUSTOM, // for user defined entities
BOILER, // frome here on enum the ems-devices
BOILER, // from here on enum the ems-devices
THERMOSTAT,
MIXER,
SOLAR,

View File

@@ -373,7 +373,7 @@ char * Helpers::render_value(char * result, const uint32_t value, const int8_t f
return result;
}
// creates string of hex values from an arrray of bytes
// creates string of hex values from an array of bytes
std::string Helpers::data_to_hex(const uint8_t * data, const uint8_t length) {
if (length == 0) {
return "<empty>";

View File

@@ -354,7 +354,7 @@ MAKE_ENUM(enum_dayOfWeek, FL_(day_mo), FL_(day_tu), FL_(day_we), FL_(day_th), FL
MAKE_ENUM(enum_progMode2, FL_(own_1), FL_(family), FL_(morning), FL_(evening), FL_(am), FL_(pm), FL_(midday), FL_(singles), FL_(seniors), FL_(new), FL_(own_2))
MAKE_ENUM(enum_progMode3, FL_(family), FL_(morning), FL_(evening), FL_(am), FL_(pm), FL_(midday), FL_(singles), FL_(seniors))
MAKE_ENUM(enum_hybridStrategy, FL_(co2_optimized), FL_(cost_optimized), FL_(outside_temp_switched), FL_(co2_cost_mix))
MAKE_ENUM(enum_hybridStrategy1, FL_(cost_optimized), FL_(co2_optimized), FL_(outside_temp_alt), FL_(outside_temp_par), FL_(hp_prefered), FL_(boiler_only))
MAKE_ENUM(enum_hybridStrategy1, FL_(cost_optimized), FL_(co2_optimized), FL_(outside_temp_alt), FL_(outside_temp_par), FL_(hp_preferred), FL_(boiler_only))
MAKE_ENUM(enum_lowNoiseMode, FL_(off), FL_(reduced_output), FL_(switchoff), FL_(perm))
// heat pump

View File

@@ -214,7 +214,7 @@ MAKE_WORD_TRANSLATION(hot_water, "hot water", "Warmwasser", "warm water", "varmv
MAKE_WORD_TRANSLATION(pool, "pool", "Pool", "zwembad", "pool", "basen", "basseng", "piscine", "havuz", "piscina", "bazén")
MAKE_WORD_TRANSLATION(outside_temp_alt, "outside temperature alt.", "Außentemp. alternativ", "alternatieve buitentemperatuur", "Alternativ utomhustemp.", "temp. zewn. alternat.", "alternativ utendørstemp.", "température extérieure alternative", "alternatif dış sıcaklık", "temperatura esterna alternativa", "vonkajšia teplota altern.")
MAKE_WORD_TRANSLATION(outside_temp_par, "outside temperature parallel", "Außentemp. parallel", "buitentemperatuur parallel", "Parallell utomhustemp.", "temp. zewn. równoległa", "parallell utendørstemp.", "température extérieure parallèle", "paralel dış sıcaklık", "temperatura esterna parallela", "paralelne s vonkajšou teplotou")
MAKE_WORD_TRANSLATION(hp_prefered, "heatpump prefered", "Wärmepumpe bevorzugt", "voorkeur warmtepomp", "Värmepump föredraget", "preferowana pompa ciepła", "varmepumpe prioritert", "pompe à chaleur préférée", "tercih edilen pompa", "pompa di calore preferita", "preferované tepelné čerpadlo")
MAKE_WORD_TRANSLATION(hp_preferred, "heatpump prefered", "Wärmepumpe bevorzugt", "voorkeur warmtepomp", "Värmepump föredraget", "preferowana pompa ciepła", "varmepumpe prioritert", "pompe à chaleur préférée", "tercih edilen pompa", "pompa di calore preferita", "preferované tepelné čerpadlo")
MAKE_WORD_TRANSLATION(boiler_only, "boiler only", "nur Kessel", "uitsluitend cv ketel", "Värmepanna enbart", "tylko kocioł", "kun kjele", "chaudière uniquement", "sadece kazan", "solo caldaia", "len kotol")
MAKE_WORD_TRANSLATION(reduced_output, "reduced output", "Reduzierte Leistung", "gereduceerde output", "Reducerad produktion", "zmniejszona wydajność", "redusert ytelse", "sortie réduite", "düşürülmüş çıkış", "riduzione uscita", "znížený výkon")
MAKE_WORD_TRANSLATION(switchoff, "switch off hp", "WP ausschalten", "WP uitschakelen", "Värmepump avstängd", "wyłącz pompę ciepła", "slå av varmepumpe", "éteindre la PAC", "ısı pompasını kapat", "spegnimento pompa calore", "vypnúť tep. čerpadlo")

View File

@@ -747,7 +747,7 @@ bool Mqtt::queue_ha(const char * topic, const JsonObjectConst payload) {
bool Mqtt::publish_ha_sensor_config(DeviceValue & dv, const char * model, const char * brand, const bool remove, const bool create_device_config) {
JsonDocument dev_json;
// always create the ids (discovery indentifiers)
// always create the ids (discovery identifiers)
// with the name always
// and the manufacturer and model if we're creating the device config for the first entity
JsonArray ids = dev_json["ids"].to<JsonArray>();

View File

@@ -203,7 +203,7 @@ void Roomctrl::version(uint8_t addr, uint8_t dst, uint8_t hc) {
if (type_[hc] == RC20) {
data[5] = 2; // version 2.01
data[6] = 1;
data[7] = EMSbus::calculate_crc(data, 7); // apppend CRC
data[7] = EMSbus::calculate_crc(data, 7); // append CRC
EMSuart::transmit(data, 8);
return;
} else if (type_[hc] == FB10) {
@@ -216,7 +216,7 @@ void Roomctrl::version(uint8_t addr, uint8_t dst, uint8_t hc) {
data[11] = 0;
data[12] = 0;
data[13] = 0;
data[14] = EMSbus::calculate_crc(data, 14); // apppend CRC
data[14] = EMSbus::calculate_crc(data, 14); // append CRC
EMSuart::transmit(data, 15);
return;
} else if (type_[hc] == RC200) {
@@ -229,7 +229,7 @@ void Roomctrl::version(uint8_t addr, uint8_t dst, uint8_t hc) {
data[11] = 0;
data[12] = 0;
data[13] = 0;
data[14] = EMSbus::calculate_crc(data, 14); // apppend CRC
data[14] = EMSbus::calculate_crc(data, 14); // append CRC
EMSuart::transmit(data, 15);
return;
} else if (type_[hc] == RC100H) {
@@ -237,7 +237,7 @@ void Roomctrl::version(uint8_t addr, uint8_t dst, uint8_t hc) {
data[6] = 4;
data[7] = 0;
data[8] = 0xFF;
data[9] = EMSbus::calculate_crc(data, 9); // apppend CRC
data[9] = EMSbus::calculate_crc(data, 9); // append CRC
EMSuart::transmit(data, 10);
return;
} else if (type_[hc] == RC100) {
@@ -245,13 +245,13 @@ void Roomctrl::version(uint8_t addr, uint8_t dst, uint8_t hc) {
data[6] = 3;
data[7] = 0;
data[8] = 0xFF;
data[9] = EMSbus::calculate_crc(data, 9); // apppend CRC
data[9] = EMSbus::calculate_crc(data, 9); // append CRC
EMSuart::transmit(data, 10);
return;
} else if (type_[hc] == RT800) {
data[5] = 21; // version 21.03
data[6] = 3;
data[7] = EMSbus::calculate_crc(data, 7); // apppend CRC
data[7] = EMSbus::calculate_crc(data, 7); // append CRC
EMSuart::transmit(data, 8);
return;
}
@@ -266,7 +266,7 @@ void Roomctrl::unknown(uint8_t addr, uint8_t dst, uint8_t type, uint8_t offset)
data[1] = dst & 0x7F;
data[2] = type;
data[3] = offset;
data[4] = EMSbus::calculate_crc(data, 4); // apppend CRC
data[4] = EMSbus::calculate_crc(data, 4); // append CRC
EMSuart::transmit(data, 5);
}
@@ -278,7 +278,7 @@ void Roomctrl::unknown(uint8_t addr, uint8_t dst, uint8_t offset, uint8_t typeh,
data[3] = offset;
data[4] = typeh;
data[5] = typel;
data[6] = EMSbus::calculate_crc(data, 6); // apppend CRC
data[6] = EMSbus::calculate_crc(data, 6); // append CRC
EMSuart::transmit(data, 7);
}
@@ -295,7 +295,7 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) {
data[4] = (uint8_t)(remotetemp_[hc] >> 8);
data[5] = (uint8_t)(remotetemp_[hc] & 0xFF);
data[6] = 0;
data[7] = EMSbus::calculate_crc(data, 7); // apppend CRC
data[7] = EMSbus::calculate_crc(data, 7); // append CRC
EMSuart::transmit(data, 8);
} else if (type_[hc] == FB10) { // Junkers FB10, telegram 0x0123
data[2] = 0xFF;
@@ -304,7 +304,7 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) {
data[5] = 0x23; // fixed for all hc
data[6] = (uint8_t)(remotetemp_[hc] >> 8);
data[7] = (uint8_t)(remotetemp_[hc] & 0xFF);
data[8] = EMSbus::calculate_crc(data, 8); // apppend CRC
data[8] = EMSbus::calculate_crc(data, 8); // append CRC
EMSuart::transmit(data, 9);
} else if (type_[hc] == RC200) { // RC200, telegram 42B, ff
data[2] = 0xFF;
@@ -317,7 +317,7 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) {
data[8] = (uint8_t)(t1 >> 8);
data[9] = (uint8_t)(t1 & 0xFF);
data[10] = 1; // not sure what this is and if we need it, maybe mode?
data[11] = EMSbus::calculate_crc(data, 11); // apppend CRC
data[11] = EMSbus::calculate_crc(data, 11); // append CRC
EMSuart::transmit(data, 12);
} else if (type_[hc] == RC100H || type_[hc] == RC100) { // RC100H, telegram 42B, ff
data[2] = 0xFF;
@@ -326,7 +326,7 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) {
data[5] = 0x2B + hc;
data[6] = (uint8_t)(remotetemp_[hc] >> 8);
data[7] = (uint8_t)(remotetemp_[hc] & 0xFF);
data[8] = EMSbus::calculate_crc(data, 8); // apppend CRC
data[8] = EMSbus::calculate_crc(data, 8); // append CRC
EMSuart::transmit(data, 9);
} else if (type_[hc] == SENSOR) { // wireless sensor, broadcast id 435
data[2] = 0xFF;
@@ -335,7 +335,7 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) {
data[5] = 0x35 + hc;
data[6] = (uint8_t)(remotetemp_[hc] >> 8);
data[7] = (uint8_t)(remotetemp_[hc] & 0xFF);
data[8] = EMSbus::calculate_crc(data, 8); // apppend CRC
data[8] = EMSbus::calculate_crc(data, 8); // append CRC
EMSuart::transmit(data, 9);
} else if (type_[hc] == RT800) { // RC200, telegram 42B, ff
data[2] = 0xFF;
@@ -349,7 +349,7 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) {
data[9] = (uint8_t)(t1 & 0xFF);
data[10] = 1; // not sure what this is and if we need it, maybe mode?
data[11] = 9; // not sure what this is and if we need it, maybe mode?
data[12] = EMSbus::calculate_crc(data, 12); // apppend CRC
data[12] = EMSbus::calculate_crc(data, 12); // append CRC
EMSuart::transmit(data, 13);
}
}
@@ -368,7 +368,7 @@ void Roomctrl::humidity(uint8_t addr, uint8_t dst, uint8_t hc) {
data[7] = remotehum_[hc];
data[8] = (uint8_t)(dew << 8);
data[9] = (uint8_t)(dew & 0xFF);
data[10] = EMSbus::calculate_crc(data, 10); // apppend CRC
data[10] = EMSbus::calculate_crc(data, 10); // append CRC
EMSuart::transmit(data, 11);
}
@@ -411,7 +411,7 @@ void Roomctrl::replyF7(uint8_t addr, uint8_t dst, uint8_t offset, uint8_t typehh
data[7] = 0;
data[8] = 0;
}
data[9] = EMSbus::calculate_crc(data, 9); // apppend CRC
data[9] = EMSbus::calculate_crc(data, 9); // append CRC
EMSuart::transmit(data, 10);
}

View File

@@ -1435,7 +1435,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject output
// System
node = output["system"].to<JsonObject>();
// prevent false negataive in Unity tests everytime the version changes
// prevent false negative in Unity tests every time the version changes
#if defined(EMSESP_UNITY)
node["version"] = "dev";
#else

View File

@@ -428,7 +428,7 @@ void TxService::send_telegram(const uint8_t * data, const uint8_t length) {
for (uint8_t i = 0; i < length; i++) {
telegram_raw[i] = data[i];
}
telegram_raw[length] = calculate_crc(telegram_raw, length); // apppend CRC
telegram_raw[length] = calculate_crc(telegram_raw, length); // append CRC
tx_state(Telegram::Operation::NONE); // no post validation needed
@@ -656,7 +656,7 @@ uint16_t TxService::read_next_tx(const uint8_t offset, const uint8_t length) {
// check telegram, length, offset and overflow
// some telegrams only reply with one byte less, but have higher offsets (boiler 0x10)
// some reply with higher offset than requestes and have not_set values intermediate (boiler 0xEA)
// some reply with higher offset than requests and have not_set values intermediate (boiler 0xEA)
// We have th last byte received
if (offset + old_length >= telegram_last_->offset + telegram_last_->message_data[0]) {

View File

@@ -372,7 +372,7 @@ bool TemperatureSensor::get_value_info(JsonObject output, const char * cmd, cons
// match custom name or sensor ID
if (cmd == Helpers::toLower(sensor.name()) || cmd == Helpers::toLower(sensor.id())) {
get_value_json(output, sensor);
return Command::set_attirbute(output, cmd, attribute_s);
return Command::set_attribute(output, cmd, attribute_s);
}
}
@@ -491,7 +491,7 @@ void TemperatureSensor::publish_values(const bool force) {
if (Mqtt::discovery_type() == Mqtt::discoveryType::HOMEASSISTANT) {
config["val_tpl"] = (std::string) "{{" + val_obj + " if " + val_cond + " else -55}}";
} else {
config["val_tpl"] = (std::string) "{{" + val_obj + "}}"; // ommit value conditional Jinja2 template code
config["val_tpl"] = (std::string) "{{" + val_obj + "}}"; // omit value conditional Jinja2 template code
}
char uniq_s[70];

View File

@@ -315,7 +315,7 @@ bool WebCustomEntityService::get_value_info(JsonObject output, const char * cmd)
for (const auto & entity : *customEntityItems_) {
if (Helpers::toLower(entity.name) == cmd) {
get_value_json(output, entity);
return Command::set_attirbute(output, cmd, attribute_s);
return Command::set_attribute(output, cmd, attribute_s);
}
}
return false; // not found

View File

@@ -172,7 +172,7 @@ bool WebSchedulerService::get_value_info(JsonObject output, const char * cmd) {
for (const ScheduleItem & scheduleItem : *scheduleItems_) {
if (Helpers::toLower(scheduleItem.name) == cmd) {
get_value_json(output, scheduleItem);
return Command::set_attirbute(output, cmd, attribute_s);
return Command::set_attribute(output, cmd, attribute_s);
}
}