flamp - Added flamp to fldigi autostart; configured flamp to sync with fldigi modem

This commit is contained in:
thetechprepper
2026-03-14 18:17:02 -07:00
parent 9982c13446
commit 9be4931118
6 changed files with 90 additions and 10 deletions
+69
View File
@@ -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) <command>"
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
+4 -3
View File
@@ -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"