X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=c%2Fgoertzel%2Fdtmf.sh;h=2abc22b5b9c03f3fbba03a4ff625f729246b5c46;hb=c9be90d53f9bbcbfa1e69f4d245052450b4bd1b8;hp=80a9d5926959a9c2c285f946469228b973c4d21e;hpb=5e47bf73f5ab0c2ced1a62249950db179eaaeef6;p=mirrors%2FPrograms.git diff --git a/c/goertzel/dtmf.sh b/c/goertzel/dtmf.sh index 80a9d59..2abc22b 100755 --- a/c/goertzel/dtmf.sh +++ b/c/goertzel/dtmf.sh @@ -8,7 +8,7 @@ tresh=10 last=''; -./goertzel -n -q -l -r 8000 -d 20 -t $tresh -f 697 -f 770 -f 852 -f 941 -f 1209 -f 1336 -f 1477 -f 1633 $@ | while read line; do +./goertzel -n B -q -l -r 8000 -d 20 -t $tresh -f 697 -f 770 -f 852 -f 941 -f 1209 -f 1336 -f 1477 -f 1633 $@ | while read line; do #echo "$line"; #Get time @@ -24,16 +24,6 @@ last=''; g="$(echo "$line" | cut -f 8)"; h="$(echo "$line" | cut -f 9)"; - #Compare values to treshold - test $a -gt $tresh && a=true || a=false - test $b -gt $tresh && b=true || b=false - test $c -gt $tresh && c=true || c=false - test $d -gt $tresh && d=true || d=false - test $e -gt $tresh && e=true || e=false - test $f -gt $tresh && f=true || f=false - test $g -gt $tresh && g=true || g=false - test $h -gt $tresh && h=true || h=false - #echo "$pos: $a $b $c $d $e $f $g $h"; state="$a$b$c$d$e$f$g$h";