Update transmit.py don't start c2c if mode x or n

send-commands
Alan Johnston 3 weeks ago committed by GitHub
parent 9a27f5c399
commit d1f35018e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -338,6 +338,7 @@ if __name__ == "__main__":
print("Can't read callsign from sim.cfg file, defaulting to AMSAT")
file.close()
no_command = True
try:
f = open("/home/pi/CubeSatSim/command_control", "r")
f.close()
@ -346,15 +347,16 @@ if __name__ == "__main__":
GPIO.setup(squelch, GPIO.IN, pull_up_down=GPIO.PUD_UP) ## pull up in case pin is not connected
if GPIO.input(squelch) == False:
print("squelch not set correctly, no command input!")
no_command = True
else:
print("command and control is activated")
no_command = False
# system("/home/pi/CubeSatSim/command &")
system("sudo systemctl start command")
if (mode != 'n') and (mode !'= 'x'):
print("command and control is activated")
no_command = False
system("sudo systemctl start command")
else:
print("Command and control not activated since Transmit Commands mode")
except:
print("command and control not activated")
no_command = True
print(callsign)
GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4

Loading…
Cancel
Save

Powered by TurnKey Linux.