Update rpitx.py HAB mode CW ID with txc, no stored sstv images

beta-hab
Alan Johnston 2 years ago committed by GitHub
parent 11731a3ece
commit 9ca49d0b72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -334,6 +334,16 @@ if __name__ == "__main__":
print(rx) print(rx)
else: else:
rx = '435.0000' rx = '435.0000'
if len(config) > 8:
if (config[8] == 'y') or (config[8] == 'yes'):
hab_mode = True
print("HAB Mode set - CW ID using FM Transceiver, only camera images in SSTV mode")
else:
hab_mode = False
print("HAB Mode not set")
else:
hab_mode = False
print(config) print(config)
print print
# print(callsign) # print(callsign)
@ -397,16 +407,17 @@ if __name__ == "__main__":
if (mode != 'm'): if (mode != 'm'):
# battery_saver_mode # battery_saver_mode
output(txLed, txLedOn) output(txLed, txLedOn)
# if (txc): if (txc and hab_mode):
# output(pd, 1) print("HAB Mode is true, CW ID using FM transceiver")
# output (ptt, 0) output(pd, 1)
# sleep(0.1) output (ptt, 0)
# system("aplay -D hw:CARD=Headphones,DEV=0 /home/pi/CubeSatSim/morse.wav") sleep(0.1)
# sleep(0.1) system("aplay -D hw:CARD=Headphones,DEV=0 /home/pi/CubeSatSim/morse.wav")
# output (ptt, 1) sleep(0.1)
# output(pd, 0) output (ptt, 1)
# else: output(pd, 0)
if (True): else:
# if (True):
if (debug_mode == 1): if (debug_mode == 1):
# system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.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") # system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.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")
system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3")
@ -537,6 +548,7 @@ if __name__ == "__main__":
# output (ptt, 1) # output (ptt, 1)
# output(pd, 0) # output(pd, 0)
if (camera_present == 1): if (camera_present == 1):
if (hab_mode == False):
try: try:
file = open("/home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg") file = open("/home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg")
print("First SSTV stored image detected") print("First SSTV stored image detected")
@ -546,7 +558,7 @@ if __name__ == "__main__":
if (command_tx == True): if (command_tx == True):
print ("Sending SSTV image") print ("Sending SSTV image")
output(txLed, txLedOn) output(txLed, txLedOn)
# battery_saver_check() # battery_saver_check()
if (txc): if (txc):
output(pd, 1) output(pd, 1)

Loading…
Cancel
Save

Powered by TurnKey Linux.