mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
mode support for all HCs - https://github.com/proddy/EMS-ESP/issues/206
This commit is contained in:
18
src/ems.cpp
18
src/ems.cpp
@@ -2887,7 +2887,6 @@ void ems_setThermostatTemp(float temperature, uint8_t hc_num, uint8_t temptype)
|
||||
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_ID_NONE; // validate by reading from a different telegram
|
||||
|
||||
} else if ((model_id == EMS_MODEL_RC35) || (model_id == EMS_MODEL_ES73)) {
|
||||
@@ -3022,12 +3021,23 @@ void ems_setThermostatMode(uint8_t mode, uint8_t hc_num) {
|
||||
EMS_TxTelegram.type_validate = EMS_TxTelegram.type;
|
||||
|
||||
} else if (model_id == EMS_MODEL_RC300) {
|
||||
EMS_TxTelegram.type = EMS_TYPE_RCPLUSSet; // for 3000 and 1010, e.g. 48 10 FF 00 01 B9 00 for manual
|
||||
EMS_TxTelegram.offset = EMS_OFFSET_RCPLUSSet_mode;
|
||||
|
||||
// EMS_TxTelegram.type_validate = EMS_TYPE_RCPLUSStatusMessage_HC1; // validate by reading from a different telegram
|
||||
if (hc_num == 1) {
|
||||
EMS_TxTelegram.type = EMS_TYPE_RCPLUSSet;
|
||||
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_ID_NONE; // don't validate after the write
|
||||
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RCPLUSStatusMessage_HC1 + hc_num - 1; // after write, do a full fetch of all values
|
||||
}
|
||||
|
||||
EMS_TxTelegram.comparisonOffset = EMS_TxTelegram.offset;
|
||||
|
||||
Reference in New Issue
Block a user