Skip to content

Commit

Permalink
Fix DIP decoding for Linear Delta-3 (#3528)
Browse files Browse the repository at this point in the history
Since my original PR (#2239) DIP values produced have been inverted.

Co-authored-by: あく <alleteam@gmail.com>
  • Loading branch information
brandonweeks and skotopes authored Mar 25, 2024
1 parent 8762629 commit bb439a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/subghz/protocols/linear_delta3.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

#define DIP_PATTERN "%c%c%c%c%c%c%c%c"
#define DATA_TO_DIP(dip) \
(dip & 0x0080 ? '1' : '0'), (dip & 0x0040 ? '1' : '0'), (dip & 0x0020 ? '1' : '0'), \
(dip & 0x0010 ? '1' : '0'), (dip & 0x0008 ? '1' : '0'), (dip & 0x0004 ? '1' : '0'), \
(dip & 0x0002 ? '1' : '0'), (dip & 0x0001 ? '1' : '0')
(dip & 0x0080 ? '0' : '1'), (dip & 0x0040 ? '0' : '1'), (dip & 0x0020 ? '0' : '1'), \
(dip & 0x0010 ? '0' : '1'), (dip & 0x0008 ? '0' : '1'), (dip & 0x0004 ? '0' : '1'), \
(dip & 0x0002 ? '0' : '1'), (dip & 0x0001 ? '0' : '1')

static const SubGhzBlockConst subghz_protocol_linear_delta3_const = {
.te_short = 500,
Expand Down

0 comments on commit bb439a9

Please sign in to comment.