Merge pull request #115 from thetechprepper/feature/mercury-enhancements

Feature/mercury enhancements
This commit is contained in:
thetechprepper
2026-09-05 07:05:27 -07:00
committed by GitHub
6 changed files with 89 additions and 8 deletions
+7 -3
View File
@@ -1,7 +1,7 @@
# EmComm Tools Regression Tests
- **Build**: ETC R7 Build 18
- **Date**: 23 August 2026
- **Build**: ETC R7 Build 19
- **Date**: 31 August 2026
## First Login
@@ -118,6 +118,11 @@
* [ ] et-mode VARA FM (Winlink)
* [ ] et-mode VARA HF (Winlink)
## Mercury HF
* [ ] et-mode Mercury HF (Winlink)
* [ ] et-mercury-stats
## Security
* [ ] gpa
@@ -170,7 +175,6 @@
## Modems
* [ ] modem73
* [ ] mercury
## Email/Internet
+3 -3
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 16 July 2026
# Updated : 26 August 2026
# Updated : 31 August 2026
# Purpose : Wrapper script for starting Mercury with PnP support
#
# Preconditions:
@@ -12,7 +12,7 @@
# 1. Mercury started with sane defaults
ET_MERCURY_HOME="${HOME}/.local/share/emcomm-tools/mercury"
ET_MERCURY_LOG="${ET_MERCURY_HOME}/session.log"
ET_MERCURY_LOG="${ET_MERCURY_HOME}/session.json"
usage() {
echo "usage: $(basename $0) <mode>"
@@ -73,7 +73,7 @@ start() {
ALSA_DEVICE=$(et-system-info et-audio-card)
CMD="mercury -C ${ET_MERCURY_INI} -L ${ET_MERCURY_LOG} -i plughw:${ALSA_DEVICE} -o plughw:${ALSA_DEVICE} ${OPTS}"
CMD="mercury -C ${ET_MERCURY_INI} -J -L ${ET_MERCURY_LOG} -i plughw:${ALSA_DEVICE} -o plughw:${ALSA_DEVICE} ${OPTS}"
et-log "Starting Mercury in mode ${MODE} with: '${CMD}'"
echo
+7 -1
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 6 November 2024
# Updated : 26 August 2026
# Updated : 29 August 2026
# Purpose : Configures the system for a specific mode of operation
# Use a simple text file to save the state of the last mode selected
@@ -104,6 +104,7 @@ select_term_mode () {
term_mode+=("1200" "1200 baud (default for VHF/UHF)")
term_mode+=("9600" "9600 baud (VHF/UHF)")
term_mode+=("300" "300 baud (HF)")
term_mode+=("mercury" "Mercury (HF)")
# Only allow VARA terminal modes when using QtTermTCP
if [[ "${SELECTED_MODE}" == "${MODE_ID_BBS_CLIENT2}" ]]; then
@@ -229,6 +230,11 @@ if [ $exit_status -eq 0 ]; then
sed -i "s|^VARAHF=.*|VARAHF=1|g" ${QTTERMTCP_CONF_FILE}
start_and_wait_for_vara et-vara-hf
;;
"mercury")
sed -i "s|^VARAFM=.*|VARAFM=0|g" ${QTTERMTCP_CONF_FILE}
sed -i "s|^VARAHF=.*|VARAHF=1|g" ${QTTERMTCP_CONF_FILE}
start_and_wait_for_service et-service-mercury-arq
;;
esac
et-log "Starting QtTermTCP."
+63
View File
@@ -0,0 +1,63 @@
#!/bin/bash
# Author : Gaston Gonzalez
# Date : 31 August 2026
# Updated : 1 September 2026
# Purpose : Install Mercury Stats
set -e
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
. ./env.sh
APP=mercury-stats
VERSION=0.2.2
APP_AND_VERSION="${APP}-${VERSION}"
DOWNLOAD_FILE="${APP}-${VERSION}.tar.gz"
URL="https://github.com/thetechprepper/mercury-stats/archive/refs/tags/${VERSION}.tar.gz"
SRC_DIR="${ET_SRC_DIR}/${APP}-${VERSION}"
INSTALL_DIR="/opt/${APP}-${VERSION}"
INSTALL_BIN_DIR="${INSTALL_DIR}/bin"
INSTALL_LIB_DIR="${INSTALL_DIR}/lib/${APP}"
LINK_PATH="/opt/${APP}"
et-log "Installing ${APP} ${VERSION}..."
if [[ ! -e "${ET_DIST_DIR}/${DOWNLOAD_FILE}" ]]; then
et-log "Downloading ${APP}: ${URL}"
curl -s -L -o ${DOWNLOAD_FILE} --fail ${URL}
mv ${DOWNLOAD_FILE} ${ET_DIST_DIR}
fi
CWD_DIR=`pwd`
et-log "Unpacking ${APP} ${VERSION} source..."
tar -xzf "${ET_DIST_DIR}/${DOWNLOAD_FILE}"
[ -e ${SRC_DIR} ] && rm -rf "${SRC_DIR}"
mv "${APP_AND_VERSION}" ${ET_SRC_DIR} && cd ${SRC_DIR}
mkdir -v -p ${INSTALL_LIB_DIR}
cp -v *.py ${INSTALL_LIB_DIR}
mkdir -v -p ${INSTALL_BIN_DIR}
cat <<'EOF' > "${INSTALL_BIN_DIR}/et-mercury-stats"
#!/bin/bash
APP_ROOT="/opt/mercury-stats"
exec /usr/bin/python3 \
"${APP_ROOT}/lib/mercury-stats/mercury_stats.py" \
"$@"
EOF
chmod 755 "${INSTALL_BIN_DIR}/et-mercury-stats"
[[ -e ${LINK_PATH} ]] && rm ${LINK_PATH}
ln -v -s ${INSTALL_DIR} ${LINK_PATH}
stow -v -d /opt ${APP} -t /usr/local
cd $CWD_DIR
+2 -1
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 16 March 2024
# Updated : 9 August 2026
# Updated : 31 August 2026
# Purpose : Main installer for EmComm Tools Community (ETC)
. ./env.sh
@@ -123,6 +123,7 @@ exitIfNotRoot
./install-meshchat.sh
./install-modem73.sh
./install-mercury.sh
./install-mercury-stats.sh
./install-offline-rnode-firmware.sh
# Debrand Ubuntu
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
# Author : Gaston Gonzalez
# Date : 31 August 2026
# Purpose : Test et-mercury-stats installation
OUT=$(which et-mercury-stats)
exit $?