Reset auto_rx.sh

pull/785/head
Mark Jessop 2023-07-15 11:34:17 +09:30
rodzic 7064b6bd03
commit e0764d734c
3 zmienionych plików z 4 dodań i 29 usunięć

Wyświetl plik

@ -6,7 +6,9 @@
# NOTE: If running this from crontab, make sure to set the appropriate PATH env-vars,
# else utilities like rtl_power and rtl_fm won't be found.
#
# WARNING - THIS IS DEPRECATED - PLEASE USE THE SYSTEMD SERVICE
# WARNING - THIS IS DEPRECATED - PLEASE USE THE SYSTEMD SERVICE OR DOCKER IMAGE
# See: https://github.com/projecthorus/radiosonde_auto_rx/wiki#451-option-1---operation-as-a-systemd-service-recommended
# Or: https://github.com/projecthorus/radiosonde_auto_rx/wiki/Docker
#
# change into appropriate directory
@ -15,18 +17,4 @@ cd $(dirname $0)
# Clean up old files
rm log_power*.csv
while true
do
python3 auto_rx.py
rc=$?
echo auto_rx.py exited with result code $rc
if [ $rc -gt 2 ]
then
echo "Performing power reset of SDR's"
python3 sdr_reset.py
fi
if [ $rc -eq 0 ]
then
break
fi
done
python3 auto_rx.py -t 180

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 12 KiB

Wyświetl plik

@ -1,13 +0,0 @@
import time
import serial
# the SDR devices are attached to USB hub, with power routed though
# switches that are disabled when serial device is opened. So this script
# basically removes power from RTL-SDR devices for 3 seconds, then
# restores the power and waits for 3 more seconds for the USB subsystem to
# find them again
p=serial.Serial("/dev/tty.usbserial-A5XK3RJT",9600)
time.sleep(3)
p.close()
time.sleep(3)