Update transmit.py changes to make Pi5 work no rpitx

master-b-pi5
Alan Johnston 2 months ago committed by GitHub
parent 1b04cf42ed
commit 55b5e621e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -23,16 +23,16 @@ def input(pin):
command = "gpio -g read " + str(pin)
try:
result = subprocess.run(query, capture_output=True, text=True, check=True)
# print(f"Command run was: {query}")
# print("Sucess!")
# print(f"Output of the command (stdout): {result.stdout}")
# print(f"{command}: {result.stdout}")
print(f"Command run was: {query}")
print("Sucess!")
print(f"Output of the command (stdout): {result.stdout}")
print(f"{command}: {result.stdout}")
return int(result.stdout)
except subprocess.CalledProcessError as e:
# print(f"Command failed with return code: {e.returncode}")
# print(f"Command run was: {e.cmd}")
# print(f"Output of the command (stdout): {e.stdout}")
# print(f"Error output of the command (stderr): {e.stderr}")
print(f"Command failed with return code: {e.returncode}")
print(f"Command run was: {e.cmd}")
print(f"Output of the command (stdout): {e.stdout}")
print(f"Error output of the command (stderr): {e.stderr}")
print(f"{command}: -1")
return -1
@ -83,7 +83,8 @@ def sim_failure_check():
sim_mode = True
except:
print("No failure mode")
card = "Headphones"
# card = "Headphones"
card = "Device"
if sim_config:
sim_mode = True
@ -219,6 +220,8 @@ def camera_photo():
print("CubeSatSim v2.2 transmit.py starting...")
system("sudo rm /usr/bin/rpitx")
pd = 21
ptt = 20
txc_pin = 7
@ -472,9 +475,10 @@ if __name__ == "__main__":
os_status = "bullseye"
print (os_status)
card = "Headphones" # default using pcm audio output of Pi Zero
# card = "Device" # using USB sound card for audio output
# card = "Headphones" # default using pcm audio output of Pi Zero
card = "Device" # using USB sound card for audio output
print ("card:")
print (card)
query = ["sudo", "systemctl", "is-active", "gpsd.socket"]
try:
result = subprocess.run(query, capture_output=True, text=True, check=True)

Loading…
Cancel
Save

Powered by TurnKey Linux.