diff --git a/REGRESSION.md b/REGRESSION.md index 82b0ab4..a0789a6 100644 --- a/REGRESSION.md +++ b/REGRESSION.md @@ -108,12 +108,19 @@ ## fldigi/flmsg/flamp * [ ] Launch fldigi from Application Launcher -* [ ] Confirm callsign under Config > Personal data -* [ ] Confirm custom AmRRON forms * [ ] Confirm flmsg starts with fldigi -* [ ] Confirm flmsg modem syncs with fldigi modem -* [ ] Confirm two rows of macros +* [ ] Confirm flamp starts with fldigi +* [ ] On fldigi + * [ ] Confirm hamlib and callsign in application title + * [ ] Confirm custom AmRRON forms + * [ ] Confirm two rows of macros * [ ] Confirm AmRRON 2022 macros under: File > Macros > Open +* [ ] On flmsg + * [ ] Confirm callsign under Config > Personal data + * [ ] Confirm flmsg modem syncs with fldigi modem +* [ ] On flamp + * [ ] Confirm callsign + * [ ] Confirm flamp modem syncs with fldigi modem ## Offline Resources diff --git a/overlay/etc/skel/.fldigi/fldigi_def.xml b/overlay/etc/skel/.fldigi/fldigi_def.xml index a99a778..937ff57 100644 --- a/overlay/etc/skel/.fldigi/fldigi_def.xml +++ b/overlay/etc/skel/.fldigi/fldigi_def.xml @@ -3207,7 +3207,7 @@ Full pathname to the flrig executable --> - +/opt/emcomm-tools/bin/et-flamp start @@ -3243,7 +3243,7 @@ Enable on program start --> -0 +1 diff --git a/overlay/etc/skel/.nbems/FLAMP/FLAMP.prefs b/overlay/etc/skel/.nbems/FLAMP/FLAMP.prefs index e88b3ee..0286312 100644 --- a/overlay/etc/skel/.nbems/FLAMP/FLAMP.prefs +++ b/overlay/etc/skel/.nbems/FLAMP/FLAMP.prefs @@ -21,7 +21,7 @@ compression:1 encoder:3 encoder_string:base256 sync_mode_flamp_fldigi:0 -sync_mode_fldigi_flamp:0 +sync_mode_fldigi_flamp:1 fldigi_xmt_mode_change:0 repeat_every:1 repeat_at_times:0 diff --git a/overlay/opt/emcomm-tools/bin/et-flamp b/overlay/opt/emcomm-tools/bin/et-flamp new file mode 100755 index 0000000..f20f94c --- /dev/null +++ b/overlay/opt/emcomm-tools/bin/et-flamp @@ -0,0 +1,69 @@ +#!/bin/bash +# +# Author : Gaston Gonzalez +# Date : 14 March 2026 +# Purpose : Wrapper script for starting flamp with PnP support +# +# Preconditions +# 1. None +# +# Postconditions +# 1. flamp core settings updated +# 2. flamp started + +usage() { + echo "usage: $(basename $0) " + echo " start - Update config and start flamp" + echo " update-config - Update config" +} + +if [[ $# -ne 1 ]]; then + usage + exit 1 +fi + +start() { + update-config && /usr/local/bin/flamp & +} + +update-config () { + + FLMSG_CONF_DIR="${HOME}/.nbems" + FLAMP_CONF_DIR="${HOME}/.nbems/FLAMP" + FLAMP_CONF_FILE="${FLAMP_CONF_DIR}/FLAMP.prefs" + + if [[ ! -e ${FLAMP_CONF_FILE} ]]; then + et-log "${FLAMP_CONF_FILE} does not exist. Creating it from template." + cp -r /etc/skel/.nbems ${HOME} + fi + + [ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json" + + ################# + # Update callsign + ################# + et-log "Updating callsign configuration..." + CALLSIGN=$(jq -r -e '.callsign' ${ET_USER_CONFIG}) + + if [[ "${CALLSIGN}" = "N0CALL" ]]; then + et-log "Exiting early. No callsign set. Run: et-user." + exit 1 + fi + + et-log "Using callsign '${CALLSIGN}'" + sed -i "s|^mycall:.*|mycall:${CALLSIGN}|" ${FLAMP_CONF_FILE} +} + +case $1 in + start) + start + ;; + update-config) + update-config + ;; + *) + echo "Invalid command." + usage + exit 1 + ;; +esac diff --git a/overlay/opt/emcomm-tools/bin/et-flmsg b/overlay/opt/emcomm-tools/bin/et-flmsg index d386ec3..bb3b7d1 100755 --- a/overlay/opt/emcomm-tools/bin/et-flmsg +++ b/overlay/opt/emcomm-tools/bin/et-flmsg @@ -2,6 +2,7 @@ # # Author : Gaston Gonzalez # Date : 13 March 2026 +# Updated : 14 March 2026 # Purpose : Wrapper script for starting flmsg with PnP support # # Preconditions @@ -31,9 +32,9 @@ update-config () { FLMSG_CONF_DIR="${HOME}/.nbems" FLMSG_CONF_FILE="${FLMSG_CONF_DIR}/FLMSG.prefs" - if [[ ! -e ${FLMSG_CONF_DIR} ]]; then - et-log "${FLMSG_CONF_DIR} does not exist. Creating it from template." - cp -r /etc/skel/.nbems ${FLMSG_CONF_DIR} + if [[ ! -e ${FLMSG_CONF_FILE} ]]; then + et-log "${FLMSG_CONF_FILE} does not exist. Creating it from template." + cp -r /etc/skel/.nbems ${HOME} fi [ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json" diff --git a/scripts/install-flamp.sh b/scripts/install-flamp.sh index e4c2e74..cb9b09d 100755 --- a/scripts/install-flamp.sh +++ b/scripts/install-flamp.sh @@ -41,4 +41,7 @@ make install [[ -e ${LINK_PATH} ]] && rm ${LINK_PATH} ln -v -s ${INSTALL_DIR} ${LINK_PATH} +# Use wrapper script as launcher executable +sed -i 's|^Exec.*|Exec=/opt/emcomm-tools/bin/et-flamp start|' /opt/flamp/share/applications/flamp.desktop + stow -v -d /opt ${APP} -t /usr/local