SSTV transmit last picture before taking photo

pull/87/head
alanbjohnston 5 years ago committed by GitHub
parent 56c3452f60
commit 24502b7201
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -76,13 +76,9 @@ if __name__ == "__main__":
camera_present = 0
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)
if (camera_present == 1):
system("raspistill -o /home/pi/camera_out.jpg -w 320 -h 256") # > /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")
system("/home/pi/PiSSTVpp/pisstvpp -r 48000 -p s2 /home/pi/camera_out.jpg") # > /dev/null 2>&1")
GPIO.output(txLed, txLedOff)
print ("Sending SSTV photo")
@ -92,6 +88,8 @@ if __name__ == "__main__":
system("sudo killall -9 cat > /dev/null 2>&1")
GPIO.output(txLed, txLedOn);
system("cat /home/pi/camera_out.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")
system("raspistill -o /home/pi/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1")
print("Photo taken")
else:
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:

Loading…
Cancel
Save

Powered by TurnKey Linux.