Message ID | 20240423173155.46009-1-sean@mess.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v4l-utils,1/2] ir-ctl: add optional header to manchester encoding | expand |
diff --git a/utils/ir-ctl/bpf_encoder.c b/utils/ir-ctl/bpf_encoder.c index 1d075d94..886f046f 100644 --- a/utils/ir-ctl/bpf_encoder.c +++ b/utils/ir-ctl/bpf_encoder.c @@ -101,6 +101,14 @@ static void encode_manchester(struct keymap *map, uint32_t scancode, int *buf, i { int len = 0, bits, i; + int header_pulse = keymap_param(map, "header_pulse", 0); + int header_space = keymap_param(map, "header_space", 0); + + if (header_pulse > 0) { + manchester_advance_pulse(buf, &len, header_pulse); + manchester_advance_space(buf, &len, header_space); + } + bits = keymap_param(map, "bits", 14); for (i = bits - 1; i >= 0; i--) {
The optional header was not included when transmitting. Signed-off-by: Sean Young <sean@mess.org> --- utils/ir-ctl/bpf_encoder.c | 8 ++++++++ 1 file changed, 8 insertions(+)