Skip to contentSkip to conversation

ir-ctl: fix sharp encoding

PATCH New Sean Young 1 participant 1 message Oct 6, 2023 Media (V4L/DVB)

lore
Share & tools
lore

Sean Young

author
#0 lore raw

PATCH 1/1 ir-ctl: fix sharp encoding

The Sharp protocol[1] encoding has incorrect timings for bit space.

[1] https://www.sbprojects.net/knowledge/ir/sharp.php

---
 utils/common/ir-encode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
utils/common/ir-encode.c +2 -2
index b3757e12..4d43eb9d 100644
@@ -144,9 +144,9 @@ static void sharp_add_bits(unsigned **buf, int bits, int count)
 		*(*buf)++ = NS_TO_US(sharp_unit * 8);
 
 		if (bits & (1 << i))
-			*(*buf)++ = NS_TO_US(sharp_unit * 50);
+			*(*buf)++ = NS_TO_US(sharp_unit * 42);
 		else
-			*(*buf)++ = NS_TO_US(sharp_unit * 25);
+			*(*buf)++ = NS_TO_US(sharp_unit * 17);
 	}
 }
 
Signature · 1 line
2.42.0