mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
prepare for CW400 HCn support - https://github.com/proddy/EMS-ESP/issues/206
This commit is contained in:
20
src/ems.cpp
20
src/ems.cpp
@@ -2863,18 +2863,30 @@ void ems_setThermostatTemp(float temperature, uint8_t hc_num, uint8_t temptype)
|
|||||||
EMS_TxTelegram.type_validate = EMS_TxTelegram.type;
|
EMS_TxTelegram.type_validate = EMS_TxTelegram.type;
|
||||||
|
|
||||||
} else if (model_id == EMS_MODEL_RC300) {
|
} else if (model_id == EMS_MODEL_RC300) {
|
||||||
EMS_TxTelegram.type = EMS_TYPE_RCPLUSSet; // for 3000 and 1010, e.g. 0B 10 FF (0A | 08) 01 89 2B
|
// check mode to determine offset
|
||||||
// check mode
|
|
||||||
if (EMS_Thermostat.hc[hc_num - 1].mode == 1) { // auto
|
if (EMS_Thermostat.hc[hc_num - 1].mode == 1) { // auto
|
||||||
EMS_TxTelegram.offset = 0x08; // auto offset
|
EMS_TxTelegram.offset = 0x08; // auto offset
|
||||||
} else if (EMS_Thermostat.hc[hc_num - 1].mode == 0) { // manuaL
|
} else if (EMS_Thermostat.hc[hc_num - 1].mode == 0) { // manuaL
|
||||||
EMS_TxTelegram.offset = 0x0A; // manual offset
|
EMS_TxTelegram.offset = 0x0A; // manual offset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hc_num == 1) {
|
||||||
|
EMS_TxTelegram.type = EMS_TYPE_RCPLUSSet; // for 3000 and 1010, e.g. 0B 10 FF (0A | 08) 01 89 2B
|
||||||
|
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RCPLUSStatusMessage_HC1;
|
||||||
|
} else if (hc_num == 2) {
|
||||||
|
EMS_TxTelegram.type = EMS_TYPE_RCPLUSSet + 1;
|
||||||
|
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RCPLUSStatusMessage_HC2;
|
||||||
|
} else if (hc_num == 3) {
|
||||||
|
EMS_TxTelegram.type = EMS_TYPE_RCPLUSSet + 2;
|
||||||
|
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RCPLUSStatusMessage_HC3;
|
||||||
|
} else if (hc_num == 4) {
|
||||||
|
EMS_TxTelegram.type = EMS_TYPE_RCPLUSSet + 3;
|
||||||
|
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RCPLUSStatusMessage_HC4;
|
||||||
|
}
|
||||||
|
|
||||||
// EMS_TxTelegram.type_validate = EMS_TYPE_RCPLUSStatusMessage; // validate by reading from a different telegram
|
// EMS_TxTelegram.type_validate = EMS_TYPE_RCPLUSStatusMessage; // validate by reading from a different telegram
|
||||||
EMS_TxTelegram.type_validate = EMS_ID_NONE; // validate by reading from a different telegram
|
EMS_TxTelegram.type_validate = EMS_ID_NONE; // validate by reading from a different telegram
|
||||||
|
|
||||||
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RCPLUSStatusMessage_HC1 + hc_num - 1; // after write, do a full fetch of all values
|
|
||||||
|
|
||||||
} else if ((model_id == EMS_MODEL_RC35) || (model_id == EMS_MODEL_ES73)) {
|
} else if ((model_id == EMS_MODEL_RC35) || (model_id == EMS_MODEL_ES73)) {
|
||||||
switch (temptype) {
|
switch (temptype) {
|
||||||
case 1: // change the night temp
|
case 1: // change the night temp
|
||||||
|
|||||||
Reference in New Issue
Block a user