fix controller/thermostat clash #321

This commit is contained in:
Paul
2020-02-04 22:12:29 +01:00
parent af3971ef02
commit 7f503b166f
2 changed files with 3 additions and 9 deletions

View File

@@ -1834,12 +1834,12 @@ void _process_Version(_EMS_RxTelegram * EMS_RxTelegram) {
i++; i++;
} }
// not a boiler, continue... // not a boiler, continue by matching the product_id
i = 0; i = 0;
uint8_t found_index = 0; uint8_t found_index = 0;
bool typeFound = false; bool typeFound = false;
while (i < _EMS_Devices_max) { while (i < _EMS_Devices_max) {
if ((EMS_Devices[i].product_id == product_id)) { if ((EMS_Devices[i].product_id == product_id) && (EMS_Devices[i].type != EMS_DEVICE_TYPE_BOILER)) {
// we have a matching product id // we have a matching product id
typeFound = true; typeFound = true;
found_index = i; found_index = i;
@@ -1857,12 +1857,6 @@ void _process_Version(_EMS_RxTelegram * EMS_RxTelegram) {
const char * device_desc_p = (EMS_Devices[found_index].device_desc); // pointer to the full description of the device const char * device_desc_p = (EMS_Devices[found_index].device_desc); // pointer to the full description of the device
_EMS_DEVICE_TYPE type = EMS_Devices[found_index].type; // device type _EMS_DEVICE_TYPE type = EMS_Devices[found_index].type; // device type
// sometimes boilers have a built-in controller on device ID 0x09
// we don't want this to appear as another boiler so switch them
if ((type == EMS_DEVICE_TYPE_BOILER) && (device_id = EMS_ID_CONTROLLER)) {
type = EMS_DEVICE_TYPE_CONTROLLER;
}
// we recognized it, add it to list // we recognized it, add it to list
if (_addDevice(type, product_id, device_id, device_desc_p, version, brand)) { if (_addDevice(type, product_id, device_id, device_desc_p, version, brand)) {
return; // already in list, don't bother initializing it return; // already in list, don't bother initializing it

View File

@@ -1 +1 @@
#define APP_VERSION "1.9.5b27" #define APP_VERSION "1.9.5b28"