Skip to content

Commit 9a78a48

Browse files
authored
Add new Oregon Scientific V3 models (#3234)
1 parent da289d3 commit 9a78a48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/devices/oregon_scientific.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#define ID_AWR129 0xec41 // similar to THR228N, but an extra 100s digit
2828
#define ID_RTGN318 0x0cc3 // warning: id is from 0x0cc3 and 0xfcc3
2929
#define ID_RTGN129 0x0cc3 // same as RTGN318 but different packet size
30-
#define ID_THGR810 0xf824 // This might be ID_THGR81, but what's true is lost in (git) history
30+
#define ID_THGR810 0xf024 // This might be ID_THGR81, but what's true is lost in (git) history, #3221 Add new Oregon Scientific v3 models, original id is 0xf824, new rolling ids are 0xf024, 0xf224, 0xfa24 for rebranded sensor versions Newentor, Unni, Liorque.
3131
#define ID_THGR810a 0xf8b4 // unconfirmed version
3232
#define ID_THN802 0xc844
3333
#define ID_PCR800 0x2914
@@ -656,7 +656,7 @@ static int oregon_scientific_v3_decode(r_device *decoder, bitbuffer_t *bitbuffer
656656
int device_id = (msg[2] & 0x0f) | (msg[3] & 0xf0); // not for CM sensor types
657657
int battery_low = (msg[3] >> 2) & 0x01; // not for CM sensor types
658658

659-
if (sensor_id == ID_THGR810 || sensor_id == ID_THGR810a) {
659+
if ((sensor_id & 0xf0ff) == ID_THGR810 || sensor_id == ID_THGR810a) { // rolling ids 0xf024, 0xf224, 0xf824, 0xfa24, 3 from 4 nibbles are checked see #3221
660660
if (validate_os_checksum(decoder, msg, 15) != 0)
661661
return DECODE_FAIL_MIC;
662662
// Sanity check BCD digits

0 commit comments

Comments
 (0)