|
|
|
|
@ -153,14 +153,6 @@ GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP)
|
|
|
|
|
GPIO.setup(txc_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
|
|
|
|
|
GPIO.setup(green, GPIO.OUT)
|
|
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
no_command = False
|
|
|
|
|
|
|
|
|
|
transmit = False
|
|
|
|
|
if GPIO.input(12) == False:
|
|
|
|
|
print("Version is v1 with UHF BPF")
|
|
|
|
|
@ -311,6 +303,23 @@ if __name__ == "__main__":
|
|
|
|
|
if (debug_mode == 1):
|
|
|
|
|
print("Can't read callsign from sim.cfg file, defaulting to AMSAT")
|
|
|
|
|
file.close()
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
f = open("/home/pi/CubeSatSim/command_control", "r")
|
|
|
|
|
f.close()
|
|
|
|
|
GPIO.setmode(GPIO.BCM)
|
|
|
|
|
GPIO.setwarnings(False)
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
GPIO.setup(txLed, GPIO.OUT)
|
|
|
|
|
|