I'm trying to learn IRP, and as an exercise I thought I would write the IRP for the iMON PAD remote. The protocol is slightly bizarre:
- start by single pulse
- bit is encoded by single pulse or space
- between each bit there is a pulse or space (call that chk)
for some positions chk is always space
for other positions chk is space iff bit before and after are 0, else pulse.
I wrote an handwritten encoder/decoder: https://git.kernel.org/pub/scm/linux/ke ... -decoder.c
So after some reading and parsing I wrote:
Code: Select all
{38k, 416, msb}<-1|1>(1, C:30:29, F:30:29, 0, F:29:28, 0, F:28:27, 0, F:27:26, 0, F:26:25, C:25:24, F:25:24, C:24:23, F:24:23, 0, F:23:22, C:22:21, F:22:21, C:21:20, F:21:20, C:20:19, F:20:19, C:19:18, F:19:18, C:18:17, F:18:17, C:17:16, F:17:16, C:16:15, F:16:15, 0, F:15:14, C:14:13, F:14:13, C:13:12, F:13:12, C:12:11, F:12:11, C:11:10, F:11:10, C:10:9, F:10:9, C:9:8, F:9:8, 0, F:8:7, 0, F:7:6, 0, F:6:5, 0, F:5:4, 0, F:4:3, 0, F:3:2, 0, F:2:1, 0, F:1:0) {C=F|(F/2)}
Code: Select all
$ ./irptransmogrifier.sh render --raw -n "F=1" iMON
Exception in thread "main" org.harctoolbox.ircore.ThisCannotHappenException
at org.harctoolbox.irp.EvaluatedIrStream.mkIrSequence(EvaluatedIrStream.java:50)
at org.harctoolbox.irp.EvaluatedIrStream.toIrSequence(EvaluatedIrStream.java:92)
at org.harctoolbox.irp.RenderData.toIrSequence(RenderData.java:40)
at org.harctoolbox.irp.Protocol.toIrSequence(Protocol.java:352)
at org.harctoolbox.irp.Protocol.toIrSignal(Protocol.java:289)
at org.harctoolbox.irp.NamedProtocol.render(NamedProtocol.java:306)
at org.harctoolbox.cmdline.CommandRender$Renderer.render(CommandRender.java:148)
at org.harctoolbox.cmdline.CommandRender$Renderer.render(CommandRender.java:132)
at org.harctoolbox.cmdline.CommandRender$Renderer.access$1(CommandRender.java:118)
at org.harctoolbox.cmdline.CommandRender.render(CommandRender.java:103)
at org.harctoolbox.irp.IrpTransmogrifier.run(IrpTransmogrifier.java:196)
at org.harctoolbox.irp.IrpTransmogrifier.main(IrpTransmogrifier.java:89)
at org.harctoolbox.irp.IrpTransmogrifier.main(IrpTransmogrifier.java:95)
Code: Select all
<irp:protocol name="iMON">
<irp:irp><![CDATA[{38k,416,msb}<-1|1>(1,1) [F:0..31]]]></irp:irp>
<irp:documentation>Used by the iMON SoundGraph remote, which was later rebranded to Antec Veris</irp:documentation>
</irp:protocol>
Is my IRP plain wrong or should I post the IrpTransmogrifier github issues page?