Update transmit.py check for sim_mode_auto

master-psag-fm-only-fsk
Alan Johnston 2 weeks ago committed by GitHub
parent c3cb2373c8
commit cc899c131e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -339,20 +339,27 @@ if __name__ == "__main__":
sim_config = True
print("Simulated telemetry mode is configured.")
else:
query = ["timeout", "2", "i2cdetect", "-y", "3"] # Test if Solar board is present
try:
result = subprocess.run(query, capture_output=True, text=True, check=True)
# query = ["timeout", "2", "i2cdetect", "-y", "3"] # Test if Solar board is present
# 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}")
except subprocess.CalledProcessError as e:
# 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("Sim mode automatically turned on!")
try:
file = open("/home/pi/CubeSatSim/sim_mode_auto")
print("Simulated telemetry mode automatically turned on!")
sim_mode = True
sim_config = True
file.close()
except:
if (debug_mode == 1):
print("/home/pi/CubeSatSim/sim_mode_auto not found")
if len(config) > 5:
sq = config[5]
if (mode == 'p') or (mode == 'P'):

Loading…
Cancel
Save

Powered by TurnKey Linux.