|
|
|
|
@ -193,11 +193,15 @@ if __name__ == "__main__":
|
|
|
|
|
output(pd, 1)
|
|
|
|
|
output (ptt, 0)
|
|
|
|
|
sleep(0.1)
|
|
|
|
|
# if (debug_mode == 1):
|
|
|
|
|
# system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw.txt -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")
|
|
|
|
|
# else:
|
|
|
|
|
# system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw.txt -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 > /dev/null 2>&1")
|
|
|
|
|
system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw.txt -r 48000 > /dev/null 2>&1 && aplay /home/pi/CubeSatSim/morse.wav")
|
|
|
|
|
|
|
|
|
|
if (txc):
|
|
|
|
|
system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw.txt -r 48000 > /dev/null 2>&1 && aplay /home/pi/CubeSatSim/morse.wav")
|
|
|
|
|
else:
|
|
|
|
|
if (debug_mode == 1):
|
|
|
|
|
system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw.txt -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")
|
|
|
|
|
else:
|
|
|
|
|
system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw.txt -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 > /dev/null 2>&1")
|
|
|
|
|
|
|
|
|
|
output(txLed, txLedOff)
|
|
|
|
|
output (ptt, 1)
|
|
|
|
|
output(pd, 0)
|
|
|
|
|
@ -210,11 +214,15 @@ if __name__ == "__main__":
|
|
|
|
|
output(pd, 1)
|
|
|
|
|
output (ptt, 0)
|
|
|
|
|
sleep(0.1)
|
|
|
|
|
# if (debug_mode == 1):
|
|
|
|
|
# system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw.txt -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")
|
|
|
|
|
# else:
|
|
|
|
|
# system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw.txt -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 > /dev/null 2>&1")
|
|
|
|
|
system("aplay /home/pi/CubeSatSim/morse.wav")
|
|
|
|
|
|
|
|
|
|
if (txc):
|
|
|
|
|
system("aplay /home/pi/CubeSatSim/morse.wav")
|
|
|
|
|
else:
|
|
|
|
|
if (debug_mode == 1):
|
|
|
|
|
system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw.txt -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")
|
|
|
|
|
else:
|
|
|
|
|
system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw.txt -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 > /dev/null 2>&1")
|
|
|
|
|
|
|
|
|
|
sleep(0.1)
|
|
|
|
|
output(txLed, txLedOff)
|
|
|
|
|
output (ptt, 1)
|
|
|
|
|
|