This commit is contained in:
Paul Derbyshire
2019-08-13 19:39:28 +02:00
parent 31327ff7e6
commit e12fa66462
2 changed files with 7 additions and 4 deletions

View File

@@ -17,7 +17,7 @@
uint8_t _TEST_DATA_max = ArraySize(TEST_DATA);
#endif
// myESP for logging to telnet and serial
// MyESP class for logging to telnet and serial
#define myDebug(...) myESP.myDebug(__VA_ARGS__)
#define myDebug_P(...) myESP.myDebug_P(__VA_ARGS__)
@@ -625,7 +625,7 @@ void _ems_sendTelegram() {
// complete the rest of the header depending on EMS or EMS+
if (EMS_TxTelegram.type > 0xFF) {
// EMS 2.0 / emsplus
// EMS 2.0 / EMS+
EMS_TxTelegram.data[2] = 0xFF; // fixed value indicating an extended message
EMS_TxTelegram.data[3] = EMS_TxTelegram.offset;
EMS_TxTelegram.data[4] = EMS_TxTelegram.dataValue; // for read its #bytes to return, for write it the value to set
@@ -2470,7 +2470,6 @@ void ems_setThermostatTemp(float temperature, uint8_t temptype) {
EMS_TxTelegram.type = EMS_TYPE_RC30Set;
EMS_TxTelegram.offset = EMS_OFFSET_RC30Set_temp;
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RC30StatusMessage;
} 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
@@ -2510,6 +2509,10 @@ void ems_setThermostatTemp(float temperature, uint8_t temptype) {
}
}
// TODO XXX hack, please remove
EMS_TxTelegram.type = EMS_TYPE_RCPLUSSet; // for 3000 and 1010, e.g. 0B 10 FF (0A | 08) 01 89 2B
EMS_TxTelegram.offset = 0x08; // auto offset
EMS_TxTelegram.length = EMS_MIN_TELEGRAM_LENGTH;
EMS_TxTelegram.dataValue = (uint8_t)((float)temperature * (float)2); // value * 2
EMS_TxTelegram.type_validate = EMS_TxTelegram.type;