Ingore last three bytes of truma_message_header #25.
This commit is contained in:
parent
70aefdd705
commit
a743ee12f8
@ -132,7 +132,7 @@ const u_int8_t *TrumaiNetBoxApp::lin_multiframe_recieved(const u_int8_t *message
|
||||
if (message_len < truma_message_header.size()) {
|
||||
return nullptr;
|
||||
}
|
||||
for (u_int8_t i = 1; i < truma_message_header.size(); i++) {
|
||||
for (u_int8_t i = 1; i < truma_message_header.size() - 3; i++) {
|
||||
if (message[i] != truma_message_header[i]) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
namespace esphome {
|
||||
namespace truma_inetbox {
|
||||
// First byte is service identifier and to be ignored.
|
||||
// First byte is service identifier and to be ignored. Last three bytes can be `xFF` or `x00` (see <https://github.com/Fabian-Schmidt/esphome-truma_inetbox/issues/25>).
|
||||
const std::array<u_int8_t, 11> truma_message_header = {0x00, 0x00, 0x1F, 0x00, 0x1E, 0x00,
|
||||
0x00, 0x22, 0xFF, 0xFF, 0xFF};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user