From 1ef1f9cd713abf8dbbbfc917edb595b287f1d987 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Wed, 14 Dec 2011 20:49:15 +0000 Subject: [PATCH] added pollin codes --- rf433rcv/pc/autotaste.sh | 17 +++++++++++++++++ rf433rcv/pc/decode.pl | 4 ++-- rf433rcv/pc/plot.py | 3 ++- rf433rcv/pc/testdata/11111_a_bin | Bin 0 -> 102 bytes rf433rcv/pc/testdata/11111_a_bin_off | Bin 0 -> 102 bytes rf433rcv/pc/testdata/11111_b_bin | Bin 0 -> 102 bytes rf433rcv/pc/testdata/11111_b_bin_off | Bin 0 -> 102 bytes rf433rcv/pc/testdata/11111_c_bin | Bin 0 -> 102 bytes rf433rcv/pc/testdata/11111_c_bin_off | Bin 0 -> 102 bytes rf433rcv/pc/testdata/11111_d_bin | Bin 0 -> 102 bytes rf433rcv/pc/testdata/11111_d_bin_off | Bin 0 -> 103 bytes 11 files changed, 21 insertions(+), 3 deletions(-) create mode 100755 rf433rcv/pc/autotaste.sh create mode 100644 rf433rcv/pc/testdata/11111_a_bin create mode 100644 rf433rcv/pc/testdata/11111_a_bin_off create mode 100644 rf433rcv/pc/testdata/11111_b_bin create mode 100644 rf433rcv/pc/testdata/11111_b_bin_off create mode 100644 rf433rcv/pc/testdata/11111_c_bin create mode 100644 rf433rcv/pc/testdata/11111_c_bin_off create mode 100644 rf433rcv/pc/testdata/11111_d_bin create mode 100644 rf433rcv/pc/testdata/11111_d_bin_off 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 0000000000000000000000000000000000000000..195e67dba2ba21a48c0164d000dcd243439d46eb GIT binary patch literal 102 zcmZRUWWWLH85sUCF#KU;_yI)B3?JAT9`G|9;Ad!%XK1izV1P;kRs5F+N&l~Zz|L^s U|NjF(>Hq(kfzowAIfyhP0PBhzs{jB1 literal 0 HcmV?d00001 diff --git a/rf433rcv/pc/testdata/11111_a_bin_off b/rf433rcv/pc/testdata/11111_a_bin_off new file mode 100644 index 0000000000000000000000000000000000000000..3cd52a6b65a3d6ec6e82691f98460799ddf471e3 GIT binary patch literal 102 zcmZ|Gu?@f=5Cp+R9}p5d`cmAPO=*-u2@VMmXI_qd+H7=o@Us&xn7hO<9;0V^p*hvz V@5y8=L?D literal 0 HcmV?d00001 diff --git a/rf433rcv/pc/testdata/11111_b_bin b/rf433rcv/pc/testdata/11111_b_bin new file mode 100644 index 0000000000000000000000000000000000000000..49b3d8f964df3e3114c02ff428dc003f0576e165 GIT binary patch literal 102 zcmZ|Fu?@f=5Cp+R1cbznD22|z?#!jQ1cwAK9shFd(`Iw|;Ab5s3@})Um3a$K<@Oq< Uvs6AdXZ2tySh^bcBUsha2Bgay6aWAK literal 0 HcmV?d00001 diff --git a/rf433rcv/pc/testdata/11111_b_bin_off b/rf433rcv/pc/testdata/11111_b_bin_off new file mode 100644 index 0000000000000000000000000000000000000000..2dcb043d3700a60cbda9d9898ae9d1145607fa6d GIT binary patch literal 102 zcmZRUV!#3F85rsq82$heBf}47h7ZgP57-$F@G~5cXK1izU;v_j|M`K^KOoZo>p{~0 O|2F`o|Nm!3l?DLK+Z+D? literal 0 HcmV?d00001 diff --git a/rf433rcv/pc/testdata/11111_c_bin b/rf433rcv/pc/testdata/11111_c_bin new file mode 100644 index 0000000000000000000000000000000000000000..00fda8a64dcca5de6c1c9bf54581615078812eb2 GIT binary patch literal 102 zcmZRUWWWLH85rsq82&LZ{9$DH!OZXhh}an(@G~5cXK1izU;v{3|M@}E|K)!$!leKI SKfuq>@c%zEP#R(YSQ-G%=Nn4^ literal 0 HcmV?d00001 diff --git a/rf433rcv/pc/testdata/11111_c_bin_off b/rf433rcv/pc/testdata/11111_c_bin_off new file mode 100644 index 0000000000000000000000000000000000000000..e525e35e5c98398955ac1dd35e62e02d6f7c19d5 GIT binary patch literal 102 zcmZRUWWWv@>=_v985sUCF#KU)_`%5VgPGw2JHrEhh66w(&j6DC|DU}MDE(jl4_x~H Oe~|S5|BVP~kZu40=^V=d literal 0 HcmV?d00001 diff --git a/rf433rcv/pc/testdata/11111_d_bin b/rf433rcv/pc/testdata/11111_d_bin new file mode 100644 index 0000000000000000000000000000000000000000..95bc158fd68c286a30817e399078bf325ce2c7f6 GIT binary patch literal 102 zcmZ|Hu?@f=5JS;_x`L8A6{E0O!f1@b2$U2N7c)RCcTcuo{N#ZfUe#F6bVj0QdZ87l Wup@18lx57Q;vvqo2or044i0~^jv6Td literal 0 HcmV?d00001 diff --git a/rf433rcv/pc/testdata/11111_d_bin_off b/rf433rcv/pc/testdata/11111_d_bin_off new file mode 100644 index 0000000000000000000000000000000000000000..60a2f86c5cff6196ce48b5d3dae439fc4dfd2f97 GIT binary patch literal 103 zcmZRUWWWLH85rsq82$heBf}47h7arv4}gfD;eb3tgFOQS5dHhl{|_krUmhg=zaAm| Q|35QWnjIt!)Xm5R0QFcKyZ`_I literal 0 HcmV?d00001 -- 1.7.10.4