Skip to content

Commit 1adb05f

Browse files
wiedehopffredclausen
authored andcommitted
remove unnecessary code processing the soapysdr string
not sure why this was ever necessary, remove it should also fix SOAPYSDR using a serial with a space in it not really a common use case but still
1 parent 87f9962 commit 1adb05f

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

rootfs/etc/s6-overlay/scripts/01-acarsdec

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ if [[ -z "${SOAPYSDR}" ]] && [[ -z "${RTL_SERIAL}" ]] && [[ -z "${SERIAL}" ]] ;
5454
"${s6wrap[@]}" echo "Either RTL_SERIAL or SOAPYSDR must be set, exiting"
5555
fi
5656

57-
if [[ -n "${SOAPYSDR}" ]]; then
58-
sed -i "s/SOAPYSDR=\"\"/SOAPYSDR=\"$SOAPYSDR\"/g" /etc/s6-overlay/scripts/acarsdec
59-
fi
60-
61-
6257
mkdir -p /run/acars
6358
touch /run/acars/acars.past5min.json
6459

rootfs/etc/s6-overlay/scripts/acarsdec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ source /scripts/common
66

77
ACARS_BIN="/usr/local/bin/acarsdec"
88
# shellcheck disable=SC2001
9-
SOAPYSDR=""
10-
119
FREQ_STRING=""
1210

1311
ACARS_CMD=("-i" "$FEED_ID")
@@ -40,9 +38,7 @@ fi
4038

4139
# loop through the SOAPYSDR string and split on spaces
4240
if [[ -n "${SOAPYSDR}" ]]; then
43-
IFS=' ' read -ra SOAPYSDR_PROCESSED <<< "${SOAPYSDR}"
44-
# ACARS_CMD+=("${SOAPYSDR_PROCESSED[@]}") # used for acarsdec < 4.0
45-
ACARS_CMD+=("--soapysdr" "${SOAPYSDR_PROCESSED[@]}")
41+
ACARS_CMD+=("--soapysdr" "${SOAPYSDR}")
4642
if [[ ${SOAPYSDR} == *"airspy"* ]] && [[ -z "${RTLMULT}" ]]; then
4743
# airspy runs at 3MSPS so needs a different sample rate multiplier
4844
RTLMULT="240"

0 commit comments

Comments
 (0)