FT-891 - Initial experimental support for the Yaesu FT-891 via the DigiRig DR-891. This radio is a pain!

This commit is contained in:
Gaston Gonzalez
2024-11-11 13:38:44 -07:00
parent d2844271cf
commit 66fa7d3744
4 changed files with 96 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/bin/bash
# Author : Gaston Gonzalez
# Date : 11 October 2024
# Purpose : Perform tests that can be used by the udev subsystem to aid
# in rule development. This is intended to by used with the PROGRAM
# directive inside of a udev rule.
#
# Exit Statuses:
# 0 udev rule should match
# 1 udev rule should not match.
ET_HOME=/opt/emcomm-tools
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/active-radio.json"
# Exit with a 0 exit success if, and only if, the currently selected radio is
# a Yaesu FT-891.
test_yaesu_ft891() {
if [ -L "${ET_HOME}/conf/radios.d/active-radio.json" ]; then
ID=$(cat "${ET_HOME}/conf/radios.d/active-radio.json" | jq -r .id)
if [[ "$ID" == "yaesu-ft891" ]]; then
exit 0
fi
fi
exit 1
}
usage() {
echo "usage: $(basename $0) <radio ID>"
}
if [ $# -ne 1 ]; then
usage
exit 1
fi
case $1 in
yaesu-ft891)
test_yaesu_ft891
;;
esac
exit 1