Arguments renamed
authorHarvie <tomas@mudrunka.cz>
Wed, 1 Aug 2012 03:32:24 +0000 (05:32 +0200)
committerHarvie <tomas@mudrunka.cz>
Wed, 1 Aug 2012 03:32:24 +0000 (05:32 +0200)
c/goertzel/dtmf.sh
c/goertzel/goertzel.c
c/goertzel/sleepmon.sh

index 2c6547d3a27672667c4f1cfa4708b155b36ba001..80a9d5926959a9c2c285f946469228b973c4d21e 100755 (executable)
@@ -8,7 +8,7 @@
 
 tresh=10
 last='';
-./goertzel -i -q -a -r 8000 -s 400 -t $tresh -f 697 -f 770 -f 852 -f 941 -f 1209 -f 1336 -f 1477 -f 1633 $@ | while read line; do
+./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
        #echo "$line";
 
        #Get time
index 3dd5885abaab28df219d368f244a6ffcfe01bc4c..6b6c5aab81262ed422ca576cf7d3bf61a29315d0 100644 (file)
@@ -82,12 +82,21 @@ int main(int argc, char ** argv) {
        int freqs[argc+1]; freqs[0]=-1;
 
        int opt;
-       while ((opt = getopt(argc, argv, "?d:r:s:f:t:iqna")) != -1) {
+       while ((opt = getopt(argc, argv, "?i:o:a:r:c:d:f:t:nlbq")) != -1) {
                switch (opt) {
+                       case 'i':
+                               freopen(optarg, "r", stdin);
+                               break;
+                       case 'o':
+                               freopen(optarg, "w", stdout);
+                               break;
+                       case 'a':
+                               freopen(optarg, "a", stdout);
+                               break;
                        case 'r':
                                samplerate = atoi(optarg);
                                break;
-                       case 's':
+                       case 'c':
                                samplecount = atoi(optarg);
                                break;
                        case 'd':
@@ -99,13 +108,13 @@ int main(int argc, char ** argv) {
                        case 't':
                                treshold = atoi(optarg);
                                break;
-                       case 'i':
+                       case 'n':
                                integers = 1;
                                break;
-                       case 'a':
+                       case 'l':
                                repeat = 0;
                                break;
-                       case 'n':
+                       case 'b':
                                noreturn = 1;
                                break;
                        case 'q':
index cb28c7187de5e2a7d82c66cfa7f70024293fd5b9..3b975ba06d0c84c9a1913dda205638bef4ac98d2 100755 (executable)
@@ -21,7 +21,7 @@ screen=false
 while getopts "s" OPT; do
        test "$OPT" == 's' && screen=true;
 done
-arecord | ./goertzel -i -q -a -t $tresh -s 2000 | while read line; do
+arecord | ./goertzel -n -q -l -t $tresh -d 4 | while read line; do
        date="$(date +%s)"
        time="$(echo "$line" | cut -f 1)"
        level="$(echo "$line" | cut -f 2)"
This page took 0.164167 seconds and 4 git commands to generate.