mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 09:19:51 +03:00
remove unused brackets and inits
This commit is contained in:
@@ -1693,7 +1693,7 @@ bool Boiler::set_tempDiffBoiler(const char * value, const int8_t id) {
|
||||
|
||||
// Set the dhw temperature 0x33/0x35 or 0xEA
|
||||
bool Boiler::set_ww_temp(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1713,7 +1713,7 @@ bool Boiler::set_ww_temp(const char * value, const int8_t id) {
|
||||
|
||||
// Set the lower dhw temperature 0xEA
|
||||
bool Boiler::set_ww_temp_low(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1735,7 +1735,7 @@ bool Boiler::set_ww_temp_single(const char * value, const int8_t id) {
|
||||
|
||||
// Set the dhw disinfection temperature
|
||||
bool Boiler::set_ww_disinfect_temp(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1751,7 +1751,7 @@ bool Boiler::set_ww_disinfect_temp(const char * value, const int8_t id) {
|
||||
|
||||
// flow temp
|
||||
bool Boiler::set_flow_temp(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1766,7 +1766,7 @@ bool Boiler::set_flow_temp(const char * value, const int8_t id) {
|
||||
|
||||
// set selected burner power
|
||||
bool Boiler::set_burn_power(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1778,7 +1778,7 @@ bool Boiler::set_burn_power(const char * value, const int8_t id) {
|
||||
|
||||
// Set the dhw flow temperature offset 0x33
|
||||
bool Boiler::set_ww_flowTempOffset(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v, true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1794,7 +1794,7 @@ bool Boiler::set_ww_flowTempOffset(const char * value, const int8_t id) {
|
||||
|
||||
// set heating activated
|
||||
bool Boiler::set_heating_activated(const char * value, const int8_t id) {
|
||||
bool v = false;
|
||||
bool v;
|
||||
if (!Helpers::value2bool(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1810,7 +1810,7 @@ bool Boiler::set_heating_activated(const char * value, const int8_t id) {
|
||||
|
||||
// set heating maximum temperature
|
||||
bool Boiler::set_heating_temp(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1826,7 +1826,7 @@ bool Boiler::set_heating_temp(const char * value, const int8_t id) {
|
||||
|
||||
// set min boiler output
|
||||
bool Boiler::set_min_power(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1842,7 +1842,7 @@ bool Boiler::set_min_power(const char * value, const int8_t id) {
|
||||
|
||||
// set max boiler output
|
||||
bool Boiler::set_max_power(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1858,7 +1858,7 @@ bool Boiler::set_max_power(const char * value, const int8_t id) {
|
||||
|
||||
// set ww on hysteresis
|
||||
bool Boiler::set_ww_hyst_on(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v, true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1874,7 +1874,7 @@ bool Boiler::set_ww_hyst_on(const char * value, const int8_t id) {
|
||||
|
||||
// set ww off hysteresis
|
||||
bool Boiler::set_ww_hyst_off(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v, true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1890,7 +1890,7 @@ bool Boiler::set_ww_hyst_off(const char * value, const int8_t id) {
|
||||
|
||||
// set ww charge optimization
|
||||
bool Boiler::set_ww_chargeOptimization(const char * value, const int8_t id) {
|
||||
bool v = false;
|
||||
bool v;
|
||||
if (!Helpers::value2bool(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1907,7 +1907,7 @@ bool Boiler::set_ww_chargeOptimization(const char * value, const int8_t id) {
|
||||
|
||||
// set dhw max power
|
||||
bool Boiler::set_ww_maxpower(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1919,7 +1919,7 @@ bool Boiler::set_ww_maxpower(const char * value, const int8_t id) {
|
||||
|
||||
// set dhw maximum temperature
|
||||
bool Boiler::set_ww_maxtemp(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1931,7 +1931,7 @@ bool Boiler::set_ww_maxtemp(const char * value, const int8_t id) {
|
||||
|
||||
// set min pump modulation
|
||||
bool Boiler::set_min_pump(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1947,7 +1947,7 @@ bool Boiler::set_min_pump(const char * value, const int8_t id) {
|
||||
|
||||
// set max pump modulation
|
||||
bool Boiler::set_max_pump(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1963,7 +1963,7 @@ bool Boiler::set_max_pump(const char * value, const int8_t id) {
|
||||
|
||||
// set boiler on hysteresis
|
||||
bool Boiler::set_hyst_on(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v, true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1979,7 +1979,7 @@ bool Boiler::set_hyst_on(const char * value, const int8_t id) {
|
||||
|
||||
// set boiler off hysteresis
|
||||
bool Boiler::set_hyst_off(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v, true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1995,7 +1995,7 @@ bool Boiler::set_hyst_off(const char * value, const int8_t id) {
|
||||
|
||||
// set min burner period
|
||||
bool Boiler::set_burn_period(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2011,7 +2011,7 @@ bool Boiler::set_burn_period(const char * value, const int8_t id) {
|
||||
|
||||
// set pump delay
|
||||
bool Boiler::set_pump_delay(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2047,7 +2047,7 @@ bool Boiler::set_ww_mode(const char * value, const int8_t id) {
|
||||
|
||||
// turn on/off dhw
|
||||
bool Boiler::set_ww_activated(const char * value, const int8_t id) {
|
||||
bool v = false;
|
||||
bool v;
|
||||
if (!Helpers::value2bool(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2071,7 +2071,7 @@ bool Boiler::set_tapwarmwater_activated(const char * value, const int8_t id) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
bool v = false;
|
||||
bool v;
|
||||
if (!Helpers::value2bool(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2106,7 +2106,7 @@ bool Boiler::set_tapwarmwater_activated(const char * value, const int8_t id) {
|
||||
// true = on, false = off
|
||||
// See also https://github.com/emsesp/EMS-ESP/issues/341#issuecomment-596245458 for Junkers
|
||||
bool Boiler::set_ww_onetime(const char * value, const int8_t id) {
|
||||
bool v = false;
|
||||
bool v;
|
||||
if (!Helpers::value2bool(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2122,7 +2122,7 @@ bool Boiler::set_ww_onetime(const char * value, const int8_t id) {
|
||||
|
||||
// starting dhw disinfect, set to off seems not working
|
||||
bool Boiler::set_ww_disinfect(const char * value, const int8_t id) {
|
||||
bool v = false;
|
||||
bool v;
|
||||
if (!Helpers::value2bool(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2139,7 +2139,7 @@ bool Boiler::set_ww_disinfect(const char * value, const int8_t id) {
|
||||
// Activate / De-activate circulation of dhw 0x35
|
||||
// true = on, false = off
|
||||
bool Boiler::set_ww_circulation(const char * value, const int8_t id) {
|
||||
bool v = false;
|
||||
bool v;
|
||||
if (!Helpers::value2bool(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2155,7 +2155,7 @@ bool Boiler::set_ww_circulation(const char * value, const int8_t id) {
|
||||
|
||||
// configuration of dhw circulation pump
|
||||
bool Boiler::set_ww_circulation_pump(const char * value, const int8_t id) {
|
||||
bool v = false;
|
||||
bool v;
|
||||
if (!Helpers::value2bool(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2172,7 +2172,7 @@ bool Boiler::set_ww_circulation_pump(const char * value, const int8_t id) {
|
||||
// Set the mode of circulation, 1x3min, ... 6x3min, continuous
|
||||
// true = on, false = off
|
||||
bool Boiler::set_ww_circulation_mode(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2307,7 +2307,7 @@ bool Boiler::set_maintenancedate(const char * value, const int8_t id) {
|
||||
|
||||
// Set the pool temperature 0x48A
|
||||
bool Boiler::set_pool_temp(const char * value, const int8_t id) {
|
||||
float v = 0;
|
||||
float v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2319,7 +2319,7 @@ bool Boiler::set_pool_temp(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Boiler::set_emergency_temp(const char * value, const int8_t id) {
|
||||
int v = 0;
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2330,7 +2330,7 @@ bool Boiler::set_emergency_temp(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Boiler::set_emergency_ops(const char * value, const int8_t id) {
|
||||
bool v = false;
|
||||
bool v;
|
||||
if (!Helpers::value2bool(value, v)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ bool Mixer::set_setValveTime(const char * value, const int8_t id) {
|
||||
|
||||
bool Mixer::set_wwMaxTemp(const char * value, const int8_t id) {
|
||||
uint8_t wwc = device_id() - 0x28;
|
||||
float v = 0;
|
||||
float v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -399,7 +399,7 @@ bool Mixer::set_wwMaxTemp(const char * value, const int8_t id) {
|
||||
|
||||
bool Mixer::set_wwDiffTemp(const char * value, const int8_t id) {
|
||||
uint8_t wwc = device_id() - 0x28;
|
||||
float v = 0;
|
||||
float v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -409,7 +409,7 @@ bool Mixer::set_wwDiffTemp(const char * value, const int8_t id) {
|
||||
|
||||
bool Mixer::set_wwReducedTemp(const char * value, const int8_t id) {
|
||||
uint8_t wwc = device_id() - 0x28;
|
||||
float v = 0;
|
||||
float v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -419,7 +419,7 @@ bool Mixer::set_wwReducedTemp(const char * value, const int8_t id) {
|
||||
|
||||
bool Mixer::set_wwRequiredTemp(const char * value, const int8_t id) {
|
||||
uint8_t wwc = device_id() - 0x28;
|
||||
float v = 0;
|
||||
float v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -428,7 +428,7 @@ bool Mixer::set_wwRequiredTemp(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Mixer::set_wwDisinfectionTemp(const char * value, const int8_t id) {
|
||||
float v = 0;
|
||||
float v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
}
|
||||
@@ -442,7 +442,7 @@ bool Mixer::set_wwDisinfectionTemp(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Mixer::set_wwCircPump(const char * value, const int8_t id) {
|
||||
bool v = false;
|
||||
bool v;
|
||||
if (!Helpers::value2bool(value, v)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -680,12 +680,6 @@ void Thermostat::process_JunkersSet(std::shared_ptr<const Telegram> telegram) {
|
||||
return;
|
||||
}
|
||||
|
||||
has_update(telegram, hc->daytemp, 17); // is * 2
|
||||
has_update(telegram, hc->nighttemp, 16); // is * 2
|
||||
has_update(telegram, hc->nofrosttemp, 15); // is * 2
|
||||
has_update(telegram, hc->control, 1); // remote: 0-off, 1-FB10, 2-FB100
|
||||
has_enumupdate(telegram, hc->program, 13, 1); // 1-6: 1 = A, 2 = B,...
|
||||
has_enumupdate(telegram, hc->mode, 14, 1); // 0 = nofrost, 1 = eco, 2 = heat, 3 = auto
|
||||
has_update(telegram, hc->daytemp, 17); // is * 2
|
||||
has_update(telegram, hc->nighttemp, 16); // is * 2
|
||||
has_update(telegram, hc->nofrosttemp, 15); // is * 2
|
||||
@@ -1517,7 +1511,7 @@ bool Thermostat::set_tempDiffBoiler(const char * value, const int8_t id) {
|
||||
|
||||
// 0xA5 - Set minimum external temperature
|
||||
bool Thermostat::set_minexttemp(const char * value, const int8_t id) {
|
||||
int mt = 0;
|
||||
int mt;
|
||||
if (!Helpers::value2temperature(value, mt)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1535,7 +1529,7 @@ bool Thermostat::set_minexttemp(const char * value, const int8_t id) {
|
||||
|
||||
// 0xA5/0xA7 - Clock offset
|
||||
bool Thermostat::set_clockoffset(const char * value, const int8_t id) {
|
||||
int co = 0;
|
||||
int co;
|
||||
if (!Helpers::value2number(value, co)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1551,7 +1545,7 @@ bool Thermostat::set_clockoffset(const char * value, const int8_t id) {
|
||||
|
||||
// 0xA5/0xA7 - Calibrate internal temperature
|
||||
bool Thermostat::set_calinttemp(const char * value, const int8_t id) {
|
||||
float ct = 0;
|
||||
float ct;
|
||||
if (!Helpers::value2temperature(value, ct, true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1588,7 +1582,7 @@ bool Thermostat::set_display(const char * value, const int8_t id) {
|
||||
|
||||
// 0xA7 - Set Screen brightness
|
||||
bool Thermostat::set_brightness(const char * value, const int8_t id) {
|
||||
int bo = 0;
|
||||
int bo;
|
||||
if (!Helpers::value2number(value, bo, -15, 15)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1599,7 +1593,7 @@ bool Thermostat::set_brightness(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Thermostat::set_remotetemp(const char * value, const int8_t id) {
|
||||
float f = 0;
|
||||
float f;
|
||||
if (!Helpers::value2temperature(value, f)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1623,7 +1617,7 @@ bool Thermostat::set_remotetemp(const char * value, const int8_t id) {
|
||||
|
||||
// 0xA5/0xA7 - Set the building settings
|
||||
bool Thermostat::set_building(const char * value, const int8_t id) {
|
||||
uint8_t bd = 0;
|
||||
uint8_t bd;
|
||||
if (!Helpers::value2enum(value, bd, FL_(enum_ibaBuildingType))) {
|
||||
return false;
|
||||
}
|
||||
@@ -1641,7 +1635,7 @@ bool Thermostat::set_building(const char * value, const int8_t id) {
|
||||
|
||||
// 0xB0/0xA7 - Set RC10 heating pid
|
||||
bool Thermostat::set_heatingpid(const char * value, const int8_t id) {
|
||||
uint8_t pid = 0;
|
||||
uint8_t pid;
|
||||
if (!Helpers::value2enum(value, pid, FL_(enum_PID))) {
|
||||
return false;
|
||||
}
|
||||
@@ -1674,7 +1668,7 @@ bool Thermostat::set_damping(const char * value, const int8_t id) {
|
||||
|
||||
// 0xA5/0xA7 Set the language settings
|
||||
bool Thermostat::set_language(const char * value, const int8_t id) {
|
||||
uint8_t lg = 0;
|
||||
uint8_t lg;
|
||||
|
||||
if (model() == EMS_DEVICE_FLAG_RC30) {
|
||||
if (!Helpers::value2enum(value, lg, FL_(enum_ibaLanguage_RC30))) {
|
||||
@@ -1699,7 +1693,7 @@ bool Thermostat::set_control(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t ctrl = 0;
|
||||
uint8_t ctrl;
|
||||
if (model() == EMS_DEVICE_FLAG_JUNKERS && !has_flags(EMS_DEVICE_FLAG_JUNKERS_OLD)) {
|
||||
if (Helpers::value2enum(value, ctrl, FL_(enum_j_control))) {
|
||||
write_command(set_typeids[hc->hc()], 1, ctrl);
|
||||
@@ -1721,7 +1715,7 @@ bool Thermostat::set_roomsensor(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t ctrl = 0;
|
||||
uint8_t ctrl;
|
||||
if (model() == EMS_DEVICE_FLAG_JUNKERS && !has_flags(EMS_DEVICE_FLAG_JUNKERS_OLD)) {
|
||||
if (Helpers::value2enum(value, ctrl, FL_(enum_roomsensor))) {
|
||||
write_command(set_typeids[hc->hc()], 9, ctrl + 1);
|
||||
@@ -1733,7 +1727,7 @@ bool Thermostat::set_roomsensor(const char * value, const int8_t id) {
|
||||
|
||||
// sets the thermostat ww working mode, where mode is a string, ems and ems+
|
||||
bool Thermostat::set_wwmode(const char * value, const int8_t id) {
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
|
||||
if (model() == EMS_DEVICE_FLAG_RC10) {
|
||||
if (!Helpers::value2enum(value, set, FL_(enum_wwMode3))) {
|
||||
@@ -1762,7 +1756,7 @@ bool Thermostat::set_wwmode(const char * value, const int8_t id) {
|
||||
|
||||
//Set ww when thermostat mode is off (RC30)
|
||||
bool Thermostat::set_wwwhenmodeoff(const char * value, const int8_t id) {
|
||||
bool b = false;
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1786,7 +1780,7 @@ bool Thermostat::set_wwtemp(const char * value, const int8_t id) {
|
||||
|
||||
// Set ww low temperature, ems+
|
||||
bool Thermostat::set_wwtemplow(const char * value, const int8_t id) {
|
||||
int t = 0;
|
||||
int t;
|
||||
if (!Helpers::value2temperature(value, t)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1798,7 +1792,7 @@ bool Thermostat::set_wwtemplow(const char * value, const int8_t id) {
|
||||
|
||||
// Set ww charge RC300, ems+
|
||||
bool Thermostat::set_wwcharge(const char * value, const int8_t id) {
|
||||
bool b = false;
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1814,7 +1808,7 @@ bool Thermostat::set_wwcharge(const char * value, const int8_t id) {
|
||||
|
||||
// Set ww charge duration in steps of 15 min, ems+
|
||||
bool Thermostat::set_wwchargeduration(const char * value, const int8_t id) {
|
||||
int t = 0xFF;
|
||||
int t;
|
||||
if (!Helpers::value2number(value, t)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1848,7 +1842,7 @@ bool Thermostat::set_wwprio(const char * value, const int8_t id) {
|
||||
|
||||
// sets the thermostat ww circulation working mode, where mode is a string
|
||||
bool Thermostat::set_wwcircmode(const char * value, const int8_t id) {
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
|
||||
if ((model() == EMS_DEVICE_FLAG_RC300) || (model() == EMS_DEVICE_FLAG_RC100)) {
|
||||
if (!Helpers::value2enum(value, set, FL_(enum_wwCircMode))) {
|
||||
@@ -1867,7 +1861,7 @@ bool Thermostat::set_wwcircmode(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Thermostat::set_wwDailyHeating(const char * value, const int8_t id) {
|
||||
bool b = false;
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1894,7 +1888,7 @@ bool Thermostat::set_wwDailyHeatTime(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Thermostat::set_wwDisinfect(const char * value, const int8_t id) {
|
||||
bool b = false;
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1911,7 +1905,7 @@ bool Thermostat::set_wwDisinfect(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Thermostat::set_wwDisinfectDay(const char * value, const int8_t id) {
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
if (!Helpers::value2enum(value, set, FL_(enum_dayOfWeek))) {
|
||||
return false;
|
||||
}
|
||||
@@ -1950,7 +1944,7 @@ bool Thermostat::set_wwDisinfectHour(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Thermostat::set_wwMaxTemp(const char * value, const int8_t id) {
|
||||
int t = 0;
|
||||
int t;
|
||||
if (!Helpers::value2temperature(value, t, false, 0, 90)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1973,7 +1967,7 @@ bool Thermostat::set_wwOneTimeKey(const char * value, const int8_t id) {
|
||||
|
||||
// for RC10, 0xB0 or RC30, 0xA7
|
||||
bool Thermostat::set_backlight(const char * value, const int8_t id) {
|
||||
bool b = false;
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1988,7 +1982,7 @@ bool Thermostat::set_backlight(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Thermostat::set_autodst(const char * value, const int8_t id) {
|
||||
bool b = false;
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1999,7 +1993,7 @@ bool Thermostat::set_autodst(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Thermostat::set_preheating(const char * value, const int8_t id) {
|
||||
bool b = false;
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2010,7 +2004,7 @@ bool Thermostat::set_preheating(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Thermostat::set_offtemp(const char * value, const int8_t id) {
|
||||
int ot = 0;
|
||||
int ot;
|
||||
if (!Helpers::value2temperature(value, ot, true)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2022,7 +2016,7 @@ bool Thermostat::set_offtemp(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Thermostat::set_mixingvalves(const char * value, const int8_t id) {
|
||||
int m = 0;
|
||||
int m;
|
||||
if (!Helpers::value2number(value, m, 0, 2)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2033,7 +2027,7 @@ bool Thermostat::set_mixingvalves(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Thermostat::set_wwProgMode(const char * value, const int8_t id) {
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
if (!Helpers::value2enum(value, set, FL_(enum_wwProgMode))) {
|
||||
return false;
|
||||
}
|
||||
@@ -2044,7 +2038,7 @@ bool Thermostat::set_wwProgMode(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
bool Thermostat::set_wwCircProg(const char * value, const int8_t id) {
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
if (!Helpers::value2enum(value, set, FL_(enum_wwProgMode))) {
|
||||
return false;
|
||||
}
|
||||
@@ -2210,7 +2204,7 @@ bool Thermostat::set_roominfl_factor(const char * value, const int8_t id) {
|
||||
if (hc == nullptr) {
|
||||
return false;
|
||||
}
|
||||
float val = 0;
|
||||
float val;
|
||||
if (!Helpers::value2float(value, val)) {
|
||||
return false;
|
||||
}
|
||||
@@ -2418,7 +2412,7 @@ bool Thermostat::set_summermode(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
|
||||
if (is_fetch(summer2_typeids[hc->hc()])) {
|
||||
if ((hc->statusbyte & 1) && Helpers::value2enum(value, set, FL_(enum_summermode))) {
|
||||
@@ -2444,7 +2438,7 @@ bool Thermostat::set_fastheatup(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int set = 0;
|
||||
int set;
|
||||
|
||||
if (!Helpers::value2number(value, set)) {
|
||||
return false;
|
||||
@@ -2462,7 +2456,7 @@ bool Thermostat::set_switchonoptimization(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool b = false;
|
||||
bool b;
|
||||
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
@@ -2480,7 +2474,7 @@ bool Thermostat::set_reducemode(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
if (model() == EMS_DEVICE_FLAG_RC300 || model() == EMS_DEVICE_FLAG_RC100) {
|
||||
if (Helpers::value2enum(value, set, FL_(enum_reducemode1))) {
|
||||
write_command(set_typeids[hc->hc()], 5, set + 1, set_typeids[hc->hc()]);
|
||||
@@ -2504,7 +2498,7 @@ bool Thermostat::set_vacreducemode(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
if (!Helpers::value2enum(value, set, FL_(enum_reducemode))) {
|
||||
return false;
|
||||
}
|
||||
@@ -2520,7 +2514,7 @@ bool Thermostat::set_nofrostmode(const char * value, const int8_t id) {
|
||||
if (hc == nullptr) {
|
||||
return false;
|
||||
}
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
if (model() == EMS_DEVICE_FLAG_RC300 || model() == EMS_DEVICE_FLAG_RC100) {
|
||||
if (Helpers::value2enum(value, set, FL_(enum_nofrostmode1))) {
|
||||
write_command(curve_typeids[hc->hc()], 5, set + 1, curve_typeids[hc->hc()]);
|
||||
@@ -2543,7 +2537,7 @@ bool Thermostat::set_heatingtype(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
if (Helpers::value2enum(value, set, FL_(enum_heatingtype))) {
|
||||
if ((model() == EMS_DEVICE_FLAG_RC20_N) || (model() == EMS_DEVICE_FLAG_RC25)) {
|
||||
write_command(set_typeids[hc->hc()], 0, set, set_typeids[hc->hc()]);
|
||||
@@ -2568,7 +2562,7 @@ bool Thermostat::set_controlmode(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
if (model() == EMS_DEVICE_FLAG_RC100) {
|
||||
if (Helpers::value2enum(value, set, FL_(enum_controlmode))) {
|
||||
write_command(curve_typeids[hc->hc()], 0, set, curve_typeids[hc->hc()]);
|
||||
@@ -2820,7 +2814,7 @@ bool Thermostat::set_program(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t set = 0xFF;
|
||||
uint8_t set;
|
||||
if ((model() == EMS_DEVICE_FLAG_RC20_N) || (model() == EMS_DEVICE_FLAG_RC25)) {
|
||||
if (Helpers::value2enum(value, set, FL_(enum_progMode3))) {
|
||||
write_command(set_typeids[hc->hc()], 11, set + 1, set_typeids[hc->hc()]);
|
||||
@@ -3258,7 +3252,7 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co
|
||||
}
|
||||
|
||||
bool Thermostat::set_temperature_value(const char * value, const int8_t id, const uint8_t mode, bool relative) {
|
||||
float f = 0;
|
||||
float f;
|
||||
uint8_t hc_num = (id == -1) ? AUTO_HEATING_CIRCUIT : id;
|
||||
if (Helpers::value2temperature(value, f, relative)) {
|
||||
return set_temperature(f, mode, hc_num);
|
||||
|
||||
Reference in New Issue
Block a user