formatting brackets

This commit is contained in:
Proddy
2022-09-28 21:46:12 +02:00
parent fe0a855618
commit 9b619216cb
16 changed files with 176 additions and 176 deletions

View File

@@ -2081,7 +2081,7 @@ bool Boiler::set_ww_circulation_mode(const char * value, const int8_t id) {
}
if (v < 7) {
// LOG_INFO(("Setting dhw circulation mode %dx3min"), v);
// LOG_INFO("Setting dhw circulation mode %dx3min", v);
} else if (v == 7) {
// LOG_INFO("Setting dhw circulation mode continuous");
} else {
@@ -2142,11 +2142,11 @@ bool Boiler::set_maintenance(const char * value, const int8_t id) {
uint8_t month = (value[3] - '0') * 10 + (value[4] - '0');
uint8_t year = (uint8_t)(Helpers::atoint(&value[6]) - 2000);
if (day > 0 && day < 32 && month > 0 && month < 13) {
LOG_INFO(("Setting maintenance date to %02d.%02d.%04d"), day, month, year + 2000);
LOG_INFO("Setting maintenance date to %02d.%02d.%04d", day, month, year + 2000);
uint8_t data[5] = {2, (uint8_t)(maintenanceTime_ / 100), day, month, year};
write_command(0x15, 0, data, 5, 0x15);
} else {
LOG_WARNING(("Setting maintenance: wrong format %d.%d.%d"), day, month, year + 2000);
LOG_WARNING("Setting maintenance: wrong format %d.%d.%d", day, month, year + 2000);
return false;
}
return true;
@@ -2155,7 +2155,7 @@ bool Boiler::set_maintenance(const char * value, const int8_t id) {
int hrs;
if (Helpers::value2number(value, hrs)) {
if (hrs > 99 && hrs < 25600) {
LOG_INFO(("Setting maintenance time %d hours"), hrs);
LOG_INFO("Setting maintenance time %d hours", hrs);
uint8_t data[2] = {1, (uint8_t)(hrs / 100)};
write_command(0x15, 0, data, 2, 0x15);
return true;
@@ -2164,7 +2164,7 @@ bool Boiler::set_maintenance(const char * value, const int8_t id) {
uint8_t num;
if (Helpers::value2enum(value, num, FL_(enum_off_time_date_manual))) {
LOG_INFO(("Setting maintenance type to %s"), value);
LOG_INFO("Setting maintenance type to %s", value);
write_command(0x15, 0, num, 0x15);
return true;
}
@@ -2177,7 +2177,7 @@ bool Boiler::set_maintenancetime(const char * value, const int8_t id) {
int hrs;
if (Helpers::value2number(value, hrs)) {
if (hrs > 99 && hrs < 25600) {
LOG_INFO(("Setting maintenance time %d hours"), hrs);
LOG_INFO("Setting maintenance time %d hours", hrs);
uint8_t data[2] = {1, (uint8_t)(hrs / 100)};
write_command(0x15, 0, data, 2, 0x15);
return true;
@@ -2194,11 +2194,11 @@ bool Boiler::set_maintenancedate(const char * value, const int8_t id) {
uint8_t month = (value[3] - '0') * 10 + (value[4] - '0');
uint8_t year = (uint8_t)(Helpers::atoint(&value[6]) - 2000);
if (day > 0 && day < 32 && month > 0 && month < 13) {
LOG_INFO(("Setting maintenance date to %02d.%02d.%04d"), day, month, year + 2000);
LOG_INFO("Setting maintenance date to %02d.%02d.%04d", day, month, year + 2000);
uint8_t data[5] = {2, (uint8_t)(maintenanceTime_ / 100), day, month, year};
write_command(0x15, 0, data, 5, 0x15);
} else {
LOG_WARNING(("Setting maintenance: wrong format %d.%d.%d"), day, month, year + 2000);
LOG_WARNING("Setting maintenance: wrong format %d.%d.%d", day, month, year + 2000);
return false;
}
return true;
@@ -2215,7 +2215,7 @@ bool Boiler::set_pool_temp(const char * value, const int8_t id) {
return false;
}
uint8_t v2 = ((v * 2) + 0.5);
// LOG_INFO(("Setting pool temperature to %d.%d C"), v2 >> 1, (v2 & 0x01) * 5);
// LOG_INFO("Setting pool temperature to %d.%d C", v2 >> 1, (v2 & 0x01) * 5);
write_command(0x48A, 1, v2, 0x48A);
return true;

View File

@@ -664,7 +664,7 @@ void Solar::process_SM100ParamCfg(std::shared_ptr<const Telegram> telegram) {
telegram->read_value(max, 13);
telegram->read_value(cur, 17);
// LOG_DEBUG(("SM100ParamCfg param=0x%04X, offset=%d, min=%d, default=%d, max=%d, current=%d"), t_id, of, min, def, max, cur));
// LOG_DEBUG("SM100ParamCfg param=0x%04X, offset=%d, min=%d, default=%d, max=%d, current=%d", t_id, of, min, def, max, cur));
}
/*

View File

@@ -1548,7 +1548,7 @@ bool Thermostat::set_calinttemp(const char * value, const int8_t id) {
}
auto t = (int8_t)(ct * 10);
LOG_DEBUG(("Calibrating internal temperature to %d.%d C"), t / 10, t < 0 ? -t % 10 : t % 10);
LOG_DEBUG("Calibrating internal temperature to %d.%d C", t / 10, t < 0 ? -t % 10 : t % 10);
if (model() == EMS_DEVICE_FLAG_RC10) {
write_command(0xB0, 0, t, 0xB0);
@@ -2157,11 +2157,11 @@ bool Thermostat::set_datetime(const char * value, const int8_t id) {
return false;
}
if (data[1] == 0 || data[1] > 12 || data[2] > 23 || data[3] == 0 || data[3] > 31 || data[4] > 59 || data[5] > 59 || data[6] > 6 || data[7] > 3) {
LOG_WARNING(("Invalid date/time: %02d.%02d.2%03d-%02d:%02d:%02d-%d-%d"), data[3], data[1], data[0], data[2], data[4], data[5], data[6], data[7]);
LOG_WARNING("Invalid date/time: %02d.%02d.2%03d-%02d:%02d:%02d-%d-%d", data[3], data[1], data[0], data[2], data[4], data[5], data[6], data[7]);
return false;
}
// LOG_INFO(("Setting date and time: %02d.%02d.2%03d-%02d:%02d:%02d-%d-%d"), data[3], data[1], data[0], data[2], data[4], data[5], data[6], data[7]);
// LOG_INFO("Setting date and time: %02d.%02d.2%03d-%02d:%02d:%02d-%d-%d", data[3], data[1], data[0], data[2], data[4], data[5], data[6], data[7]);
write_command(EMS_TYPE_time, 0, data, 8, EMS_TYPE_time);
return true;
@@ -2634,7 +2634,7 @@ bool Thermostat::set_switchtime(const char * value, const uint16_t type_id, char
day = 7;
on = 7;
time = 0x90;
// LOG_INFO(("switchtime %02d cleared"), no);
// LOG_INFO("switchtime %02d cleared", no);
}
} else {
if (strlen(value) > 1) {
@@ -2675,7 +2675,7 @@ bool Thermostat::set_switchtime(const char * value, const uint16_t type_id, char
day = 7;
on = 7;
time = 0x90;
// LOG_INFO(("switchtime %02d cleared"), no);
// LOG_INFO("switchtime %02d cleared", no);
}
}
uint8_t data[2] = {0xE7, 0x90}; // unset switchtime
@@ -2691,8 +2691,8 @@ bool Thermostat::set_switchtime(const char * value, const uint16_t type_id, char
max_on = 1;
}
if (no > 41 || time > 0x90 || ((on < min_on || on > max_on) && on != 7)) {
// LOG_WARNING(("Setting switchtime: Invalid data: %s"), value);
// LOG_WARNING(("Setting switchtime: Invalid data: %02d.%1d.0x%02X.%1d"), no, day, time, on);
// LOG_WARNING("Setting switchtime: Invalid data: %s", value);
// LOG_WARNING("Setting switchtime: Invalid data: %02d.%1d.0x%02X.%1d", no, day, time, on);
return false;
}
if (data[0] != 0xE7) {