Skip to content

Commit

Permalink
Fix Eurochron-EFTH800 radio_clock hour decoding (#2526)
Browse files Browse the repository at this point in the history
This Fixes #2525. Related: #1375, #2331
  • Loading branch information
mykhal authored Jun 8, 2023
1 parent c94ee77 commit 767e538
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/devices/efth800.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ static int eurochron_efth800_decode(r_device *decoder, bitbuffer_t *bitbuffer)
uint8_t *b = bitbuffer->bb[row];

// 0 1 2 3 4 5 6 7
// ?1b CH:3d ID:12d 2b H?6d 2b M:6d 2b S:6d Y?7d D:5d M:4d CHK?8h 1x
int dcf77_hour = (b[2] & 0x3f);
// ?1b CH:3d ID:12d 3b H?5d 2b M:6d 2b S:6d Y?7d D:5d M:4d CHK?8h 1x
// TODO: (b[2] >> 5) may have DST and/or TZ info ?
int dcf77_hour = (b[2] & 0x1f);
int dcf77_min = (b[3] & 0x3f);
int dcf77_sec = (b[4] & 0x3f);
int dcf77_year = (b[5] >> 1);
Expand Down

0 comments on commit 767e538

Please sign in to comment.