revert changes to try to fix FSK CW issue

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

@ -251,7 +251,7 @@ if __name__ == "__main__":
elif (('s' == sys.argv[1]) or ('-s' in sys.argv[1])): elif (('s' == sys.argv[1]) or ('-s' in sys.argv[1])):
skip = True skip = True
print("Skipping delay and CW ID") print("Skipping delay and CW ID")
print(transmit) print(transmit)
uptime_time = 45 # 45 second boot time if Pi Zero uptime_time = 45 # 45 second boot time if Pi Zero
@ -263,17 +263,6 @@ if __name__ == "__main__":
except: except:
print("Pi Zero 2 not detected") print("Pi Zero 2 not detected")
if ( mode == "y"):
try:
file = open("/home/pi/CubeSatSim/.mode")
mode = file.read(1)
except:
mode = "f"
if (debug_mode == 1):
print("Can't open .mode file, defaulting to FSK")
print("Mode is: ")
print(mode)
try: try:
system("cat /proc/uptime > /home/pi/CubeSatSim/uptime") system("cat /proc/uptime > /home/pi/CubeSatSim/uptime")
file = open("/home/pi/CubeSatSim/uptime") file = open("/home/pi/CubeSatSim/uptime")
@ -281,10 +270,7 @@ if __name__ == "__main__":
print(up) print(up)
uptime = float(up) uptime = float(up)
print(uptime) print(uptime)
extra = 0 if (uptime < uptime_time):
if (mode == 'f'):
extra = 15
if (uptime < (uptime_time + extra)):
print("Uptime < threshold seconds") print("Uptime < threshold seconds")
else: else:
print("Uptime > threshold seconds") print("Uptime > threshold seconds")
@ -295,8 +281,17 @@ if __name__ == "__main__":
print("Can't open /proc/uptime") print("Can't open /proc/uptime")
print(skip) print(skip)
if (mode == 'f'): if ( mode == "y"):
sleep(10) # wait to avoid restart and truncated cw id try:
file = open("/home/pi/CubeSatSim/.mode")
mode = file.read(1)
except:
mode = "f"
if (debug_mode == 1):
print("Can't open .mode file, defaulting to FSK")
print("Mode is: ")
print(mode)
try: try:
file = open("/home/pi/CubeSatSim/beacon_off") file = open("/home/pi/CubeSatSim/beacon_off")
file.close() file.close()

Loading…
Cancel
Save

Powered by TurnKey Linux.