Update transmit.py add txLed control by PTT

pacsat-v2.2-tlm
Alan Johnston 2 months ago committed by GitHub
parent f526b10e7b
commit c341d5a3b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -423,16 +423,28 @@ if __name__ == "__main__":
output(ptt, 1) output(ptt, 1)
if (mode == 'a'): if (mode == 'a'):
print("AFSK") print("AFSK")
elif (mode == 'p'): elif (mode == 'p') or (mode == 'P'):
print("Pacsat") if (mode == 'P'):
# system('/home/pi/CubeSatSim/pacsatsim.sh') print("Pacsat Ground Station")
# system('sudo systemctl restart pacsatsim') else:
while True: print("Pacsat")
sleep(30) # txPin = 27
elif (mode == 'P'): pttPin = 20
print("Pacsat Ground Station")
while True: GPIO.setmode(GPIO.BCM)
sleep(30) GPIO.setwarnings(False)
GPIO.setup(txLed, GPIO.OUT)
GPIO.output(txLed, 0)
GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while (True):
sleep(0.1)
GPIO.wait_for_edge(pttPin, GPIO.FALLING)
GPIO.output(txLed, 1)
sleep(0.1)
GPIO.wait_for_edge(pttPin, GPIO.RISING)
GPIO.output(txLed, 1)
else: else:
GPIO.output(powerPin, 0) GPIO.output(powerPin, 0)
print("Transmit APRS Commands") print("Transmit APRS Commands")

Loading…
Cancel
Save

Powered by TurnKey Linux.