From 3c328faec69cbdd14e9908f8735cb52a346adf7a Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Mon, 14 Jun 2021 16:25:27 -0400 Subject: [PATCH] added extra sleep for pre-APRS packets, removed ; --- rpitx.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/rpitx.py b/rpitx.py index 8dc76e70..fd6d3ae2 100644 --- a/rpitx.py +++ b/rpitx.py @@ -81,16 +81,17 @@ if __name__ == "__main__": print("AFSK") time.sleep(4) for x in range(5): - GPIO.output(txLed, txLedOn); + GPIO.output(txLed, txLedOn) system("sudo gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/telem.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f 434.9e3 > /dev/null 2>&1") - GPIO.output(txLed, txLedOff); + time.sleep(0.2) + GPIO.output(txLed, txLedOff) time.sleep(4) while True: try: f = open("/home/pi/CubeSatSim/ready") - GPIO.output(txLed, txLedOn); + GPIO.output(txLed, txLedOn) system("sudo gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/telem.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f 434.9e3 > /dev/null 2>&1") - GPIO.output(txLed, txLedOff); + GPIO.output(txLed, txLedOff) f.close() system("sudo rm ready") time.sleep(0.5) @@ -118,7 +119,7 @@ if __name__ == "__main__": print("First SSTV stored image detected") system("/home/pi/PiSSTVpp/pisstvpp -r 48000 -p s2 /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg") print ("Sending SSTV image") - GPIO.output(txLed, txLedOn); + GPIO.output(txLed, txLedOn) system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434.9e3") # > /dev/null 2>&1") GPIO.output(txLed, txLedOff) # time.sleep(1) @@ -139,7 +140,7 @@ if __name__ == "__main__": print("First SSTV stored image detected") system("/home/pi/PiSSTVpp/pisstvpp -r 48000 -p s2 /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg") print ("Sending SSTV image") - GPIO.output(txLed, txLedOn); + GPIO.output(txLed, txLedOn) system("cat /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434.9e3") # > /dev/null 2>&1") GPIO.output(txLed, txLedOff) time.sleep(1) @@ -151,7 +152,7 @@ if __name__ == "__main__": system("/home/pi/PiSSTVpp/pisstvpp -r 48000 -p s2 /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg") while 1: print ("Sending SSTV image") - GPIO.output(txLed, txLedOn); + GPIO.output(txLed, txLedOn) system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434.9e3") # > /dev/null 2>&1") GPIO.output(txLed, txLedOff) time.sleep(5)