From 09c46a33817474946b6c586a7d240eefb49b912b Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Fri, 22 Mar 2024 11:30:55 +0300 Subject: [PATCH] Fix DIP decoding for Linear Delta-3 by brandonweeks https://github.com/flipperdevices/flipperzero-firmware/pull/3528/files --- lib/subghz/protocols/linear_delta3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/subghz/protocols/linear_delta3.c b/lib/subghz/protocols/linear_delta3.c index 97ac5cc5a..321d25d41 100644 --- a/lib/subghz/protocols/linear_delta3.c +++ b/lib/subghz/protocols/linear_delta3.c @@ -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,