From b6efc339551f29eda2039c9a9dea3c0cfabeb5fd Mon Sep 17 00:00:00 2001 From: kx1t <15090643+kx1t@users.noreply.github.com> Date: Wed, 25 Oct 2023 23:34:55 -0400 Subject: [PATCH] Ensure autogain respects `READSB_AUTOGAIN_INITIAL_GAIN` at first run --- rootfs/etc/s6-overlay/scripts/readsb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/etc/s6-overlay/scripts/readsb b/rootfs/etc/s6-overlay/scripts/readsb index db55fb5..2d780df 100755 --- a/rootfs/etc/s6-overlay/scripts/readsb +++ b/rootfs/etc/s6-overlay/scripts/readsb @@ -251,7 +251,7 @@ if [[ -n "$READSB_GAIN" ]]; then if [[ "${READSB_GAIN,,}" == "autogain" ]] && [[ -f /var/globe_history/autogain/gain ]]; then read -r gain < /var/globe_history/autogain/gain else - [[ "${READSB_GAIN,,}" == "autogain" ]] && gain="49.6" || gain="${READSB_GAIN}" + [[ "${READSB_GAIN,,}" == "autogain" ]] && gain="${READSB_AUTOGAIN_INITIAL_GAIN:-49.6}" || gain="${READSB_GAIN}" fi READSB_CMD+=("--gain=$gain") fi