From e2449d4ceb272cf01623c6c89b1124e9bd9f2258 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 30 May 2024 23:20:07 -0400 Subject: [PATCH] Update rpitx.py enable rx all the time for all modes --- rpitx.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/rpitx.py b/rpitx.py index 7b9981b1..90707180 100644 --- a/rpitx.py +++ b/rpitx.py @@ -481,7 +481,8 @@ if __name__ == "__main__": print("CW") while True: command_control_check() - + output (pd, 1) + output (ptt, 1) try: f = open("/home/pi/CubeSatSim/cwready") f.close() @@ -496,7 +497,7 @@ if __name__ == "__main__": output(txLed, txLedOn) if (txc): - output (pd, 1) +# output (pd, 1) sleep(0.3) output (ptt, 0) system("aplay -D hw:CARD=Headphones,DEV=0 /home/pi/CubeSatSim/morse.wav") @@ -519,6 +520,8 @@ if __name__ == "__main__": elif (mode == 's'): print("SSTV") command_control_check() + output (ptt, 1) + output(pd, 1) try: # from picamera import PiCamera # from pysstv.sstv import SSTV @@ -552,11 +555,11 @@ if __name__ == "__main__": # battery_saver_check() if (txc): - output(pd, 1) +# output(pd, 1) output (ptt, 0) system("aplay -D hw:CARD=Headphones,DEV=0 /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav") output (ptt, 1) - output(pd, 0) +# output(pd, 0) else: if (debug_mode == 1): 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 " + tx + "e3") @@ -610,11 +613,11 @@ if __name__ == "__main__": # battery_saver_check() if (txc): - output(pd, 1) +# output(pd, 1) output (ptt, 0) system("aplay -D hw:CARD=Headphones,DEV=0 /home/pi/CubeSatSim/camera_out.jpg.wav") output(ptt, 1) - output (pd, 0) +# output (pd, 0) else: if (debug_mode == 1): system("cat /home/pi/CubeSatSim/camera_out.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3") @@ -645,11 +648,11 @@ if __name__ == "__main__": # battery_saver_check() if (txc): - output(pd, 1) +# output(pd, 1) output (ptt, 0) system("aplay -D hw:CARD=Headphones,DEV=0 /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav") output(ptt, 1) - output (pd, 0) +# output (pd, 0) else: if (debug_mode == 1): 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 " + tx + "e3") @@ -679,11 +682,11 @@ if __name__ == "__main__": # battery_saver_check() if (txc): - output(pd, 1) +# output(pd, 1) output (ptt, 0) system("aplay -D hw:CARD=Headphones,DEV=0 /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav") output(ptt, 1) - output (pd, 0) +# output (pd, 0) else: if (debug_mode == 1): 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 " + tx + "e3") @@ -706,11 +709,11 @@ if __name__ == "__main__": # battery_saver_check() if (txc): - output(pd, 1) +# output(pd, 1) output (ptt, 0) system("aplay -D hw:CARD=Headphones,DEV=0 /home/pi/CubeSatSim/sstv.wav") output(ptt, 1) - output (pd, 0) +# output (pd, 0) else: sleep(60)