diff options
author | Sean Young <sean@mess.org> | 2016-12-09 13:50:58 +0000 |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2017-01-16 20:56:31 +0100 |
commit | 77ffb6a80a7c3bf874f2f0d61a22d3736e09547b (patch) | |
tree | de532abdfc889b450baecb3704902db110c34186 | |
parent | e6822d2a1c18836df9664cbdb425adb7cb2c479d (diff) |
ir-ctl: rc5 command 6th bit missing
This is called extended rc5, not be confused with rc5x_20.
Signed-off-by: Sean Young <sean@mess.org>
-rw-r--r-- | utils/ir-ctl/ir-encode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/ir-ctl/ir-encode.c b/utils/ir-ctl/ir-encode.c index 49c422e9..4f1a87af 100644 --- a/utils/ir-ctl/ir-encode.c +++ b/utils/ir-ctl/ir-encode.c @@ -250,7 +250,8 @@ static int rc5_encode(enum rc_proto proto, unsigned scancode, unsigned *buf) default: return 0; case RC_PROTO_RC5: - add_bits(2, 2); + add_bits(!(scancode & 0x40), 1); + add_bits(0, 1); add_bits(scancode >> 8, 5); add_bits(scancode, 6); break; @@ -348,7 +349,7 @@ static const struct { unsigned carrier; 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_RC5] = { "rc5", 0x1f7f, 24, 36000, rc5_encode }, [RC_PROTO_RC5X_20] = { "rc5x_20", 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 }, |