diff --git a/transmit.py b/transmit.py index 36beee6f..c906479c 100644 --- a/transmit.py +++ b/transmit.py @@ -545,7 +545,24 @@ if __name__ == "__main__": system("gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/telem.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 > /dev/null 2>&1") else: #system("timeout 3 sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") - system("sudo -c 'timeout 3 sudo /home/pi/rpitx/rpitx -i- -m RF -f 434.9e3' pi") +# system("su -c 'timeout 3 sudo /home/pi/rpitx/rpitx -i- -m RF -f 434.9e3' pi") + + + query = ["su", "-c", "'timeout", "3", "sudo", "/home/pi/rpitx/rpitx", "-i-", "-m", "RF", "-f", "434.9e3'", "pi"] + try: + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") +# gpsd_status = result.stdout.strip() + print(f"Output of the command (stdout): {gpsd_status}") + except subprocess.CalledProcessError as e: + # print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") +# gpsd_status = e.stdout.strip() + print(f"Output of the command (stdout): {e.stdout}") + # print(f"Error output of the command (stderr): {e.stderr}") + + + print("Transmit carrier only since FM failure is simulated") sleep(0.1) # output (ptt, 1)