1 ./adhoc-test [<options>] <nmra-command> <nmra-args...> see nmra-packets.h
2 ./adhoc-test [<options>] nmra_bytes <nmra-command-hex-no-csum>
3 ./adhoc-test [<options>] nmra_raw <nmra-command-hex-with-csum>
4 ./adhoc-test [<options>] command <literal-data-for-pic>
6 -s<serialport> eg -s/dev/ttyS0 normally necessary
7 -w<repeatdelay> usleep; 0 = no usleep; default is -1 = don't repeat at all
8 -i<iterations> default is -1 = infinite; 0 or 1 means do only once
9 -f<fudgedelay> usleep; each character; default is 0 = no usleep
12 ./adhoc-test -s/dev/ttyS0 -w10000 -i1000 nmra_bytes 0348
13 to tell decoder 3 to go speed 13 backwards every 10ms for 1000 times, ie 10s
14 (on norway this means it actually happens every 20ms, ie for 20s,
15 which makes it a bit of a fudge really)
17 ff ff 80 e4 c1 17 output bytes
18 11111111 11111111 10000000 11100100 11000001 00010111 as bits
19 >1111111 >1111111 >0000000 >1100100 >1000001 $0010111 top bit: >/$ for pic
21 1111111 1111111 0 00000011 0 01001000 0 01001011 1 reorg bits for nmra:
22 preamble (14) S 0AAAAAAA P 01DCSSSS 0 EEEEEEEE 1
26 ./adhoc-test -st nmra_bytes 0348 && binview t