Sfoglia il codice sorgente

Merge pull request #25 from reynico/feature_toggle_delete_audio

Toggle audio save
tags/v1.2
Nico 4 anni fa
committed by GitHub
parent
commit
d3806f46be
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
5 ha cambiato i file con 15 aggiunte e 8 eliminazioni
  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 Vedi 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 Vedi 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 Vedi 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 Vedi 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 Vedi File

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

Caricamento…
Annulla
Salva