Skip to content

Commit

Permalink
fix for autogain race condx
Browse files Browse the repository at this point in the history
  • Loading branch information
kx1t committed Nov 8, 2023
1 parent f5d4004 commit a04774f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rootfs/etc/s6-overlay/scripts/dump978
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ if [[ -n "$READSB_SDR_GAIN" ]]; then
sleep 3 # let autogain do its inital thing
if [[ "${READSB_SDR_GAIN,,}" == "autogain" ]] && [[ -f /var/globe_history/autogain/gain ]]; then
read -r gain < /var/globe_history/autogain/gain
DUMP978_CMD+=("--sdr-gain $gain")
gain="${gain:-${DUMP978_AUTOGAIN_INITIAL_GAIN:-${READSB_AUTOGAIN_INITIAL_GAIN:-49.6}}}"
DUMP978_CMD+=("--sdr-gain $gain")
elif [[ -n "$READSB_SDR_GAIN" ]]; then
[[ "${READSB_SDR_GAIN,,}" == "autogain" ]] && gain="${DUMP978_AUTOGAIN_INITIAL_GAIN:-${READSB_AUTOGAIN_INITIAL_GAIN:-49.6}}" || gain="${READSB_SDR_GAIN}"
DUMP978_CMD+=("--sdr-gain $gain")
Expand Down

0 comments on commit a04774f

Please sign in to comment.