From 62fff2c3bfdae3fe8a89db5c6320d799355feb90 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 6 Jan 2020 21:51:02 +0100 Subject: [PATCH] #238 - various optimizatons for multiple HCs on RC35s --- src/ems.cpp | 10 ++++++++-- src/version.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ems.cpp b/src/ems.cpp index cf4e98e49..026633dbc 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -1194,8 +1194,9 @@ void _process_RC30StatusMessage(_EMS_RxTelegram * EMS_RxTelegram) { void _process_RC35StatusMessage(_EMS_RxTelegram * EMS_RxTelegram) { // exit if... // - the 15th byte (second from last) is 0x00, which I think is flow temp, means HC is not is use - // - its not a broadcast, so destination is 0x00 - if ((EMS_RxTelegram->data[14] == 0x00) || (EMS_RxTelegram->dest != EMS_ID_NONE)) { + // - its not a broadcast, so destination is 0x00 (not in use since 6/1/2020 - issue #238) + // if ((EMS_RxTelegram->data[14] == 0x00) || (EMS_RxTelegram->dest != EMS_ID_NONE)) { + if (EMS_RxTelegram->data[14] == 0x00) { return; } @@ -1368,6 +1369,11 @@ int8_t _getHeatingCircuit(_EMS_RxTelegram * EMS_RxTelegram) { return -1; } + // ignore telegrams that have no data, or only a single byte + if (EMS_RxTelegram->data_length <= 1) { + return -1; + } + int8_t hc; switch (EMS_RxTelegram->type) { diff --git a/src/version.h b/src/version.h index 53f287e97..5e99652ca 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define APP_VERSION "1.9.5b14" +#define APP_VERSION "1.9.5b15"