mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
fldigi - Added configuration support for rig control
This commit is contained in:
@@ -1781,7 +1781,7 @@ Generate PTT signal on right audio channel -->
|
|||||||
|
|
||||||
<!-- type: int; default: 0
|
<!-- type: int; default: 0
|
||||||
Use Hamlib rig control -->
|
Use Hamlib rig control -->
|
||||||
<CHKUSEHAMLIBIS>0</CHKUSEHAMLIBIS>
|
<CHKUSEHAMLIBIS>1</CHKUSEHAMLIBIS>
|
||||||
|
|
||||||
<!-- type: int; default: 0
|
<!-- type: int; default: 0
|
||||||
Use RigCAT rig control -->
|
Use RigCAT rig control -->
|
||||||
@@ -1805,7 +1805,7 @@ Hamlib rig name -->
|
|||||||
|
|
||||||
<!-- type: int; default: 0
|
<!-- type: int; default: 0
|
||||||
Hamlib rig model -->
|
Hamlib rig model -->
|
||||||
<HAMRIGMODEL>0</HAMRIGMODEL>
|
<HAMRIGMODEL>2</HAMRIGMODEL>
|
||||||
|
|
||||||
<!-- type: std::string; default: ""
|
<!-- type: std::string; default: ""
|
||||||
Hamlib configuration (param=val, ...) -->
|
Hamlib configuration (param=val, ...) -->
|
||||||
@@ -1865,7 +1865,7 @@ Use separate device for PTT -->
|
|||||||
|
|
||||||
<!-- type: bool; default: false
|
<!-- type: bool; default: false
|
||||||
PTT via Hamlib command -->
|
PTT via Hamlib command -->
|
||||||
<HAMLIBCMDPTT>0</HAMLIBCMDPTT>
|
<HAMLIBCMDPTT>1</HAMLIBCMDPTT>
|
||||||
|
|
||||||
<!-- type: bool; default: false
|
<!-- type: bool; default: false
|
||||||
PTT via RigCAT command -->
|
PTT via RigCAT command -->
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
CMD=et-portaudio
|
CMD=et-portaudio
|
||||||
PORT_AUDIO_CONF=conf.tmp
|
PORT_AUDIO_CONF=conf.tmp
|
||||||
GEO_CONF=geo.tmp
|
GEO_CONF=geo.tmp
|
||||||
FLDIGI_CONF_FILE="${HOME}/.fldigi/fldigi_def.xml"
|
FLDIGI_CONF_DIR="${HOME}/.fldigi"
|
||||||
|
FLDIGI_CONF_FILE="${FLDIGI_CONF_DIR}/fldigi_def.xml"
|
||||||
|
|
||||||
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||||
|
|
||||||
@@ -36,13 +37,20 @@ if [[ $? -ne 0 ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
################################
|
||||||
|
# Bootstrap fldigi configuration
|
||||||
|
################################
|
||||||
|
et-log "Checking for .fldigi directory"
|
||||||
|
[[ ! -e ${FLDIGI_CONF_DIR} ]] && mkdir -v ${FLDIGI_CONF_DIR}
|
||||||
|
|
||||||
et-log "Copying fldigi template..."
|
et-log "Copying fldigi template..."
|
||||||
cp -v ../../overlay/etc/skel/.fldigi/fldigi_def.xml ~/.fldigi/
|
cp -v ../../overlay/etc/skel/.fldigi/fldigi_def.xml ~/.fldigi/
|
||||||
|
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
# Map ALSA ET_AUDIO device to PortAudio device
|
# Map ALSA ET_AUDIO device to PortAudio device
|
||||||
##############################################
|
##############################################
|
||||||
et-log "Updating PortAudio devices..."
|
et-log "Updating PortAudio device configuration..."
|
||||||
|
|
||||||
sed -i "s|^<AUDIOIO>.*|<AUDIOIO>1</AUDIOIO>|" ${FLDIGI_CONF_FILE}
|
sed -i "s|^<AUDIOIO>.*|<AUDIOIO>1</AUDIOIO>|" ${FLDIGI_CONF_FILE}
|
||||||
|
|
||||||
@@ -58,7 +66,7 @@ et-log "Using device '${DEVICE}' and device index '${INDEX}' for PortAudio confi
|
|||||||
#################
|
#################
|
||||||
# Update callsign
|
# Update callsign
|
||||||
#################
|
#################
|
||||||
et-log "Updating callsign..."
|
et-log "Updating callsign configuration..."
|
||||||
CALLSIGN=$(jq -r -e '.callsign' ${ET_USER_CONFIG})
|
CALLSIGN=$(jq -r -e '.callsign' ${ET_USER_CONFIG})
|
||||||
|
|
||||||
if [[ "${CALLSIGN}" = "N0CALL" ]]; then
|
if [[ "${CALLSIGN}" = "N0CALL" ]]; then
|
||||||
@@ -85,3 +93,13 @@ if [[ $? -eq 0 ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -e ${GEO_CONF} ]] && rm ${GEO_CONF}
|
[[ -e ${GEO_CONF} ]] && rm ${GEO_CONF}
|
||||||
|
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# Configure CAT interface using Hamlib's rig control daemon (rigctld)
|
||||||
|
#####################################################################
|
||||||
|
et-log "Updating CAT control configuration..."
|
||||||
|
|
||||||
|
sed -i "s|^<CHKUSEHAMLIBIS>.*|<CHKUSEHAMLIBIS>1</CHKUSEHAMLIBIS>|" ${FLDIGI_CONF_FILE}
|
||||||
|
sed -i "s|^<HAMRIGMODEL>.*|<HAMRIGMODEL>2</HAMRIGMODEL>|" ${FLDIGI_CONF_FILE}
|
||||||
|
sed -i "s|^<HAMLIBCMDPTT>.*|<HAMLIBCMDPTT>1</HAMLIBCMDPTT>|" ${FLDIGI_CONF_FILE}
|
||||||
|
|||||||
Reference in New Issue
Block a user