Browse Source

Toggle audio save

tags/v1.2
Nico Rey 3 years ago
parent
commit
cfc3e3aa6e
5 changed files with 15 additions and 8 deletions
  1. +2
    -2
      common.sh
  2. +6
    -1
      receive.sh
  3. +4
    -2
      receive_meteor.sh
  4. +2
    -3
      templates/index.html
  5. +1
    -0
      templates/noaa.conf

+ 2
- 2
common.sh View File

@@ -32,8 +32,8 @@ if [ ! -d "${NOAA_HOME}" ]; then
mkdir -m 775 -p "${NOAA_HOME}"
fi

if [ ! -d "${NOAA_OUTPUT}" ]; then
mkdir -m 775 -p "${NOAA_OUTPUT}"
if [ ! -d "${NOAA_OUTPUT}/audio/" ]; then
mkdir -m 775 -p "${NOAA_OUTPUT}/audio/"
fi




+ 6
- 1
receive.sh View File

@@ -50,4 +50,9 @@ if [ -n "$CONSUMER_KEY" ]; then
fi
fi

rm "${NOAA_AUDIO}/audio/${3}.wav"
if [ "$DELETE_AUDIO" = true ];
rm "${NOAA_AUDIO}/audio/${3}.wav"
else
# Move the audio from the ram fs to the SD Card
mv "${NOAA_AUDIO}/audio/${3}.wav ${NOAA_OUTPUT}/audio/${3}.wav"
fi

+ 4
- 2
receive_meteor.sh View File

@@ -34,12 +34,14 @@ timeout "${6}" /usr/local/bin/rtl_fm -M raw -f "${2}"M -s 288k -g 48 -p 1 | sox
log "Normalization in progress" "INFO"
sox "${METEOR_OUTPUT}/audio/${3}.wav" "${METEOR_OUTPUT}/${3}.wav" gain -n

rm "${METEOR_OUTPUT}/audio/${3}.wav"

log "Demodulation in progress (QPSK)" "INFO"
meteor_demod -B -o "${METEOR_OUTPUT}/${3}.qpsk" "${METEOR_OUTPUT}/${3}.wav"

rm "${METEOR_OUTPUT}/${3}.wav"
if [ "$DELETE_AUDIO" = true ];
rm "${METEOR_OUTPUT}/audio/${3}.wav"
rm "${METEOR_OUTPUT}/${3}.wav"
fi

log "Decoding in progress (QPSK to BMP)" "INFO"
medet_arm "${METEOR_OUTPUT}/${3}.qpsk" "${METEOR_OUTPUT}/${3}" -cd


+ 2
- 3
templates/index.html View File

@@ -21,9 +21,8 @@
<body>
<h1>WX reception server</h1>
<ul>
<li><a href="image">Noaa images</a></li>
<li><a href="meteor">Meteor images</a></li>
<li><a href="audio">Audio</a></li>
<li><a href="image">Images</a></li>
<li><a href="meteor">Meteor files</a></li>
</ul>
<footer>
<a href="https://github.com/reynico/raspberry-noaa"><img src="logo-small.png" /></a>


+ 1
- 0
templates/noaa.conf View File

@@ -8,3 +8,4 @@ SUN_MIN_ELEV=10
LOG_LEVEL=DEBUG
LAT=change_latitude
LON=change_longitude
DELETE_AUDIO=true

Loading…
Cancel
Save