From: Othmar Gsenger Date: Wed, 14 Dec 2011 20:49:15 +0000 (+0000) Subject: added pollin codes X-Git-Url: https://git.realraum.at/?p=svn42.git;a=commitdiff_plain;h=1ef1f9cd713abf8dbbbfc917edb595b287f1d987 added pollin codes --- diff --git a/rf433rcv/pc/autotaste.sh b/rf433rcv/pc/autotaste.sh new file mode 100755 index 0000000..a62f6b2 --- /dev/null +++ b/rf433rcv/pc/autotaste.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +FN=`mktemp` +FN2=`mktemp` +FN3=`mktemp` +echo $FN >&2 +echo $FN2 >&2 +echo $FN3 >&2 +./rawhid_test > $FN +./decode.pl $FN $1 | xargs ./decode2.pl $FN > $FN2 +if [ $1 -eq 1 ]; then + ./swap.pl < $FN2 >$FN3 +else + cat $FN2 > $FN3 +fi +./plot.py < $FN3 +./compress < $FN3 diff --git a/rf433rcv/pc/decode.pl b/rf433rcv/pc/decode.pl index 5c401e7..f9aeb32 100755 --- a/rf433rcv/pc/decode.pl +++ b/rf433rcv/pc/decode.pl @@ -53,11 +53,11 @@ if (defined $ARGV[0]) { if ($start) { - print $counter-2."\n"; + print $counter-2,"\n"; last; } else { $start =1; - print $counter-1." "; + print $counter-1," "; } } $counter+=$data->[1]; diff --git a/rf433rcv/pc/plot.py b/rf433rcv/pc/plot.py index 97db370..74553f6 100755 --- a/rf433rcv/pc/plot.py +++ b/rf433rcv/pc/plot.py @@ -6,6 +6,7 @@ import pylab for datastr in fileinput.input(): data=numpy.array(list(datastr)) pylab.plot(range(len(datastr)),data) - pylab.axis([0, len(datastr),-0.5, 1.5]) + pylab.hold(True) + pylab.axis([0, len(datastr),-0.5, 3.5]) pylab.show() diff --git a/rf433rcv/pc/testdata/11111_a_bin b/rf433rcv/pc/testdata/11111_a_bin new file mode 100644 index 0000000..195e67d Binary files /dev/null and b/rf433rcv/pc/testdata/11111_a_bin differ diff --git a/rf433rcv/pc/testdata/11111_a_bin_off b/rf433rcv/pc/testdata/11111_a_bin_off new file mode 100644 index 0000000..3cd52a6 Binary files /dev/null and b/rf433rcv/pc/testdata/11111_a_bin_off differ diff --git a/rf433rcv/pc/testdata/11111_b_bin b/rf433rcv/pc/testdata/11111_b_bin new file mode 100644 index 0000000..49b3d8f Binary files /dev/null and b/rf433rcv/pc/testdata/11111_b_bin differ diff --git a/rf433rcv/pc/testdata/11111_b_bin_off b/rf433rcv/pc/testdata/11111_b_bin_off new file mode 100644 index 0000000..2dcb043 Binary files /dev/null and b/rf433rcv/pc/testdata/11111_b_bin_off differ diff --git a/rf433rcv/pc/testdata/11111_c_bin b/rf433rcv/pc/testdata/11111_c_bin new file mode 100644 index 0000000..00fda8a Binary files /dev/null and b/rf433rcv/pc/testdata/11111_c_bin differ diff --git a/rf433rcv/pc/testdata/11111_c_bin_off b/rf433rcv/pc/testdata/11111_c_bin_off new file mode 100644 index 0000000..e525e35 Binary files /dev/null and b/rf433rcv/pc/testdata/11111_c_bin_off differ diff --git a/rf433rcv/pc/testdata/11111_d_bin b/rf433rcv/pc/testdata/11111_d_bin new file mode 100644 index 0000000..95bc158 Binary files /dev/null and b/rf433rcv/pc/testdata/11111_d_bin differ diff --git a/rf433rcv/pc/testdata/11111_d_bin_off b/rf433rcv/pc/testdata/11111_d_bin_off new file mode 100644 index 0000000..60a2f86 Binary files /dev/null and b/rf433rcv/pc/testdata/11111_d_bin_off differ