Skip to content

Commit

Permalink
Validate gain on startup if it is set
Browse files Browse the repository at this point in the history
  • Loading branch information
fredclausen committed Dec 18, 2023
1 parent 17cc832 commit fa2ae50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ ENV DEVICE_INDEX="" \
FREQUENCIES="" \
FEED_ID="" \
PPM="0"\
GAIN="40" \
GAIN_TYPE="" \
GAIN="" \
SERIAL="" \
SOAPYSDR="" \
SERVER_PORT="5556" \
Expand Down
17 changes: 8 additions & 9 deletions rootfs/etc/s6-overlay/scripts/01-dumphfdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ if [[ -z "$SOAPYSAMPLERATE" ]]; then
exit 1
fi

# if [[ -z "$GAIN" ]]; then
# "${s6wrap[@]}" echo "GAIN is not set, exiting"
# exit 1
# fi

# if [[ -z "$GAIN_TYPE" ]]; then
# "${s6wrap[@]}" echo "GAIN_TYPE is not set, exiting"
# exit 1
# fi
if [[ -n "$GAIN" ]]; then
if [[ -z "$GAIN_TYPE" ]]; then
"${s6wrap[@]}" echo "GAIN_TYPE is not set with GAIN being set. Please see documentation. Exiting"
exit 1
fi
fi



if [[ -z "$SOAPYSDRDRIVER" ]]; then
"${s6wrap[@]}" echo "SOAPYSDRDRIVER is not set, exiting"
Expand Down

0 comments on commit fa2ae50

Please sign in to comment.