From 7af9e6520132329e30e42e8319ead4ba02196887 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sat, 15 May 2021 14:01:43 -0400 Subject: [PATCH] Update rpitx.py --- rpitx.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpitx.py b/rpitx.py index e9288768..1a453ee1 100644 --- a/rpitx.py +++ b/rpitx.py @@ -59,15 +59,18 @@ if __name__ == "__main__": time.sleep(5) elif (('s' == sys.argv[1]) or ('sstv' in sys.argv[1])): print("SSTV") - GPIO.output(txLed, txLedOn); + GPIO.output(txLed, txLedOn) # os.system("(while true; do (sleep 5 && cat /home/pi/CubeSatSim/wav/sstv.wav); done) | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434.9e3") while 1: system("(while true; do (sleep 5 && cat /home/pi/CubeSatSim/wav/sstv.wav); done) | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434.9e3 &") - GPIO.output(txLed, txLedOff); + GPIO.output(txLed, txLedOff) system("raspistill -o /home/pi/camera_out.jpg -w 640 -h 496") # > /dev/null 2>&1") print("Photo taken") + GPIO.output(txLed, txLedOn) system("sudo python3 -m pysstv --mode PD120 /home/pi/camera_out.jpg /home/pi/sstv_camera.wav") # > /dev/null 2>&1") + GPIO.output(txLed, txLedOff) print ("Sending SSTV photo") + time.sleep(1) system("sudo killall -9 rpitx > /dev/null 2>&1") GPIO.output(txLed, txLedOn); system("cat /home/pi/sstv_camera.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434.9e3") # > /dev/null 2>&1")