mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 16:59:50 +03:00
small change
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user