aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2016-11-29 11:00:04 +0000
committerGregor Jasny <gjasny@googlemail.com>2017-01-16 20:56:31 +0100
commitadfcd0105f47b833a976ea1119a1313d7170b97c (patch)
treee77e0beb49bf76f02143cf7d22f7998be08db2c7
parent9ec4c1c7c14ec8cbc4f07fa8f22677ead7e42598 (diff)
ir-ctl: fix rc5x encoding
6th command bit was missing. Signed-off-by: Sean Young <sean@mess.org>
-rw-r--r--utils/ir-ctl/ir-encode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/ir-ctl/ir-encode.c b/utils/ir-ctl/ir-encode.c
index a0d2f4c4..0c1d0d59 100644
--- a/utils/ir-ctl/ir-encode.c
+++ b/utils/ir-ctl/ir-encode.c
@@ -261,7 +261,7 @@ static int rc5_encode(enum rc_proto proto, unsigned scancode, unsigned *buf)
add_bits(scancode, 6);
break;
case RC_PROTO_RC5X:
- add_bits(!!(scancode & 0x4000), 1);
+ add_bits(!(scancode & 0x4000), 1);
add_bits(0, 1);
add_bits(scancode >> 16, 5);
advance_space(NS_TO_US(rc5_unit * 4));
@@ -349,7 +349,7 @@ static const struct {
int (*encode)(enum rc_proto proto, unsigned scancode, unsigned *buf);
} encoders[RC_PROTO_COUNT] = {
[RC_PROTO_RC5] = { "rc5", 0x1f3f, 24, 36000, rc5_encode },
- [RC_PROTO_RC5X] = { "rc5x", 0x1f3f3f, 40, 36000, rc5_encode },
+ [RC_PROTO_RC5X] = { "rc5x", 0x1f7f3f, 40, 36000, rc5_encode },
[RC_PROTO_RC5_SZ] = { "rc5_sz", 0x2fff, 26, 36000, rc5_encode },
[RC_PROTO_SONY12] = { "sony12", 0x1f007f, 25, 40000, sony_encode },
[RC_PROTO_SONY15] = { "sony15", 0xff007f, 31, 40000, sony_encode },

Privacy Policy