mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
xiegu-x6100 - Refactored rig control priming approach to encapsulate it behind a radio configuration property called: primeRig.
This commit is contained in:
@@ -10,6 +10,10 @@ export ET_DEVICE_CAT="/dev/et-cat"
|
|||||||
export ET_DEVICE_GPS="/dev/et-gps"
|
export ET_DEVICE_GPS="/dev/et-gps"
|
||||||
export ET_DEVICE_SDR="/dev/et-sdr"
|
export ET_DEVICE_SDR="/dev/et-sdr"
|
||||||
|
|
||||||
|
# Standardized configuration locations and files
|
||||||
|
export ET_HOME="/opt/emcomm-tools"
|
||||||
|
export ET_ACTIVE_RADIO_CONF="${ET_HOME}/conf/radios.d/active-radio.json"
|
||||||
|
|
||||||
export ESC="\x1B"
|
export ESC="\x1B"
|
||||||
export RED="${ESC}[1;31m"
|
export RED="${ESC}[1;31m"
|
||||||
export BLUE="${ESC}[1;34m"
|
export BLUE="${ESC}[1;34m"
|
||||||
@@ -151,15 +155,14 @@ download_with_retries() {
|
|||||||
# executed before it starts up..
|
# executed before it starts up..
|
||||||
prime_rigctld_conn() {
|
prime_rigctld_conn() {
|
||||||
|
|
||||||
ACTIVE_RADIO=$(et-system-info active-radio)
|
ACTIVE_RADIO=$(jq -r -e '.rigctrl.primeRig' ${ET_ACTIVE_RADIO_CONF})
|
||||||
case "${ACTIVE_RADIO}" in
|
if [[ $? -eq 0 ]]; then
|
||||||
"X6100")
|
if [[ "${ACTIVE_RADIO}" = "true" ]]; then
|
||||||
et-log "Priming rig control client connection for ${ACTIVE_RADIO}"
|
et-log "Priming rig control client connection"
|
||||||
notify_user "Please be patient. Priming connection to radio."
|
notify_user "Please be patient. Priming connection to radio."
|
||||||
rigctl -m 2 f > /dev/null
|
rigctl -m 2 f > /dev/null
|
||||||
;;
|
else
|
||||||
*)
|
et-log "No rigctld priming needed"
|
||||||
et-log "No rigctld priming needed for ${ACTIVE_RADIO}"
|
fi
|
||||||
;;
|
fi
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
"id": "3087",
|
"id": "3087",
|
||||||
"baud": "19200",
|
"baud": "19200",
|
||||||
"ptt": "RIG",
|
"ptt": "RIG",
|
||||||
"conf": "timeout=1000,retry=1,timeout_retry=1"
|
"conf": "timeout=1000,retry=1,timeout_retry=1",
|
||||||
|
"primeRig": true
|
||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
"Turn on radio",
|
"Turn on radio",
|
||||||
|
|||||||
Reference in New Issue
Block a user