|
|
|
|
@ -201,6 +201,7 @@ if __name__ == "__main__":
|
|
|
|
|
print("Ready for next packet!")
|
|
|
|
|
|
|
|
|
|
sleep(0.5)
|
|
|
|
|
except:
|
|
|
|
|
if GPIO.input(squelch) == False:
|
|
|
|
|
print("carrier received!")
|
|
|
|
|
command_tx = not command_tx
|
|
|
|
|
@ -214,7 +215,6 @@ if __name__ == "__main__":
|
|
|
|
|
else:
|
|
|
|
|
print("Turning off transmit")
|
|
|
|
|
system("echo > command_tx False")
|
|
|
|
|
except:
|
|
|
|
|
sleep(0.5)
|
|
|
|
|
elif (mode == 'm'):
|
|
|
|
|
print("CW")
|
|
|
|
|
@ -293,7 +293,9 @@ if __name__ == "__main__":
|
|
|
|
|
file = open("/home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg")
|
|
|
|
|
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")
|
|
|
|
|
if (command_tx == True):
|
|
|
|
|
print ("Sending SSTV image")
|
|
|
|
|
if (command_tx == True):
|
|
|
|
|
output(txLed, txLedOn)
|
|
|
|
|
output(pd, 1)
|
|
|
|
|
output (ptt, 0)
|
|
|
|
|
@ -317,6 +319,8 @@ if __name__ == "__main__":
|
|
|
|
|
print("Photo taken")
|
|
|
|
|
system("/home/pi/PiSSTVpp/pisstvpp -r 48000 -p s2 /home/pi/CubeSatSim/camera_out.jpg")
|
|
|
|
|
system("sudo rm /home/pi/CubeSatSim/camera_out.jpg > /dev/null 2>&1")
|
|
|
|
|
|
|
|
|
|
if (command_tx == True):
|
|
|
|
|
print ("Sending SSTV image")
|
|
|
|
|
output(txLed, txLedOn)
|
|
|
|
|
output(pd, 1)
|
|
|
|
|
@ -332,6 +336,21 @@ if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
output(txLed, txLedOff)
|
|
|
|
|
output (ptt, 1)
|
|
|
|
|
|
|
|
|
|
if GPIO.input(squelch) == False:
|
|
|
|
|
print("carrier received!")
|
|
|
|
|
command_tx = not command_tx
|
|
|
|
|
print(command_tx)
|
|
|
|
|
if (command_tx == True):
|
|
|
|
|
print("Turning on transmit")
|
|
|
|
|
system("echo > command_tx True")
|
|
|
|
|
# output(txLed, txLedOn)
|
|
|
|
|
# sleep(0.5)
|
|
|
|
|
# output(txLed, txLedff)
|
|
|
|
|
else:
|
|
|
|
|
print("Turning off transmit")
|
|
|
|
|
system("echo > command_tx False")
|
|
|
|
|
|
|
|
|
|
output(pd, 0)
|
|
|
|
|
system("sudo rm /home/pi/CubeSatSim/camera_out.jpg.wav > /dev/null 2>&1")
|
|
|
|
|
sleep(1)
|
|
|
|
|
|