Toggle audio savetags/v1.2
@@ -32,8 +32,8 @@ if [ ! -d "${NOAA_HOME}" ]; then | |||||
mkdir -m 775 -p "${NOAA_HOME}" | mkdir -m 775 -p "${NOAA_HOME}" | ||||
fi | 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 | fi | ||||
@@ -50,4 +50,9 @@ if [ -n "$CONSUMER_KEY" ]; then | |||||
fi | fi | ||||
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 |
@@ -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" | log "Normalization in progress" "INFO" | ||||
sox "${METEOR_OUTPUT}/audio/${3}.wav" "${METEOR_OUTPUT}/${3}.wav" gain -n | sox "${METEOR_OUTPUT}/audio/${3}.wav" "${METEOR_OUTPUT}/${3}.wav" gain -n | ||||
rm "${METEOR_OUTPUT}/audio/${3}.wav" | |||||
log "Demodulation in progress (QPSK)" "INFO" | log "Demodulation in progress (QPSK)" "INFO" | ||||
meteor_demod -B -o "${METEOR_OUTPUT}/${3}.qpsk" "${METEOR_OUTPUT}/${3}.wav" | 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" | log "Decoding in progress (QPSK to BMP)" "INFO" | ||||
medet_arm "${METEOR_OUTPUT}/${3}.qpsk" "${METEOR_OUTPUT}/${3}" -cd | medet_arm "${METEOR_OUTPUT}/${3}.qpsk" "${METEOR_OUTPUT}/${3}" -cd | ||||
@@ -21,9 +21,8 @@ | |||||
<body> | <body> | ||||
<h1>WX reception server</h1> | <h1>WX reception server</h1> | ||||
<ul> | <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> | </ul> | ||||
<footer> | <footer> | ||||
<a href="https://github.com/reynico/raspberry-noaa"><img src="logo-small.png" /></a> | <a href="https://github.com/reynico/raspberry-noaa"><img src="logo-small.png" /></a> | ||||
@@ -8,3 +8,4 @@ SUN_MIN_ELEV=10 | |||||
LOG_LEVEL=DEBUG | LOG_LEVEL=DEBUG | ||||
LAT=change_latitude | LAT=change_latitude | ||||
LON=change_longitude | LON=change_longitude | ||||
DELETE_AUDIO=true |