DigiRig - Added supported for the original production run of the DigiRig Mobile v1.9

This commit is contained in:
Gaston Gonzalez
2024-11-21 12:46:36 -07:00
parent 88008e5aad
commit cc89c7f7b1
2 changed files with 45 additions and 2 deletions
@@ -1,6 +1,7 @@
#!/bin/bash
# Author : Gaston Gonzalez
# Date : 11 October 2024
# Updated : 21 November 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.
@@ -26,6 +27,37 @@ test_yaesu_ft891() {
exit 1
}
# Exit with a 0 exit success if, and only if, the currently selected radio
# uses a DigiRig Mobile.
test_digirig_mobile() {
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" == "digirig-mobile-no-cat" ]]; then
et-log "Old DigiRig Mobile detected for no CAT device"
exit 0
fi
if [[ "$ID" == "yaesu-ft818nd" ]]; then
et-log "Old DigiRig Mobile detected for FT-818ND"
exit 0
fi
if [[ "$ID" == "yaesu-ft857d" ]]; then
et-log "Old DigiRig Mobile detected for FT-857D"
exit 0
fi
if [[ "$ID" == "yaesu-ft897d" ]]; then
et-log "Old DigiRig Mobile detected for FT-897D"
exit 0
fi
fi
exit 1
}
usage() {
echo "usage: $(basename $0) <radio ID>"
}
@@ -39,6 +71,8 @@ case $1 in
yaesu-ft891)
test_yaesu_ft891
;;
digirig-mobile)
test_digirig_mobile
esac
exit 1