small change

This commit is contained in:
MichaelDvP
2020-05-26 11:42:28 +02:00
parent 91f8afd3b1
commit 55c60365f6
3 changed files with 3 additions and 2 deletions

View File

@@ -569,6 +569,7 @@ void EMSESP::incoming_telegram(uint8_t * data, const uint8_t length) {
// check first for echo
uint8_t first_value = data[0];
if (((first_value & 0x7F) == txservice_.ems_bus_id()) && (length > 1)) {
DEBUG_LOG(F("Tx echo"));
return; // it's an echo
}

View File

@@ -153,7 +153,7 @@ void Mixing::process_MMStatusMessage(std::shared_ptr<const Telegram> telegram) {
// the heating circuit is determine by which device_id it is, 0x20 - 0x23
// 0x21 is position 2. 0x20 is typically reserved for the WM10 switch module
// see https://github.com/proddy/EMS-ESP/issues/270 and https://github.com/proddy/EMS-ESP/issues/386#issuecomment-629610918
hc_ = 0x22 - device_id();
hc_ = device_id() - 0x20 + 1;
telegram->read_value(flowTemp_, 1); // is * 10
telegram->read_value(pumpMod_, 3);
telegram->read_value(flowSetTemp_, 0);

View File

@@ -268,7 +268,7 @@ void RxService::add(uint8_t * data, uint8_t length) {
uint8_t message_length;
// work out depending on the type where the data message block starts
if (data[2] < 0xF0) {
if (data[2] < 0xF0 || length < 6) {
// EMS 1.0
type_id = data[2];
message_data = data + 4; // message block starts at 5th byte