mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-10 09:49:54 +03:00
auto formatting with clang
This commit is contained in:
@@ -87,9 +87,9 @@ class Boiler : public EMSdevice {
|
||||
uint32_t wwWorkM_; // DHW minutes
|
||||
int8_t wwHystOn_;
|
||||
int8_t wwHystOff_;
|
||||
uint8_t wwTapActivated_; // maintenance-mode to switch DHW off
|
||||
uint16_t wwMixerTemp_; // mixing temperature
|
||||
uint16_t wwCylMiddleTemp_; // Cyl middle temperature (TS3)
|
||||
uint8_t wwTapActivated_; // maintenance-mode to switch DHW off
|
||||
uint16_t wwMixerTemp_; // mixing temperature
|
||||
uint16_t wwCylMiddleTemp_; // Cyl middle temperature (TS3)
|
||||
uint16_t wwSolarTemp_;
|
||||
uint8_t wwAlternatingOper_; // alternating operation on/off
|
||||
uint8_t wwAltOpPrioHeat_; // alternating operation, prioritize heat time
|
||||
|
||||
@@ -170,7 +170,7 @@ void Mixer::process_MMPLUSStatusMessage_HC(std::shared_ptr<const Telegram> teleg
|
||||
void Mixer::process_MMPLUSStatusMessage_WWC(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, flowTempHc_, 0); // is * 10
|
||||
has_bitupdate(telegram, pumpStatus_, 2, 0);
|
||||
has_update(telegram, status_, 11); // temp status
|
||||
has_update(telegram, status_, 11); // temp status
|
||||
}
|
||||
|
||||
// Mixer IPM - 0x010C
|
||||
@@ -220,7 +220,7 @@ void Mixer::process_MMStatusMessage(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, flowTempHc_, 1); // is * 10
|
||||
has_bitupdate(telegram, pumpStatus_, 3, 2); // is 0 or 0x64 (100%), check only bit 2
|
||||
has_update(telegram, flowSetTemp_, 0);
|
||||
has_update(telegram, status_, 4); // valve status -100 to 100
|
||||
has_update(telegram, status_, 4); // valve status -100 to 100
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -685,9 +685,9 @@ void Solar::process_SM100Monitor(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, cylBottomTemp2_, 16); // is *10 - TS5: Temperature sensor 2 cylinder, bottom, or swimming pool
|
||||
has_update(telegram, heatExchangerTemp_, 20); // is *10 - TS6: Heat exchanger temperature sensor
|
||||
|
||||
has_update(telegram, collector2Temp_, 6); // is *10 - TS7: Temperature sensor for collector array 2
|
||||
has_update(telegram, cylMiddleTemp_, 8); // is *10 - TS14: cylinder middle temperature
|
||||
has_update(telegram, retHeatAssist_, 10); // is *10 - TS15: return temperature heating assistance
|
||||
has_update(telegram, collector2Temp_, 6); // is *10 - TS7: Temperature sensor for collector array 2
|
||||
has_update(telegram, cylMiddleTemp_, 8); // is *10 - TS14: cylinder middle temperature
|
||||
has_update(telegram, retHeatAssist_, 10); // is *10 - TS15: return temperature heating assistance
|
||||
}
|
||||
|
||||
// SM100wwTemperature - 0x07D6
|
||||
@@ -749,8 +749,8 @@ void Solar::process_SM100Monitor2(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram->read_value(heatCntFlowTemp_, 0)); // is *10
|
||||
has_update(telegram->read_value(heatCntRetTemp_, 2)); // is *10
|
||||
has_update(telegram->read_value(heatCnt_, 12));
|
||||
has_update(telegram->read_value(swapRetTemp_, 6)); // is *10
|
||||
has_update(telegram->read_value(swapFlowTemp_, 8)); // is *10
|
||||
has_update(telegram->read_value(swapRetTemp_, 6)); // is *10
|
||||
has_update(telegram->read_value(swapFlowTemp_, 8)); // is *10
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
@@ -879,7 +879,7 @@ void Solar::process_ISM1StatusMessage(std::shared_ptr<const Telegram> telegram)
|
||||
has_update(telegram, collectorTemp_, 4); // Collector Temperature
|
||||
has_update(telegram, cylBottomTemp_, 6); // Temperature Bottom of Solar Boiler cyl
|
||||
uint16_t Wh = energyLastHour_ / 10;
|
||||
telegram->read_value(Wh, 2); // Solar Energy produced in last hour only ushort, is not * 10
|
||||
telegram->read_value(Wh, 2); // Solar Energy produced in last hour only ushort, is not * 10
|
||||
if (energyLastHour_ != Wh * 10) {
|
||||
energyLastHour_ = Wh * 10;
|
||||
has_update(&energyLastHour_);
|
||||
|
||||
@@ -58,9 +58,9 @@ class Solar : public EMSdevice {
|
||||
uint32_t energyLastHour_;
|
||||
uint32_t energyToday_;
|
||||
uint32_t energyTotal_;
|
||||
uint32_t pumpWorkTime_; // Total solar pump operating time
|
||||
uint32_t pump2WorkTime_; // Total solar pump 2 operating time
|
||||
uint32_t m1WorkTime_; // differential control work time
|
||||
uint32_t pumpWorkTime_; // Total solar pump operating time
|
||||
uint32_t pump2WorkTime_; // Total solar pump 2 operating time
|
||||
uint32_t m1WorkTime_; // differential control work time
|
||||
uint8_t cylHeated_;
|
||||
uint8_t collectorShutdown_; // Collector shutdown on/off
|
||||
|
||||
|
||||
@@ -661,8 +661,8 @@ void Thermostat::process_RC20Set_2(std::shared_ptr<const Telegram> telegram) {
|
||||
return;
|
||||
}
|
||||
has_update(telegram, hc->heatingtype, 0);
|
||||
has_update(telegram, hc->nighttemp, 1); // is * 2,
|
||||
has_update(telegram, hc->daytemp, 2); // is * 2,
|
||||
has_update(telegram, hc->nighttemp, 1); // is * 2,
|
||||
has_update(telegram, hc->daytemp, 2); // is * 2,
|
||||
has_update(telegram, hc->mode, 3);
|
||||
has_enumupdate(telegram, hc->program, 11, 1); // 1 .. 9 predefined programs
|
||||
has_update(telegram, hc->tempautotemp, 13);
|
||||
@@ -798,8 +798,8 @@ void Thermostat::process_RC35wwSettings(std::shared_ptr<const Telegram> telegram
|
||||
has_update(telegram, wwDisinfecting_, 4); // 0-off, 0xFF on
|
||||
has_update(telegram, wwDisinfectDay_, 5); // 0-6 Day of week, 7 every day
|
||||
has_update(telegram, wwDisinfectHour_, 6);
|
||||
has_update(telegram, wwMaxTemp_, 8); // Limiter 60 degrees
|
||||
has_update(telegram, wwOneTimeKey_, 9); // 0-off, 0xFF on
|
||||
has_update(telegram, wwMaxTemp_, 8); // Limiter 60 degrees
|
||||
has_update(telegram, wwOneTimeKey_, 9); // 0-off, 0xFF on
|
||||
}
|
||||
|
||||
// Settings WW 0x3A - RC30
|
||||
@@ -951,7 +951,7 @@ void Thermostat::process_RC300Monitor(std::shared_ptr<const Telegram> telegram)
|
||||
return;
|
||||
}
|
||||
|
||||
has_update(telegram, hc->roomTemp, 0); // is * 10
|
||||
has_update(telegram, hc->roomTemp, 0); // is * 10
|
||||
has_bitupdate(telegram, hc->modetype, 10, 1);
|
||||
has_bitupdate(telegram, hc->mode, 10, 0); // bit 1, mode (auto=1 or manual=0)
|
||||
|
||||
@@ -1013,8 +1013,8 @@ void Thermostat::process_RC300Set(std::shared_ptr<const Telegram> telegram) {
|
||||
}
|
||||
has_update(hc->tempautotemp, tat);
|
||||
|
||||
has_update(telegram, hc->manualtemp, 10); // is * 2
|
||||
has_enumupdate(telegram, hc->program, 11, 1); // timer program 1 or 2
|
||||
has_update(telegram, hc->manualtemp, 10); // is * 2
|
||||
has_enumupdate(telegram, hc->program, 11, 1); // timer program 1 or 2
|
||||
|
||||
has_enumupdate(telegram, hc->reducemode, 5, 1); // 1-outdoor temp threshold, 2-room temp threshold, 3-reduced mode
|
||||
has_update(telegram, hc->reducetemp, 9);
|
||||
@@ -1097,7 +1097,7 @@ void Thermostat::process_RC300WWtemp(std::shared_ptr<const Telegram> telegram) {
|
||||
// RC300WWmode(0x2F5), data: 01 FF 04 00 00 00 08 05 00 08 04 00 00 00 00 00 00 00 00 00 01
|
||||
void Thermostat::process_RC300WWmode(std::shared_ptr<const Telegram> telegram) {
|
||||
// circulation pump see: https://github.com/Th3M3/buderus_ems-wiki/blob/master/Einstellungen%20der%20Bedieneinheit%20RC310.md
|
||||
has_update(telegram, wwCircPump_, 1); // FF=off, 0=on ?
|
||||
has_update(telegram, wwCircPump_, 1); // FF=off, 0=on ?
|
||||
|
||||
has_update(telegram, wwMode_, 2); // 0=off, 1=low, 2=high, 3=auto, 4=own prog
|
||||
has_update(telegram, wwCircMode_, 3); // 0=off, 1=on, 2=auto, 4=own?
|
||||
@@ -1207,11 +1207,11 @@ void Thermostat::process_RC30Set(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, mixingvalves_, 17); // Number of Mixing Valves: (0x00=0, 0x01=1, 0x02=2)
|
||||
has_update(telegram, brightness_, 18); // Screen brightness 0F=dark F1=light
|
||||
has_update(telegram, hc->mode, 23);
|
||||
has_update(telegram, hc->nofrosttemp, 24); // Set Temperature when mode is Off / 10 (e.g.: 0x0F = 7.5 degrees Celsius)
|
||||
has_update(telegram, heatingpid_, 25); // PID setting 00=1 01=2 02=3
|
||||
has_update(telegram, preheating_, 26); // Preheating in the clock program: (0x00 = off, 0xFF = on)
|
||||
has_update(telegram, hc->tempautotemp, 28); // is * 2
|
||||
has_update(telegram, hc->manualtemp, 29); // manualtemp is * 2
|
||||
has_update(telegram, hc->nofrosttemp, 24); // Set Temperature when mode is Off / 10 (e.g.: 0x0F = 7.5 degrees Celsius)
|
||||
has_update(telegram, heatingpid_, 25); // PID setting 00=1 01=2 02=3
|
||||
has_update(telegram, preheating_, 26); // Preheating in the clock program: (0x00 = off, 0xFF = on)
|
||||
has_update(telegram, hc->tempautotemp, 28); // is * 2
|
||||
has_update(telegram, hc->manualtemp, 29); // manualtemp is * 2
|
||||
}
|
||||
|
||||
// type 0x40 (HC1) - for reading the operating mode from the RC30 thermostat (0x10)
|
||||
@@ -1274,13 +1274,13 @@ void Thermostat::process_RC35Set(std::shared_ptr<const Telegram> telegram) {
|
||||
return;
|
||||
}
|
||||
|
||||
has_update(telegram, hc->heatingtype, 0); // 0- off, 1-radiator, 2-convector, 3-floor
|
||||
has_update(telegram, hc->nighttemp, 1); // is * 2
|
||||
has_update(telegram, hc->daytemp, 2); // is * 2
|
||||
has_update(telegram, hc->holidaytemp, 3); // is * 2
|
||||
has_update(telegram, hc->roominfluence, 4); // is * 1
|
||||
has_update(telegram, hc->offsettemp, 6); // is * 2
|
||||
has_update(telegram, hc->mode, 7); // night, day, auto
|
||||
has_update(telegram, hc->heatingtype, 0); // 0- off, 1-radiator, 2-convector, 3-floor
|
||||
has_update(telegram, hc->nighttemp, 1); // is * 2
|
||||
has_update(telegram, hc->daytemp, 2); // is * 2
|
||||
has_update(telegram, hc->holidaytemp, 3); // is * 2
|
||||
has_update(telegram, hc->roominfluence, 4); // is * 1
|
||||
has_update(telegram, hc->offsettemp, 6); // is * 2
|
||||
has_update(telegram, hc->mode, 7); // night, day, auto
|
||||
|
||||
has_update(telegram, hc->wwprio, 21); // 0xFF for on
|
||||
has_update(telegram, hc->summertemp, 22); // is * 1
|
||||
@@ -1291,10 +1291,10 @@ void Thermostat::process_RC35Set(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, hc->control, 26); // 0-off, 1-RC20 (remote), 2-RC35
|
||||
has_update(telegram, hc->controlmode, 33); // 0-outdoortemp, 1-roomtemp
|
||||
has_update(telegram, hc->tempautotemp, 37);
|
||||
has_update(telegram, hc->noreducetemp, 38); // outdoor temperature for no reduce
|
||||
has_update(telegram, hc->reducetemp, 39); // temperature for off/reduce
|
||||
has_update(telegram, hc->vacreducetemp, 40); // temperature for off/reduce in vacations
|
||||
has_update(telegram, hc->vacreducemode, 41); // vacations reduce mode
|
||||
has_update(telegram, hc->noreducetemp, 38); // outdoor temperature for no reduce
|
||||
has_update(telegram, hc->reducetemp, 39); // temperature for off/reduce
|
||||
has_update(telegram, hc->vacreducetemp, 40); // temperature for off/reduce in vacations
|
||||
has_update(telegram, hc->vacreducemode, 41); // vacations reduce mode
|
||||
has_update(telegram, hc->minflowtemp, 16);
|
||||
|
||||
// RC35 stores values for floorheating in different position
|
||||
@@ -1416,7 +1416,7 @@ void Thermostat::process_RCTime(std::shared_ptr<const Telegram> telegram) {
|
||||
|
||||
bool ivtclock = (telegram->message_data[0] & 0x80) == 0x80; // dont sync ivt-clock, #439
|
||||
bool junkersclock = model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS;
|
||||
time_t ttime = mktime(tm_); // thermostat time
|
||||
time_t ttime = mktime(tm_); // thermostat time
|
||||
// correct thermostat clock if we have valid ntp time, and could write the command
|
||||
if (!ivtclock && !junkersclock && tset_ && EMSESP::system_.ntp_connected() && !EMSESP::system_.readonly_mode() && has_command(&dateTime_)) {
|
||||
double difference = difftime(now, ttime);
|
||||
@@ -1426,7 +1426,7 @@ void Thermostat::process_RCTime(std::shared_ptr<const Telegram> telegram) {
|
||||
}
|
||||
}
|
||||
#ifndef EMSESP_STANDALONE
|
||||
if (!tset_ && tm_->tm_year > 110) { // emsesp clock not set, but thermostat clock
|
||||
if (!tset_ && tm_->tm_year > 110) { // emsesp clock not set, but thermostat clock
|
||||
if (ivtclock) {
|
||||
tm_->tm_isdst = -1; // determine dst
|
||||
ttime = mktime(tm_); // thermostat time
|
||||
@@ -2302,7 +2302,7 @@ bool Thermostat::set_datetime(const char * value, const int8_t id) {
|
||||
data[6] = (tm_->tm_wday + 6) % 7; // Bosch counts from Mo, time from Su
|
||||
data[7] = tm_->tm_isdst + 2; // set DST and flag for ext. clock
|
||||
if (model() == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) {
|
||||
data[6]++; // Junkers use 1-7;
|
||||
data[6]++; // Junkers use 1-7;
|
||||
data[7] = 0;
|
||||
}
|
||||
} else if (dt.length() == 23) {
|
||||
@@ -2500,7 +2500,7 @@ bool Thermostat::set_mode_n(const uint8_t mode, const uint8_t hc_num) {
|
||||
if (mode == HeatingCircuit::Mode::AUTO) {
|
||||
set_mode_value = 0xFF; // special value for auto
|
||||
} else {
|
||||
set_mode_value = 0; // everything else, like manual/day etc..
|
||||
set_mode_value = 0; // everything else, like manual/day etc..
|
||||
}
|
||||
break;
|
||||
case EMSdevice::EMS_DEVICE_FLAG_JUNKERS:
|
||||
@@ -3121,7 +3121,7 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co
|
||||
offset = 0x0A; // manual offset
|
||||
break;
|
||||
case HeatingCircuit::Mode::TEMPAUTO:
|
||||
offset = 0x08; // auto offset
|
||||
offset = 0x08; // auto offset
|
||||
if (temperature == -1) {
|
||||
factor = 1; // to write 0xFF
|
||||
}
|
||||
|
||||
@@ -256,9 +256,9 @@ class Thermostat : public EMSdevice {
|
||||
static constexpr uint16_t EMS_TYPE_RCOutdoorTemp = 0xA3; // is an automatic thermostat broadcast, outdoor external temp
|
||||
|
||||
// Type offsets
|
||||
static constexpr uint8_t EMS_OFFSET_RC10StatusMessage_setpoint = 1; // setpoint temp
|
||||
static constexpr uint8_t EMS_OFFSET_RC10StatusMessage_curr = 2; // current temp
|
||||
static constexpr uint8_t EMS_OFFSET_RC10Set_temp = 4; // position of thermostat setpoint temperature
|
||||
static constexpr uint8_t EMS_OFFSET_RC10StatusMessage_setpoint = 1; // setpoint temp
|
||||
static constexpr uint8_t EMS_OFFSET_RC10StatusMessage_curr = 2; // current temp
|
||||
static constexpr uint8_t EMS_OFFSET_RC10Set_temp = 4; // position of thermostat setpoint temperature
|
||||
|
||||
static constexpr uint8_t EMS_OFFSET_RC20StatusMessage_setpoint = 1; // setpoint temp
|
||||
static constexpr uint8_t EMS_OFFSET_RC20StatusMessage_curr = 2; // current temp
|
||||
@@ -267,9 +267,9 @@ class Thermostat : public EMSdevice {
|
||||
static constexpr uint8_t EMS_OFFSET_RC20Set_temp_auto = 28; // position of thermostat setpoint temperature
|
||||
static constexpr uint8_t EMS_OFFSET_RC20Set_temp_manual = 29; // position of thermostat setpoint temperature
|
||||
|
||||
static constexpr uint8_t EMS_OFFSET_RC20_2_Set_mode = 3; // ES72 - see https://github.com/emsesp/EMS-ESP/issues/334
|
||||
static constexpr uint8_t EMS_OFFSET_RC20_2_Set_temp_night = 1; // ES72
|
||||
static constexpr uint8_t EMS_OFFSET_RC20_2_Set_temp_day = 2; // ES72
|
||||
static constexpr uint8_t EMS_OFFSET_RC20_2_Set_mode = 3; // ES72 - see https://github.com/emsesp/EMS-ESP/issues/334
|
||||
static constexpr uint8_t EMS_OFFSET_RC20_2_Set_temp_night = 1; // ES72
|
||||
static constexpr uint8_t EMS_OFFSET_RC20_2_Set_temp_day = 2; // ES72
|
||||
|
||||
static constexpr uint8_t EMS_OFFSET_RC30StatusMessage_setpoint = 1; // setpoint temp
|
||||
static constexpr uint8_t EMS_OFFSET_RC30StatusMessage_curr = 2; // current temp
|
||||
@@ -308,8 +308,8 @@ class Thermostat : public EMSdevice {
|
||||
static constexpr uint8_t EMS_OFFSET_RC35Set_temp_summer = 22;
|
||||
static constexpr uint8_t EMS_OFFSET_RC35Set_temp_nofrost = 23;
|
||||
|
||||
static constexpr uint8_t EMS_OFFSET_EasyStatusMessage_setpoint = 10; // setpoint temp
|
||||
static constexpr uint8_t EMS_OFFSET_EasyStatusMessage_curr = 8; // current temp
|
||||
static constexpr uint8_t EMS_OFFSET_EasyStatusMessage_setpoint = 10; // setpoint temp
|
||||
static constexpr uint8_t EMS_OFFSET_EasyStatusMessage_curr = 8; // current temp
|
||||
|
||||
static constexpr uint8_t EMS_OFFSET_RCPLUSStatusMessage_mode = 10; // thermostat mode (auto, manual)
|
||||
static constexpr uint8_t EMS_OFFSET_RCPLUSStatusMessage_setpoint = 3; // setpoint temp
|
||||
|
||||
Reference in New Issue
Block a user