mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-09-13 21:54:07 +00:00
fix lint warnings from SonarQube
This commit is contained in:
+13
-13
@@ -1822,7 +1822,7 @@ void Boiler::process_HpPool(const std::shared_ptr<const Telegram> & telegram) {
|
||||
// Boiler(0x08) -> All(0x00), ?(0x04A2), data: 02 01 01 00 01 00
|
||||
// Boiler(0x08) -W-> Me(0x0B), HpInput(0x04A2), data: 20 07 06 01 00 (from #802)
|
||||
// see https://github.com/emsesp/EMS-ESP32/issues/2844#issuecomment-3689049155
|
||||
void Boiler::process_HpInput(const std::shared_ptr<const Telegram> & telegram) {
|
||||
void Boiler::process_HpInput(const std::shared_ptr<const Telegram> &) {
|
||||
}
|
||||
|
||||
// Heatpump inputs settings- type 0x486 (https://github.com/emsesp/EMS-ESP32/issues/600)
|
||||
@@ -1923,7 +1923,7 @@ void Boiler::process_UBASetPoints2(const std::shared_ptr<const Telegram> & teleg
|
||||
}
|
||||
|
||||
// 0x35 - not yet implemented, not readable, only for settings
|
||||
void Boiler::process_UBAFlags(const std::shared_ptr<const Telegram> & telegram) {
|
||||
void Boiler::process_UBAFlags(const std::shared_ptr<const Telegram> &) {
|
||||
}
|
||||
|
||||
// 0x1C
|
||||
@@ -1942,7 +1942,7 @@ void Boiler::process_UBAMaintenanceStatus(const std::shared_ptr<const Telegram>
|
||||
}
|
||||
|
||||
// 0xBF
|
||||
void Boiler::process_ErrorMessage(const std::shared_ptr<const Telegram> & telegram) {
|
||||
void Boiler::process_ErrorMessage(const std::shared_ptr<const Telegram> &) {
|
||||
EMSESP::send_read_request(0xC2, device_id(), 0, 20); // read last errorcode
|
||||
EMSESP::send_read_request(0xC6, device_id(), 0, 21); // read last errorcode
|
||||
}
|
||||
@@ -2494,7 +2494,7 @@ bool Boiler::set_ww_disinfect_temp(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
// Set the dhw priority
|
||||
bool Boiler::set_ww_prio(const char * value, const int8_t id) {
|
||||
bool Boiler::set_ww_prio(const char * value, const int8_t) {
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
@@ -2814,7 +2814,7 @@ bool Boiler::set_pump_delay(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
// set pump logic temperature
|
||||
bool Boiler::set_pumpOnTemp(const char * value, const int8_t id) {
|
||||
bool Boiler::set_pumpOnTemp(const char * value, const int8_t) {
|
||||
int v;
|
||||
if (!Helpers::value2temperature(value, v)) {
|
||||
return false;
|
||||
@@ -3037,7 +3037,7 @@ bool Boiler::set_reset(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Boiler::set_manDefrost(const char * value, const int8_t id) {
|
||||
bool Boiler::set_manDefrost(const char * value, const int8_t) {
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
@@ -3046,7 +3046,7 @@ bool Boiler::set_manDefrost(const char * value, const int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Boiler::set_chimneysweeper(const char * value, const int8_t id) {
|
||||
bool Boiler::set_chimneysweeper(const char * value, const int8_t) {
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
@@ -3325,7 +3325,7 @@ bool Boiler::set_auxLimit(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Boiler::set_auxHeaterSource(const char * value, const int8_t id) {
|
||||
bool Boiler::set_auxHeaterSource(const char * value, const int8_t) {
|
||||
uint8_t v;
|
||||
if (Helpers::value2enum(value, v, FL_(enum_auxHeaterSource))) {
|
||||
write_command(0x491, 0, v, 0x491);
|
||||
@@ -3409,7 +3409,7 @@ bool Boiler::set_hpMaxPower(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Boiler::set_pvMaxComp(const char * value, const int8_t id) {
|
||||
bool Boiler::set_pvMaxComp(const char * value, const int8_t) {
|
||||
float v;
|
||||
if (Helpers::value2float(value, v)) {
|
||||
write_command(0x484, 54, (uint8_t)(v * 10), 0x484);
|
||||
@@ -3437,7 +3437,7 @@ bool Boiler::set_hpPowerLimit(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Boiler::set_powerReduction(const char * value, const int8_t id) {
|
||||
bool Boiler::set_powerReduction(const char * value, const int8_t) {
|
||||
int v;
|
||||
if (Helpers::value2number(value, v)) {
|
||||
write_command(0x484, 64, v / 10, 0x484);
|
||||
@@ -3661,7 +3661,7 @@ bool Boiler::set_shutdown(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Boiler::set_pumpKickHour(const char * value, const int8_t id) {
|
||||
bool Boiler::set_pumpKickHour(const char * value, const int8_t) {
|
||||
int v;
|
||||
if (Helpers::value2number(value, v, 0, 23)) {
|
||||
write_command(0xEB, 0, v, 0xEB);
|
||||
@@ -3670,7 +3670,7 @@ bool Boiler::set_pumpKickHour(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Boiler::set_pumpKickDay(const char * value, const int8_t id) {
|
||||
bool Boiler::set_pumpKickDay(const char * value, const int8_t) {
|
||||
uint8_t v;
|
||||
if (Helpers::value2enum(value, v, FL_(enum_dayOfWeek))) {
|
||||
write_command(0xEB, 1, v + 1, 0xEB);
|
||||
@@ -3679,7 +3679,7 @@ bool Boiler::set_pumpKickDay(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Boiler::set_pumpKickDelay(const char * value, const int8_t id) {
|
||||
bool Boiler::set_pumpKickDelay(const char * value, const int8_t) {
|
||||
int v;
|
||||
if (Helpers::value2number(value, v, 0, 32767)) {
|
||||
uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)v};
|
||||
|
||||
@@ -278,7 +278,7 @@ bool Mixer::set_flowTempOffset(const char * value, const int8_t id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Mixer::set_pressure(const char * value, const int8_t id) {
|
||||
bool Mixer::set_pressure(const char * value, const int8_t) {
|
||||
int v;
|
||||
if (!Helpers::value2number(value, v)) {
|
||||
return false;
|
||||
@@ -288,7 +288,7 @@ bool Mixer::set_pressure(const char * value, const int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Mixer::set_wwprio(const char * value, const int8_t id) {
|
||||
bool Mixer::set_wwprio(const char * value, const int8_t) {
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
return false;
|
||||
|
||||
@@ -1122,7 +1122,7 @@ bool Solar::set_diffControl(const char * value, const int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Solar::set_solarHeatAssistOn(const char * value, const int8_t id) {
|
||||
bool Solar::set_solarHeatAssistOn(const char * value, const int8_t) {
|
||||
float t;
|
||||
if (!Helpers::value2float(value, t)) {
|
||||
return false;
|
||||
@@ -1131,7 +1131,7 @@ bool Solar::set_solarHeatAssistOn(const char * value, const int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Solar::set_solarHeatAssistOff(const char * value, const int8_t id) {
|
||||
bool Solar::set_solarHeatAssistOff(const char * value, const int8_t) {
|
||||
float t;
|
||||
if (!Helpers::value2float(value, t)) {
|
||||
return false;
|
||||
|
||||
+35
-27
@@ -1663,32 +1663,40 @@ void Thermostat::process_RC35Timer(const std::shared_ptr<const Telegram> & teleg
|
||||
has_update(telegram, hc->pause, 85); // time in hours
|
||||
has_update(telegram, hc->party, 86); // time in hours
|
||||
|
||||
if (telegram->message_length + telegram->offset >= 92 && telegram->offset <= 87) {
|
||||
char data[sizeof(hc->vacation) + 4]; // avoid compiler warning
|
||||
snprintf(data,
|
||||
sizeof(data),
|
||||
"%02d.%02d.%04d-%02d.%02d.%04d",
|
||||
telegram->message_data[87 - telegram->offset],
|
||||
telegram->message_data[88 - telegram->offset],
|
||||
telegram->message_data[89 - telegram->offset] + 2000,
|
||||
telegram->message_data[90 - telegram->offset],
|
||||
telegram->message_data[91 - telegram->offset],
|
||||
telegram->message_data[92 - telegram->offset] + 2000);
|
||||
has_update(hc->vacation, data, sizeof(hc->vacation));
|
||||
// vacation dates are in positions 87 to 92
|
||||
if (telegram->offset <= 87 && (telegram->offset + telegram->message_length) > 92) {
|
||||
const uint8_t pos = 87 - telegram->offset;
|
||||
if ((pos + 5) < EMS_MAX_TELEGRAM_MESSAGE_LENGTH) {
|
||||
char data[sizeof(hc->vacation) + 4]; // avoid compiler warning
|
||||
snprintf(data,
|
||||
sizeof(data),
|
||||
"%02d.%02d.%04d-%02d.%02d.%04d",
|
||||
telegram->message_data[pos],
|
||||
telegram->message_data[pos + 1],
|
||||
telegram->message_data[pos + 2] + 2000,
|
||||
telegram->message_data[pos + 3],
|
||||
telegram->message_data[pos + 4],
|
||||
telegram->message_data[pos + 5] + 2000);
|
||||
has_update(hc->vacation, data, sizeof(hc->vacation));
|
||||
}
|
||||
}
|
||||
|
||||
if (telegram->message_length + telegram->offset >= 98 && telegram->offset <= 93) {
|
||||
char data[sizeof(hc->holiday) + 4]; // avoid compiler warning
|
||||
snprintf(data,
|
||||
sizeof(data),
|
||||
"%02d.%02d.%04d-%02d.%02d.%04d",
|
||||
telegram->message_data[93 - telegram->offset],
|
||||
telegram->message_data[94 - telegram->offset],
|
||||
telegram->message_data[95 - telegram->offset] + 2000,
|
||||
telegram->message_data[96 - telegram->offset],
|
||||
telegram->message_data[97 - telegram->offset],
|
||||
telegram->message_data[98 - telegram->offset] + 2000);
|
||||
has_update(hc->holiday, data, sizeof(hc->holiday));
|
||||
// holiday dates are in positions 93 to 98
|
||||
if (telegram->offset <= 93 && (telegram->offset + telegram->message_length) > 98) {
|
||||
const uint8_t pos = 93 - telegram->offset;
|
||||
if ((pos + 5) < EMS_MAX_TELEGRAM_MESSAGE_LENGTH) {
|
||||
char data[sizeof(hc->holiday) + 4]; // avoid compiler warning
|
||||
snprintf(data,
|
||||
sizeof(data),
|
||||
"%02d.%02d.%04d-%02d.%02d.%04d",
|
||||
telegram->message_data[pos],
|
||||
telegram->message_data[pos + 1],
|
||||
telegram->message_data[pos + 2] + 2000,
|
||||
telegram->message_data[pos + 3],
|
||||
telegram->message_data[pos + 4],
|
||||
telegram->message_data[pos + 5] + 2000);
|
||||
has_update(hc->holiday, data, sizeof(hc->holiday));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1862,7 +1870,7 @@ void Thermostat::process_RCErrorMessage(const std::shared_ptr<const Telegram> &
|
||||
}
|
||||
|
||||
// 0xBF
|
||||
void Thermostat::process_ErrorMessageBF(const std::shared_ptr<const Telegram> & telegram) {
|
||||
void Thermostat::process_ErrorMessageBF(const std::shared_ptr<const Telegram> &) {
|
||||
EMSESP::send_read_request(0xC0, device_id(), 0, 20); // read last errorcode
|
||||
}
|
||||
|
||||
@@ -2338,7 +2346,7 @@ bool Thermostat::set_damping(const char * value, const int8_t id) {
|
||||
}
|
||||
|
||||
// 0x0241- Set solar
|
||||
bool Thermostat::set_solar(const char * value, const int8_t id) {
|
||||
bool Thermostat::set_solar(const char * value, const int8_t) {
|
||||
bool b;
|
||||
if (Helpers::value2bool(value, b)) {
|
||||
if (model() == EMSdevice::EMS_DEVICE_FLAG_RC100) {
|
||||
@@ -3034,7 +3042,7 @@ bool Thermostat::set_party(const char * value, const int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Thermostat::set_absent(const char * value, const int8_t id) {
|
||||
bool Thermostat::set_absent(const char * value, const int8_t) {
|
||||
bool b;
|
||||
if (Helpers::value2bool(value, b)) {
|
||||
write_command(0x16E, 0, b ? 0xFF : 0, 0x16E);
|
||||
|
||||
@@ -87,7 +87,7 @@ void Ventilation::process_ModeMessage(const std::shared_ptr<const Telegram> & te
|
||||
}
|
||||
|
||||
// message 0x0587, data: 00 00 64 00 64 0A 00 01 54 01 00 01 00 00 00 46 00 00 00 02 00 A3 00 A3
|
||||
void Ventilation::process_BypassMessage(const std::shared_ptr<const Telegram> & telegram) {
|
||||
void Ventilation::process_BypassMessage(const std::shared_ptr<const Telegram> &) {
|
||||
// has_update(telegram, bypass_closing, 0);
|
||||
// has_update(telegram, bypass_opening, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user