Skip to content

Commit

Permalink
Update dumphfdl
Browse files Browse the repository at this point in the history
  • Loading branch information
fredclausen committed Dec 18, 2023
1 parent aa83def commit 44b7ea3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rootfs/etc/s6-overlay/scripts/dumphfdl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ dumpcmd+=( --soapysdr ${SOAPYSDRDRIVER} )
dumpcmd+=(--station-id "$FEED_ID")

# change the LOGFILE variable at the top to modify where the more permanent logfile is
dumpcmd+=( --output "decoded:text:file:path=$LOGFILE")
special_run=( --output "decoded:text:file:path=$LOGFILE")
dumpcmd+=(--output "decoded:json:udp:address=127.0.0.1,port=5556")
# dumpcmd+=(--output "decoded:json:tcp:address=feed.airframes.io,port=5556")

Expand Down Expand Up @@ -156,6 +156,7 @@ else

# this shouldn't need changing
TMPLOG="/tmp/hfdl.sh.log.tmp"
rm -f "$TMPLOG"

aircraftMessages=()
positions=()
Expand All @@ -171,7 +172,7 @@ else
positions+=(0)
score+=(0)
rm -f "$TMPLOG"
timeoutcmd=( timeout "$TIMEOUT" "${dumpcmd[@]}" $GAIN_TYPE $GAIN --sample-rate $SOAPYSAMPLERATE ${freq[$i]} --output "decoded:text:file:path=$TMPLOG" )
timeoutcmd=( timeout "$TIMEOUT" "${dumpcmd[@]}" "${special_run[@]}" $GAIN_TYPE $GAIN --sample-rate $SOAPYSAMPLERATE ${freq[$i]} --output "decoded:text:file:path=$TMPLOG" )
"${s6wrap[@]}" echo "running: ${timeoutcmd[@]}"
"${s6wrap[@]}" "${timeoutcmd[@]}" || true
if [[ -f "$TMPLOG" ]]; then
Expand All @@ -187,6 +188,7 @@ else
sleep 10
done

rm -f "$TMPLOG"

"${s6wrap[@]}" echo --------
"${s6wrap[@]}" echo Summary:
Expand Down Expand Up @@ -214,7 +216,6 @@ else

#NOTE: if something is wrong with your script or if no messages were received it will always default to using the first frequency array


rm -rf /run/hfdl_test_mode

longcmd=( "${dumpcmd[@]}" $GAIN_TYPE $GAIN --sample-rate $SOAPYSAMPLERATE ${freq[$k]} )
Expand Down

0 comments on commit 44b7ea3

Please sign in to comment.