bengtmartensson / IrpTransmogrifier

Parser for IRP notation protocols, with rendering, code generation, and decoding.
http://www.harctoolbox.org/
GNU General Public License v3.0
26 stars 4 forks source link

Render succeeds without enough bits for bitspec #236

Closed seanyoung closed 1 year ago

seanyoung commented 1 year ago

The following fails because the bit spec has 4 values, so 2 bits are required. Only 1 bit is provided.

./irptransmogrifier.sh --irp '{100}<1|2|3|4>(S:1)' render -r -n F=0,S=99
EvaluatedIrSequence cannot be (completely) evaluated

However, in the following IRP it does succeed:

/irptransmogrifier.sh --irp '{100}<1,-1|1,-3>(F:1,<1|2|3|4>(S:1))' render -r -n F=0,S=99
Freq=38000Hz[+100,-100,+100,-300][][]

I would expect this to fail too.

bengtmartensson commented 1 year ago

Thank you for the report. I hope that fix shows to be OK.