FreeCalypso > hg > fc-rfcal-tools
changeset 127:fd856f729618
scripts: fc-rfcal-tri850 added
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 24 Dec 2019 07:08:27 +0000 |
parents | 105e3a60edb8 |
children | 623340e2c475 |
files | scripts/Makefile scripts/fc-rfcal-tri850 |
diffstat | 2 files changed, 63 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/Makefile Tue Dec 24 07:05:36 2019 +0000 +++ b/scripts/Makefile Tue Dec 24 07:08:27 2019 +0000 @@ -1,7 +1,7 @@ CC= gcc CFLAGS= -O2 PROGS= fc-rfcal-tee -SCRIPTS=fc-rfcal-tri900 +SCRIPTS=fc-rfcal-tri850 fc-rfcal-tri900 INSTBIN=/opt/freecalypso/bin all: ${PROGS}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/fc-rfcal-tri850 Tue Dec 24 07:08:27 2019 +0000 @@ -0,0 +1,62 @@ +#!/bin/sh + +case $# in + 1) + ;; + 2) + if [ ! -d "$2" ] + then + echo "error: specified report dir $2 is bad" 1>&2 + exit 1 + fi + ;; + *) + echo "usage: $0 txlevels-profile [report-dir]" 1>&2 + exit 1 + ;; +esac + +profile_dir=/opt/freecalypso/rfcal/txlevels + +if [ ! -f "$profile_dir/$1-850" ] +then + echo "error: $profile_dir/$1-850 profile missing" 1>&2 + exit 1 +fi + +if [ ! -f "$profile_dir/$1-1800" ] +then + echo "error: $profile_dir/$1-1800 profile missing" 1>&2 + exit 1 +fi + +if [ ! -f "$profile_dir/$1-1900" ] +then + echo "error: $profile_dir/$1-1900 profile missing" 1>&2 + exit 1 +fi + +report_dir="$2" + +run_cmd() { + if [ -n "$report_dir" ] + then + fc-rfcal-tee "$1" "$report_dir/$2" + else + eval "$1" + fi + rc=$? + if [ $rc != 0 ] + then + echo "error: $1 returned $rc" 1>&2 + exit $rc + fi +} + +run_cmd fc-rfcal-vcxo vcxo +run_cmd "fc-rfcal-rxband 850" rx-850 +run_cmd "fc-rfcal-rxband 1800" rx-1800 +run_cmd "fc-rfcal-rxband 1900" rx-1900 +run_cmd "fc-rfcal-txband 850 $1" tx-850 +run_cmd "fc-rfcal-txband 1800 $1" tx-1800 +run_cmd "fc-rfcal-txband 1900 $1" tx-1900