fix RC120RF check

This commit is contained in:
MichaelDvP
2025-12-21 11:53:39 +01:00
parent 9957bff62b
commit 31131427b8

View File

@@ -76,9 +76,11 @@ uint8_t Roomctrl::get_hc(uint8_t addr) {
if (addr >= 0x40 && addr <= 0x44 && type_[addr - 0x40] == SENSOR) {
return addr - 0x40; // SENSOR
} else if (addr >= 0x38 && addr <= 0x3B
&& (type_[addr - 0x38] == RC100H || type_[addr - 0x38] == RC200 || type_[addr - 0x38] == RC100 || type_[addr - 0x38] == RT800)) {
return addr - 0x38; // RC100H, RC200
} else if (addr >= 0x18 && addr <= 0x1B && (type_[addr - 0x18] == RC20 || type_[addr - 0x18] == FB10)) {
&& (type_[addr - 0x38] == RC100H || type_[addr - 0x38] == RC200 || type_[addr - 0x38] == RC100 || type_[addr - 0x38] == RT800
|| type_[addr - 0x38] == RC120RF)) {
return addr - 0x38; // RC100H, RC200
}
else if (addr >= 0x18 && addr <= 0x1B && (type_[addr - 0x18] == RC20 || type_[addr - 0x18] == FB10)) {
return addr - 0x18; // RC20, FB10
}
return 0xFF; // invalid