Bläddra i källkod

fix path

tags/v1.7
Nico Rey 3 år sedan
förälder
incheckning
2c716c7727
1 ändrade filer med 6 tillägg och 5 borttagningar
  1. +6
    -5
      receive_iss.sh

+ 6
- 5
receive_iss.sh Visa fil

@@ -28,15 +28,16 @@ fi
log "Starting rtl_fm record" "INFO"
timeout "${6}" /usr/local/bin/rtl_fm ${BIAS_TEE} -M fm -f 145.8M -s 48k -g $GAIN -E dc -E wav -E deemp -F 9 - | sox -t raw -r 48k -c 1 -b 16 -e s - -t wav "${NOAA_OUTPUT}/audio/${3}.wav" rate 11025

if [ -f "/home/pi/raspberry-noaa/demod.py" ]; then
if [ -f "$NOAA_HOME/demod.py" ]; then
log "Decoding ISS pass" "INFO"
python3 /home/pi/raspberry-noaa/demod.py "${NOAA_OUTPUT}/audio/${3}.wav" "${NOAA_OUTPUT}/images/"
python3 "$NOAA_HOME/demod.py" "${NOAA_OUTPUT}/audio/${3}.wav" "${NOAA_OUTPUT}/images/"
decoded_pictures="$(find ${NOAA_OUTPUT}/images/ -iname "${3}*png")"
img_count=0
for image in $decoded_pictures; do
log "Decoded image: $image" "INFO"
((img_count++))
done
sqlite3 /home/pi/raspberry-noaa/panel.db "insert into decoded_passes (pass_start, file_path, daylight_pass, sat_type, img_count) values ($5,\"$3\", 1,0, 2, $img_count);"
pass_id=$(sqlite3 /home/pi/raspberry-noaa/panel.db "select id from decoded_passes order by id desc limit 1;")
sqlite3 /home/pi/raspberry-noaa/panel.db "update predict_passes set is_active = 0 where (predict_passes.pass_start) in (select predict_passes.pass_start from predict_passes inner join decoded_passes on predict_passes.pass_start = decoded_passes.pass_start where decoded_passes.id = $pass_id);"
sqlite3 "$NOAA_HOME/panel.db" "insert into decoded_passes (pass_start, file_path, daylight_pass, sat_type, img_count) values ($5,\"$3\",1,2, $img_count);"
pass_id=$(sqlite3 "$NOAA_HOME/panel.db" "select id from decoded_passes order by id desc limit 1;")
sqlite3 "$NOAA_HOME/panel.db" "update predict_passes set is_active = 0 where (predict_passes.pass_start) in (select predict_passes.pass_start from predict_passes inner join decoded_passes on predict_passes.pass_start = decoded_passes.pass_start where decoded_passes.id = $pass_id);"
fi

Laddar…
Avbryt
Spara