rename RC20StatusMessage3 to RC20NStatusMessage

This commit is contained in:
MichaelDvP
2020-04-09 10:56:02 +02:00
parent 32e3e64b4a
commit 4c6410d9ba
3 changed files with 8 additions and 20 deletions

Binary file not shown.

View File

@@ -1177,22 +1177,11 @@ void _process_RC10StatusMessage(_EMS_RxTelegram * EMS_RxTelegram) {
_setValue(EMS_RxTelegram, &EMS_Thermostat.hc[hc].curr_roomTemp, EMS_OFFSET_RC10StatusMessage_curr); // is * 10
}
/**
* type 0xAD - data from the RC20 thermostat (0x17)
* e.g. 17 00 AD 0D 2E
*/
void _process_RC20StatusMessage2(_EMS_RxTelegram * EMS_RxTelegram) {
uint8_t hc = EMS_THERMOSTAT_DEFAULTHC - 1; // use HC1
EMS_Thermostat.hc[hc].active = true;
// _setValue8(EMS_RxTelegram, &EMS_Thermostat.hc[hc].setpoint_roomTemp, 0); // is * 2, force as single byte
}
/**
* type 0xAE - data from the RC20 thermostat (0x17)
* e.g. 17 00 AE 00 80 12 2E 00 D0 00 00 64
*/
void _process_RC20StatusMessage3(_EMS_RxTelegram * EMS_RxTelegram) {
void _process_RC20NStatusMessage(_EMS_RxTelegram * EMS_RxTelegram) {
uint8_t hc = EMS_THERMOSTAT_DEFAULTHC - 1; // use HC1
EMS_Thermostat.hc[hc].active = true;
@@ -2073,7 +2062,7 @@ void ems_getThermostatValues() {
ems_doReadCommand(EMS_TYPE_RC20Set, device_id); // to get the mode
break;
case EMS_DEVICE_FLAG_RC20N:
ems_doReadCommand(EMS_TYPE_RC20StatusMessage3, device_id); // to get the temps
ems_doReadCommand(EMS_TYPE_RC20NStatusMessage, device_id); // to get the temps
ems_doReadCommand(EMS_TYPE_RC20NSet, device_id); // to get the mode
break;
case EMS_DEVICE_FLAG_RC30:
@@ -2468,7 +2457,7 @@ void ems_setThermostatTemp(float temperature, uint8_t hc, _EMS_THERMOSTAT_MODE t
else if (model == EMS_DEVICE_FLAG_RC20N) {
EMS_TxTelegram.type = EMS_TYPE_RC20NSet;
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RC20StatusMessage3;
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RC20NStatusMessage;
EMS_TxTelegram.type_validate = EMS_TxTelegram.type;
switch (temptype) {
case EMS_THERMOSTAT_MODE_NIGHT: // change the night temp
@@ -2781,7 +2770,7 @@ void ems_setThermostatMode(_EMS_THERMOSTAT_MODE mode, uint8_t hc) {
EMS_TxTelegram.type = EMS_TYPE_RC20NSet;
EMS_TxTelegram.offset = EMS_OFFSET_RC20NSet_mode;
EMS_TxTelegram.type_validate = EMS_TYPE_RC20NSet;
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RC20StatusMessage3;
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RC20NStatusMessage;
} else if (model == EMS_DEVICE_FLAG_RC30) {
EMS_TxTelegram.type = EMS_TYPE_RC30Set;
@@ -3241,8 +3230,7 @@ const _EMS_Type EMS_Types[] = {
{EMS_DEVICE_UPDATE_FLAG_THERMOSTAT, EMS_TYPE_RC20Set, "RC20Set", _process_RC20Set},
{EMS_DEVICE_UPDATE_FLAG_THERMOSTAT, EMS_TYPE_RC20NSet, "RC20Set", _process_RC20NSet},
{EMS_DEVICE_UPDATE_FLAG_THERMOSTAT, EMS_TYPE_RC20StatusMessage, "RC20StatusMessage", _process_RC20StatusMessage},
{EMS_DEVICE_UPDATE_FLAG_THERMOSTAT, EMS_TYPE_RC20StatusMessage2, "RC20StatusMessage2", _process_RC20StatusMessage2},
{EMS_DEVICE_UPDATE_FLAG_THERMOSTAT, EMS_TYPE_RC20StatusMessage3, "RC20StatusMessage3", _process_RC20StatusMessage3},
{EMS_DEVICE_UPDATE_FLAG_THERMOSTAT, EMS_TYPE_RC20NStatusMessage, "RC20NStatusMessage", _process_RC20NStatusMessage},
// RC30
{EMS_DEVICE_UPDATE_FLAG_THERMOSTAT, EMS_TYPE_RC30Set, "RC30Set", _process_RC30Set},

View File

@@ -140,11 +140,11 @@
#define EMS_OFFSET_RC20StatusMessage_setpoint 1 // setpoint temp
#define EMS_OFFSET_RC20StatusMessage_curr 2 // current temp
#define EMS_TYPE_RC20StatusMessage2 0xAD
#define EMS_TYPE_RC20StatusMessage3 0xAE
#define EMS_TYPE_RC20NSet 0xAD
#define EMS_TYPE_RC20NStatusMessage 0xAE
#define EMS_OFFSET_RC20NStatusMessage_setpoint 2 // setpoint temp in AE
#define EMS_OFFSET_RC20NStatusMessage_curr 3 // current temp in AE
#define EMS_TYPE_RC20NSet 0xAD
#define EMS_OFFSET_RC20NSet_temp_day 2 // position of thermostat setpoint temperature for day time
#define EMS_OFFSET_RC20NSet_temp_night 1 // position of thermostat setpoint temperature for night time
#define EMS_OFFSET_RC20NSet_mode 3 // position mode