Update transmit.py test i2c3 to see if sim mode auto turned on

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

@ -337,7 +337,23 @@ if __name__ == "__main__":
if config[4] == 'y' or config[4] == 'yes':
sim_mode = True
sim_config = True
print("Simulated telemetry mode is configured.")
print("Simulated telemetry mode is configured.")
else
query = ["timeout", "2", "i2cdetect", "-y", "3"]
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:
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!")
sim_mode = True
if len(config) > 5:
sq = config[5]
if (mode == 'p') or (mode == 'P'):

Loading…
Cancel
Save

Powered by TurnKey Linux.