mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 18:54:28 +05:00
reformat code
This commit is contained in:
@@ -88,7 +88,7 @@ public:
|
|||||||
return isValidResponse(response);
|
return isValidResponse(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool setDHWTemp(float temperature) {
|
bool setDhwTemp(float temperature) {
|
||||||
unsigned int data = temperatureToData(temperature);
|
unsigned int data = temperatureToData(temperature);
|
||||||
unsigned long response = sendRequest(buildRequest(OpenThermMessageType::WRITE_DATA, OpenThermMessageID::TdhwSet, data));
|
unsigned long response = sendRequest(buildRequest(OpenThermMessageType::WRITE_DATA, OpenThermMessageID::TdhwSet, data));
|
||||||
return isValidResponse(response);
|
return isValidResponse(response);
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool publishSwitchDHW(bool enabledByDefault = true) {
|
bool publishSwitchDhw(bool enabledByDefault = true) {
|
||||||
StaticJsonDocument<1536> doc;
|
StaticJsonDocument<1536> doc;
|
||||||
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
||||||
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
||||||
@@ -398,7 +398,7 @@ public:
|
|||||||
return publish(getTopic("switch", "dhw").c_str(), doc);
|
return publish(getTopic("switch", "dhw").c_str(), doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool publishNumberDHWTarget(byte minTemp = 40, byte maxTemp = 60, bool enabledByDefault = true) {
|
bool publishNumberDhwTarget(byte minTemp = 40, byte maxTemp = 60, bool enabledByDefault = true) {
|
||||||
StaticJsonDocument<1536> doc;
|
StaticJsonDocument<1536> doc;
|
||||||
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
||||||
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
||||||
@@ -421,7 +421,7 @@ public:
|
|||||||
return publish(getTopic("number", "dhw_target").c_str(), doc);
|
return publish(getTopic("number", "dhw_target").c_str(), doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool publishSensorCurrentDHWMinTemp(bool enabledByDefault = true) {
|
bool publishSensorCurrentDhwMinTemp(bool enabledByDefault = true) {
|
||||||
StaticJsonDocument<1536> doc;
|
StaticJsonDocument<1536> doc;
|
||||||
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
||||||
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
||||||
@@ -439,7 +439,7 @@ public:
|
|||||||
return publish(getTopic("sensor", "current_dhw_min_temp").c_str(), doc);
|
return publish(getTopic("sensor", "current_dhw_min_temp").c_str(), doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool publishSensorCurrentDHWMaxTemp(bool enabledByDefault = true) {
|
bool publishSensorCurrentDhwMaxTemp(bool enabledByDefault = true) {
|
||||||
StaticJsonDocument<1536> doc;
|
StaticJsonDocument<1536> doc;
|
||||||
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
||||||
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
||||||
@@ -457,7 +457,7 @@ public:
|
|||||||
return publish(getTopic("sensor", "current_dhw_max_temp").c_str(), doc);
|
return publish(getTopic("sensor", "current_dhw_max_temp").c_str(), doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool publishNumberDHWMinTemp(bool enabledByDefault = true) {
|
bool publishNumberDhwMinTemp(bool enabledByDefault = true) {
|
||||||
StaticJsonDocument<1536> doc;
|
StaticJsonDocument<1536> doc;
|
||||||
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
||||||
doc[FPSTR(HA_UNIQUE_ID)] = devicePrefix + F("_dhw_min_temp");
|
doc[FPSTR(HA_UNIQUE_ID)] = devicePrefix + F("_dhw_min_temp");
|
||||||
@@ -479,7 +479,7 @@ public:
|
|||||||
return publish(getTopic("number", "dhw_min_temp").c_str(), doc);
|
return publish(getTopic("number", "dhw_min_temp").c_str(), doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool publishNumberDHWMaxTemp(bool enabledByDefault = true) {
|
bool publishNumberDhwMaxTemp(bool enabledByDefault = true) {
|
||||||
StaticJsonDocument<1536> doc;
|
StaticJsonDocument<1536> doc;
|
||||||
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
||||||
doc[FPSTR(HA_UNIQUE_ID)] = devicePrefix + F("_dhw_max_temp");
|
doc[FPSTR(HA_UNIQUE_ID)] = devicePrefix + F("_dhw_max_temp");
|
||||||
@@ -788,7 +788,7 @@ public:
|
|||||||
return publish(getTopic("binary_sensor", "heating").c_str(), doc);
|
return publish(getTopic("binary_sensor", "heating").c_str(), doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool publishBinSensorDHW(bool enabledByDefault = true) {
|
bool publishBinSensorDhw(bool enabledByDefault = true) {
|
||||||
StaticJsonDocument<1536> doc;
|
StaticJsonDocument<1536> doc;
|
||||||
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
||||||
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
||||||
@@ -1056,7 +1056,7 @@ public:
|
|||||||
return publish(getTopic("sensor", "heating_temp").c_str(), doc);
|
return publish(getTopic("sensor", "heating_temp").c_str(), doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool publishSensorDHWTemp(bool enabledByDefault = true) {
|
bool publishSensorDhwTemp(bool enabledByDefault = true) {
|
||||||
StaticJsonDocument<1536> doc;
|
StaticJsonDocument<1536> doc;
|
||||||
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
||||||
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
|
||||||
@@ -1119,7 +1119,7 @@ public:
|
|||||||
return publish(getTopic("climate", "heating", "_").c_str(), doc);
|
return publish(getTopic("climate", "heating", "_").c_str(), doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool publishClimateDHW(byte minTemp = 40, byte maxTemp = 60, bool enabledByDefault = true) {
|
bool publishClimateDhw(byte minTemp = 40, byte maxTemp = 60, bool enabledByDefault = true) {
|
||||||
StaticJsonDocument<2560> doc;
|
StaticJsonDocument<2560> doc;
|
||||||
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
doc[FPSTR(HA_AVAILABILITY)][FPSTR(HA_TOPIC)] = devicePrefix + F("/status");
|
||||||
|
|
||||||
@@ -1219,35 +1219,35 @@ public:
|
|||||||
return publish(getTopic("sensor", "indoor_temp").c_str());
|
return publish(getTopic("sensor", "indoor_temp").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool deleteSwitchDHW() {
|
bool deleteSwitchDhw() {
|
||||||
return publish(getTopic("switch", "dhw").c_str());
|
return publish(getTopic("switch", "dhw").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool deleteSensorCurrentDHWMinTemp() {
|
bool deleteSensorCurrentDhwMinTemp() {
|
||||||
return publish(getTopic("sensor", "current_dhw_min_temp").c_str());
|
return publish(getTopic("sensor", "current_dhw_min_temp").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool deleteSensorCurrentDHWMaxTemp() {
|
bool deleteSensorCurrentDhwMaxTemp() {
|
||||||
return publish(getTopic("sensor", "current_dhw_max_temp").c_str());
|
return publish(getTopic("sensor", "current_dhw_max_temp").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool deleteNumberDHWMinTemp() {
|
bool deleteNumberDhwMinTemp() {
|
||||||
return publish(getTopic("number", "dhw_min_temp").c_str());
|
return publish(getTopic("number", "dhw_min_temp").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool deleteNumberDHWMaxTemp() {
|
bool deleteNumberDhwMaxTemp() {
|
||||||
return publish(getTopic("number", "dhw_max_temp").c_str());
|
return publish(getTopic("number", "dhw_max_temp").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool deleteBinSensorDHW() {
|
bool deleteBinSensorDhw() {
|
||||||
return publish(getTopic("binary_sensor", "dhw").c_str());
|
return publish(getTopic("binary_sensor", "dhw").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool deleteSensorDHWTemp() {
|
bool deleteSensorDhwTemp() {
|
||||||
return publish(getTopic("sensor", "dhw_temp").c_str());
|
return publish(getTopic("sensor", "dhw_temp").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool deleteNumberDHWTarget() {
|
bool deleteNumberDhwTarget() {
|
||||||
return publish(getTopic("number", "dhw_target").c_str());
|
return publish(getTopic("number", "dhw_target").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1255,7 +1255,7 @@ public:
|
|||||||
return publish(getTopic("sensor", "dhw_flow_rate").c_str());
|
return publish(getTopic("sensor", "dhw_flow_rate").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool deleteClimateDHW() {
|
bool deleteClimateDhw() {
|
||||||
return publish(getTopic("climate", "dhw", "_").c_str());
|
return publish(getTopic("climate", "dhw", "_").c_str());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -392,7 +392,6 @@ protected:
|
|||||||
// heating
|
// heating
|
||||||
haHelper.publishSwitchHeating(false);
|
haHelper.publishSwitchHeating(false);
|
||||||
haHelper.publishSwitchHeatingTurbo();
|
haHelper.publishSwitchHeatingTurbo();
|
||||||
//haHelper.publishNumberHeatingTarget(false);
|
|
||||||
haHelper.publishNumberHeatingHysteresis();
|
haHelper.publishNumberHeatingHysteresis();
|
||||||
haHelper.publishSensorHeatingSetpoint(false);
|
haHelper.publishSensorHeatingSetpoint(false);
|
||||||
haHelper.publishSensorCurrentHeatingMinTemp(false);
|
haHelper.publishSensorCurrentHeatingMinTemp(false);
|
||||||
@@ -436,7 +435,6 @@ protected:
|
|||||||
|
|
||||||
// temperatures
|
// temperatures
|
||||||
haHelper.publishNumberIndoorTemp();
|
haHelper.publishNumberIndoorTemp();
|
||||||
//haHelper.publishNumberOutdoorTemp();
|
|
||||||
haHelper.publishSensorHeatingTemp();
|
haHelper.publishSensorHeatingTemp();
|
||||||
|
|
||||||
// buttons
|
// buttons
|
||||||
@@ -460,25 +458,25 @@ protected:
|
|||||||
_dhwPresent = settings.opentherm.dhwPresent;
|
_dhwPresent = settings.opentherm.dhwPresent;
|
||||||
|
|
||||||
if (_dhwPresent) {
|
if (_dhwPresent) {
|
||||||
haHelper.publishSwitchDHW(false);
|
haHelper.publishSwitchDhw(false);
|
||||||
haHelper.publishSensorCurrentDHWMinTemp(false);
|
haHelper.publishSensorCurrentDhwMinTemp(false);
|
||||||
haHelper.publishSensorCurrentDHWMaxTemp(false);
|
haHelper.publishSensorCurrentDhwMaxTemp(false);
|
||||||
haHelper.publishNumberDHWMinTemp(false);
|
haHelper.publishNumberDhwMinTemp(false);
|
||||||
haHelper.publishNumberDHWMaxTemp(false);
|
haHelper.publishNumberDhwMaxTemp(false);
|
||||||
haHelper.publishBinSensorDHW();
|
haHelper.publishBinSensorDhw();
|
||||||
haHelper.publishSensorDHWTemp();
|
haHelper.publishSensorDhwTemp();
|
||||||
haHelper.publishSensorDhwFlowRate(false);
|
haHelper.publishSensorDhwFlowRate(false);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
haHelper.deleteSwitchDHW();
|
haHelper.deleteSwitchDhw();
|
||||||
haHelper.deleteSensorCurrentDHWMinTemp();
|
haHelper.deleteSensorCurrentDhwMinTemp();
|
||||||
haHelper.deleteSensorCurrentDHWMaxTemp();
|
haHelper.deleteSensorCurrentDhwMaxTemp();
|
||||||
haHelper.deleteNumberDHWMinTemp();
|
haHelper.deleteNumberDhwMinTemp();
|
||||||
haHelper.deleteNumberDHWMaxTemp();
|
haHelper.deleteNumberDhwMaxTemp();
|
||||||
haHelper.deleteBinSensorDHW();
|
haHelper.deleteBinSensorDhw();
|
||||||
haHelper.deleteSensorDHWTemp();
|
haHelper.deleteSensorDhwTemp();
|
||||||
haHelper.deleteNumberDHWTarget();
|
haHelper.deleteNumberDhwTarget();
|
||||||
haHelper.deleteClimateDHW();
|
haHelper.deleteClimateDhw();
|
||||||
haHelper.deleteSensorDhwFlowRate();
|
haHelper.deleteSensorDhwFlowRate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -503,8 +501,8 @@ protected:
|
|||||||
_dhwMinTemp = settings.dhw.minTemp;
|
_dhwMinTemp = settings.dhw.minTemp;
|
||||||
_dhwMaxTemp = settings.dhw.maxTemp;
|
_dhwMaxTemp = settings.dhw.maxTemp;
|
||||||
|
|
||||||
haHelper.publishNumberDHWTarget(settings.dhw.minTemp, settings.dhw.maxTemp, false);
|
haHelper.publishNumberDhwTarget(settings.dhw.minTemp, settings.dhw.maxTemp, false);
|
||||||
haHelper.publishClimateDHW(settings.dhw.minTemp, settings.dhw.maxTemp);
|
haHelper.publishClimateDhw(settings.dhw.minTemp, settings.dhw.maxTemp);
|
||||||
|
|
||||||
published = true;
|
published = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
static byte currentHeatingTemp, currentDHWTemp = 0;
|
static byte currentHeatingTemp, currentDhwTemp = 0;
|
||||||
unsigned long localResponse;
|
unsigned long localResponse;
|
||||||
|
|
||||||
if (setMasterMemberIdCode()) {
|
if (setMasterMemberIdCode()) {
|
||||||
@@ -179,8 +179,8 @@ protected:
|
|||||||
yield();
|
yield();
|
||||||
|
|
||||||
if (settings.opentherm.dhwPresent) {
|
if (settings.opentherm.dhwPresent) {
|
||||||
updateDHWTemp();
|
updateDhwTemp();
|
||||||
updateDHWFlowRate();
|
updateDhwFlowRate();
|
||||||
} else {
|
} else {
|
||||||
vars.temperatures.dhw = 0;
|
vars.temperatures.dhw = 0;
|
||||||
vars.sensors.dhwFlowRate = 0.0f;
|
vars.sensors.dhwFlowRate = 0.0f;
|
||||||
@@ -221,17 +221,17 @@ protected:
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Температура ГВС
|
// Температура ГВС
|
||||||
byte newDHWTemp = settings.dhw.target;
|
byte newDhwTemp = settings.dhw.target;
|
||||||
if (settings.opentherm.dhwPresent && settings.dhw.enable && (needSetDhwTemp() || newDHWTemp != currentDHWTemp)) {
|
if (settings.opentherm.dhwPresent && settings.dhw.enable && (needSetDhwTemp() || newDhwTemp != currentDhwTemp)) {
|
||||||
if (newDHWTemp < settings.dhw.minTemp || newDHWTemp > settings.dhw.maxTemp) {
|
if (newDhwTemp < settings.dhw.minTemp || newDhwTemp > settings.dhw.maxTemp) {
|
||||||
newDHWTemp = constrain(newDHWTemp, settings.dhw.minTemp, settings.dhw.maxTemp);
|
newDhwTemp = constrain(newDhwTemp, settings.dhw.minTemp, settings.dhw.maxTemp);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.sinfoln("OT.DHW", "Set temp = %u", newDHWTemp);
|
Log.sinfoln("OT.DHW", "Set temp = %u", newDhwTemp);
|
||||||
|
|
||||||
// Записываем заданную температуру ГВС
|
// Записываем заданную температуру ГВС
|
||||||
if (ot->setDHWTemp(newDHWTemp)) {
|
if (ot->setDhwTemp(newDhwTemp)) {
|
||||||
currentDHWTemp = newDHWTemp;
|
currentDhwTemp = newDhwTemp;
|
||||||
dhwSetTempTime = millis();
|
dhwSetTempTime = millis();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -239,7 +239,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (settings.opentherm.dhwToCh2) {
|
if (settings.opentherm.dhwToCh2) {
|
||||||
if (!ot->setHeatingCh2Temp(newDHWTemp)) {
|
if (!ot->setHeatingCh2Temp(newDhwTemp)) {
|
||||||
Log.swarningln("OT.DHW", "Failed set ch2 temp");
|
Log.swarningln("OT.DHW", "Failed set ch2 temp");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -501,7 +501,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool updateDHWTemp() {
|
bool updateDhwTemp() {
|
||||||
unsigned long response = ot->sendRequest(ot->buildRequest(OpenThermMessageType::READ, OpenThermMessageID::Tdhw, 0));
|
unsigned long response = ot->sendRequest(ot->buildRequest(OpenThermMessageType::READ, OpenThermMessageID::Tdhw, 0));
|
||||||
if (!ot->isValidResponse(response)) {
|
if (!ot->isValidResponse(response)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -511,7 +511,7 @@ protected:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool updateDHWFlowRate() {
|
bool updateDhwFlowRate() {
|
||||||
unsigned long response = ot->sendRequest(ot->buildRequest(OpenThermMessageType::READ, OpenThermMessageID::DHWFlowRate, 0));
|
unsigned long response = ot->sendRequest(ot->buildRequest(OpenThermMessageType::READ, OpenThermMessageID::DHWFlowRate, 0));
|
||||||
if (!ot->isValidResponse(response)) {
|
if (!ot->isValidResponse(response)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ UnsignedIntParameter* wmMqttPublishInterval;
|
|||||||
UnsignedIntParameter* wmOtInPin;
|
UnsignedIntParameter* wmOtInPin;
|
||||||
UnsignedIntParameter* wmOtOutPin;
|
UnsignedIntParameter* wmOtOutPin;
|
||||||
UnsignedIntParameter* wmOtMemberIdCode;
|
UnsignedIntParameter* wmOtMemberIdCode;
|
||||||
CheckboxParameter* wmOtDHWPresent;
|
CheckboxParameter* wmOtDhwPresent;
|
||||||
CheckboxParameter* wmOtSummerWinterMode;
|
CheckboxParameter* wmOtSummerWinterMode;
|
||||||
CheckboxParameter* wmOtHeatingCh2Enabled;
|
CheckboxParameter* wmOtHeatingCh2Enabled;
|
||||||
CheckboxParameter* wmOtHeatingCh1ToCh2;
|
CheckboxParameter* wmOtHeatingCh1ToCh2;
|
||||||
CheckboxParameter* wmOtDHWToCh2;
|
CheckboxParameter* wmOtDhwToCh2;
|
||||||
UnsignedIntParameter* wmOutdoorSensorPin;
|
UnsignedIntParameter* wmOutdoorSensorPin;
|
||||||
UnsignedIntParameter* wmIndoorSensorPin;
|
UnsignedIntParameter* wmIndoorSensorPin;
|
||||||
|
|
||||||
@@ -94,8 +94,8 @@ protected:
|
|||||||
wmOtMemberIdCode = new UnsignedIntParameter("ot_member_id_code", "Opentherm Master Member ID", settings.opentherm.memberIdCode, 5);
|
wmOtMemberIdCode = new UnsignedIntParameter("ot_member_id_code", "Opentherm Master Member ID", settings.opentherm.memberIdCode, 5);
|
||||||
wm.addParameter(wmOtMemberIdCode);
|
wm.addParameter(wmOtMemberIdCode);
|
||||||
|
|
||||||
wmOtDHWPresent = new CheckboxParameter("ot_dhw_present", "Opentherm DHW present", settings.opentherm.dhwPresent);
|
wmOtDhwPresent = new CheckboxParameter("ot_dhw_present", "Opentherm DHW present", settings.opentherm.dhwPresent);
|
||||||
wm.addParameter(wmOtDHWPresent);
|
wm.addParameter(wmOtDhwPresent);
|
||||||
|
|
||||||
wmOtSummerWinterMode = new CheckboxParameter("ot_summer_winter_mode", "Opentherm summer/winter mode", settings.opentherm.summerWinterMode);
|
wmOtSummerWinterMode = new CheckboxParameter("ot_summer_winter_mode", "Opentherm summer/winter mode", settings.opentherm.summerWinterMode);
|
||||||
wm.addParameter(wmOtSummerWinterMode);
|
wm.addParameter(wmOtSummerWinterMode);
|
||||||
@@ -106,8 +106,8 @@ protected:
|
|||||||
wmOtHeatingCh1ToCh2 = new CheckboxParameter("ot_heating_ch1_to_ch2", "Opentherm heating CH1 to CH2", settings.opentherm.heatingCh1ToCh2);
|
wmOtHeatingCh1ToCh2 = new CheckboxParameter("ot_heating_ch1_to_ch2", "Opentherm heating CH1 to CH2", settings.opentherm.heatingCh1ToCh2);
|
||||||
wm.addParameter(wmOtHeatingCh1ToCh2);
|
wm.addParameter(wmOtHeatingCh1ToCh2);
|
||||||
|
|
||||||
wmOtDHWToCh2 = new CheckboxParameter("ot_dhw_to_ch2", "Opentherm DHW to CH2", settings.opentherm.dhwToCh2);
|
wmOtDhwToCh2 = new CheckboxParameter("ot_dhw_to_ch2", "Opentherm DHW to CH2", settings.opentherm.dhwToCh2);
|
||||||
wm.addParameter(wmOtDHWToCh2);
|
wm.addParameter(wmOtDhwToCh2);
|
||||||
|
|
||||||
wmSep2 = new SeparatorParameter();
|
wmSep2 = new SeparatorParameter();
|
||||||
wm.addParameter(wmSep2);
|
wm.addParameter(wmSep2);
|
||||||
@@ -240,9 +240,9 @@ protected:
|
|||||||
settings.opentherm.memberIdCode = wmOtMemberIdCode->getValue();
|
settings.opentherm.memberIdCode = wmOtMemberIdCode->getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wmOtDHWPresent->getCheckboxValue() != settings.opentherm.dhwPresent) {
|
if (wmOtDhwPresent->getCheckboxValue() != settings.opentherm.dhwPresent) {
|
||||||
changed = true;
|
changed = true;
|
||||||
settings.opentherm.dhwPresent = wmOtDHWPresent->getCheckboxValue();
|
settings.opentherm.dhwPresent = wmOtDhwPresent->getCheckboxValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wmOtSummerWinterMode->getCheckboxValue() != settings.opentherm.summerWinterMode) {
|
if (wmOtSummerWinterMode->getCheckboxValue() != settings.opentherm.summerWinterMode) {
|
||||||
@@ -261,7 +261,7 @@ protected:
|
|||||||
|
|
||||||
if (settings.opentherm.dhwToCh2) {
|
if (settings.opentherm.dhwToCh2) {
|
||||||
settings.opentherm.dhwToCh2 = false;
|
settings.opentherm.dhwToCh2 = false;
|
||||||
wmOtDHWToCh2->setValue(false);
|
wmOtDhwToCh2->setValue(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,13 +276,13 @@ protected:
|
|||||||
|
|
||||||
if (settings.opentherm.dhwToCh2) {
|
if (settings.opentherm.dhwToCh2) {
|
||||||
settings.opentherm.dhwToCh2 = false;
|
settings.opentherm.dhwToCh2 = false;
|
||||||
wmOtDHWToCh2->setValue(false);
|
wmOtDhwToCh2->setValue(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wmOtDHWToCh2->getCheckboxValue() != settings.opentherm.dhwToCh2) {
|
if (wmOtDhwToCh2->getCheckboxValue() != settings.opentherm.dhwToCh2) {
|
||||||
changed = true;
|
changed = true;
|
||||||
settings.opentherm.dhwToCh2 = wmOtDHWToCh2->getCheckboxValue();
|
settings.opentherm.dhwToCh2 = wmOtDhwToCh2->getCheckboxValue();
|
||||||
|
|
||||||
if (settings.opentherm.heatingCh2Enabled) {
|
if (settings.opentherm.heatingCh2Enabled) {
|
||||||
settings.opentherm.heatingCh2Enabled = false;
|
settings.opentherm.heatingCh2Enabled = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user