mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-17 21:56:15 +02:00
usrp/sps/: use PATH instead of hard-coding relative paths in invocations
This commit is contained in:
parent
b9244bdefd
commit
cb3e80f502
11
usrp/sps/row
11
usrp/sps/row
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
export GDFONTPATH
|
export GDFONTPATH
|
||||||
GDFONTPATH=$GDFONTPATH:/usr/share/fonts/truetype/ttf-liberation/
|
GDFONTPATH=$GDFONTPATH:/usr/share/fonts/truetype/ttf-liberation/
|
||||||
|
PATH=.:$PATH
|
||||||
|
|
||||||
if ! [ "$1" ]; then
|
if ! [ "$1" ]; then
|
||||||
echo "usage: $0 prefix ..." 1>&2
|
echo "usage: $0 prefix ..." 1>&2
|
||||||
@ -40,7 +41,7 @@ for prefix in "$@"; do
|
|||||||
f=2405
|
f=2405
|
||||||
while [ $f -le 2480 ]; do
|
while [ $f -le 2480 ]; do
|
||||||
echo -n "$f " >>_peak
|
echo -n "$f " >>_peak
|
||||||
./viz -f LiberationSans-Bold -m -p $prefix-$f.png \
|
viz -f LiberationSans-Bold -m -p $prefix-$f.png \
|
||||||
-o $f.fft $prefix $f >>_peak
|
-o $f.fft $prefix $f >>_peak
|
||||||
convert -resize '15%' $prefix-$f.png $prefix-$f-small.png
|
convert -resize '15%' $prefix-$f.png $prefix-$f-small.png
|
||||||
echo "<TD><A href=\"$prefix-$f.png\"><IMG src=\"$prefix-$f-small.png\"></A>"
|
echo "<TD><A href=\"$prefix-$f.png\"><IMG src=\"$prefix-$f-small.png\"></A>"
|
||||||
@ -55,7 +56,7 @@ for prefix in "$@"; do
|
|||||||
while [ $f -le 2480 ]; do
|
while [ $f -le 2480 ]; do
|
||||||
f1=`expr $f + 1`
|
f1=`expr $f + 1`
|
||||||
echo -n "$f1 " >>_peak
|
echo -n "$f1 " >>_peak
|
||||||
./viz -f LiberationSans-Bold -m -p $prefix-$f1.png \
|
viz -f LiberationSans-Bold -m -p $prefix-$f1.png \
|
||||||
-o $f1.fft $prefix $f1 >>_peak
|
-o $f1.fft $prefix $f1 >>_peak
|
||||||
convert -resize '15%' $prefix-$f1.png $prefix-$f1-small.png
|
convert -resize '15%' $prefix-$f1.png $prefix-$f1-small.png
|
||||||
echo "<TD><A href=\"$prefix-$f1.png\"><IMG src=\"$prefix-$f1-small.png\"></A>"
|
echo "<TD><A href=\"$prefix-$f1.png\"><IMG src=\"$prefix-$f1-small.png\"></A>"
|
||||||
@ -70,13 +71,13 @@ for prefix in "$@"; do
|
|||||||
f=\`expr $f + 5\`
|
f=\`expr $f + 5\`
|
||||||
done`
|
done`
|
||||||
|
|
||||||
./range >_tmp
|
range >_tmp
|
||||||
./vizr -f LiberationSans-Bold -p $prefix.png $prefix _tmp
|
vizr -f LiberationSans-Bold -p $prefix.png $prefix _tmp
|
||||||
rm -f $ffts _tmp
|
rm -f $ffts _tmp
|
||||||
convert -resize '15%' $prefix.png $prefix-small.png
|
convert -resize '15%' $prefix.png $prefix-small.png
|
||||||
|
|
||||||
sort -n _peak >_tmp
|
sort -n _peak >_tmp
|
||||||
./vizp -f LiberationSans-Bold -p $prefix-peak.png $prefix _tmp
|
vizp -f LiberationSans-Bold -p $prefix-peak.png $prefix _tmp
|
||||||
rm -f _peak _tmp
|
rm -f _peak _tmp
|
||||||
convert -resize '15%' $prefix-peak.png $prefix-peak-small.png
|
convert -resize '15%' $prefix-peak.png $prefix-peak-small.png
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
PATH=..:$PATH
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
echo "usage: $0 [-f font] [-m] [-o fft_file] [-p png_file] prefix \
|
echo "usage: $0 [-f font] [-m] [-o fft_file] [-p png_file] prefix \
|
||||||
@ -41,8 +43,8 @@ tmp=${out:-_tmp}
|
|||||||
prefix=$1
|
prefix=$1
|
||||||
f=$2
|
f=$2
|
||||||
|
|
||||||
../fft -s 100 -d -w hamming 100 <./$prefix-$f >$tmp
|
fft -s 100 -d -w hamming 100 <$prefix-$f >$tmp
|
||||||
set `./norm $tmp`
|
set `norm $tmp`
|
||||||
|
|
||||||
xm=$1.0 # sample number of y peak
|
xm=$1.0 # sample number of y peak
|
||||||
ym=$2 # magnitude of y peak
|
ym=$2 # magnitude of y peak
|
||||||
|
Loading…
Reference in New Issue
Block a user