I'm using a clone of irtext2udp (mine is in shell, since I don't have python on my picoreplayer system) to help relay IR codes across my network using the LIRC UDP protocol. To test my rewrite, I ran test data through both it and irtext2udp. It quickly became apparent that irtext2udp is broken as written.
Codes whose duration is less than 32768 are translated correctly into two little-endian bytes, with the high bit set for a pulse.
Codes whose duration is longer should create a pair of zero bytes, again with pulses indicated with the high bit set, followed by 4 bytes (little-endian longword) holding the duration. irtext2udp correctly formulates these 6 bytes, but neglects to output the first two.
Simple patch is attached.
There seem to be more problems with irtext2udp than just this. See ticket #379. The patches there include this one, so this can be closed, I guess.
dup of 370