Skip to content

Commit

Permalink
Fix detection for some RadSens hardware versions (meshtastic#5542)
Browse files Browse the repository at this point in the history
Co-authored-by: Jake-B <[email protected]>
  • Loading branch information
2 people authored and fifieldt committed Dec 14, 2024
1 parent f781a92 commit c68a28b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/detect/ScanI2CTwoWire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,14 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)

case CGRADSENS_ADDR:
// Register 0x00 of the RadSens sensor contains is product identifier 0x7D
// Undocumented, but some devices return a product identifier of 0x7A
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 1);
if (registerValue == 0x7D) {
if (registerValue == 0x7D || registerValue == 0x7A) {
type = CGRADSENS;
logFoundDevice("ClimateGuard RadSens", (uint8_t)addr.address);
break;
} else {
LOG_DEBUG("Unexpected Device ID for RadSense: addr=0x%x id=0x%x", CGRADSENS_ADDR, registerValue);
}
break;

Expand Down

0 comments on commit c68a28b

Please sign in to comment.