fix read_bitvalue() - for solar pump on/off in #397

This commit is contained in:
proddy
2020-06-22 20:51:08 +02:00
parent b643a7d8a7
commit 03500ceb3b
3 changed files with 11 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ class Telegram {
return; // out of bounds
}
value = (uint8_t)(((message_data[index]) >> (bit)) & 0x01);
value = (uint8_t)(((message_data[index - offset]) >> (bit)) & 0x01);
}
// read values from a telegram. We always store the value, regardless if its garbage