Update squelch_cc.py fixed indents

pull/323/head
Alan Johnston 1 year ago committed by GitHub
parent 19c87b04f0
commit a73d7721dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5,8 +5,8 @@ def command_control_check():
# global command_control # global command_control
# global no_command # global no_command
# global debug_mode # global debug_mode
command_count = 0 command_count = 0
# output(pd, 1) # output(pd, 1)
# output(ptt, 1) # output(ptt, 1)
@ -17,21 +17,21 @@ def command_control_check():
# command_tx = not command_tx # command_tx = not command_tx
# print(command_tx) # print(command_tx)
try: try:
file = open("/home/pi/CubeSatSim/command_count.txt", "r") file = open("/home/pi/CubeSatSim/command_count.txt", "r")
string = file.read() string = file.read()
file.close() file.close()
command_count = int(string) command_count = int(string)
command_count += 1 command_count += 1
filec = open("/home/pi/CubeSatSim/command_count.txt", "w") filec = open("/home/pi/CubeSatSim/command_count.txt", "w")
command_count_string = str(command_count) command_count_string = str(command_count)
print(command_count_string) print(command_count_string)
string = filec.write(command_count_string) string = filec.write(command_count_string)
filec.close() filec.close()
except: except:
print("Can't write command_count file!") print("Can't write command_count file!")
print("Command_count: ") print("Command_count: ")
print(command_count) print(command_count)
increment_mode() increment_mode()
@ -162,4 +162,4 @@ def increment_mode():
print("can't write to .mode file") print("can't write to .mode file")
while True: while True:
command_control_check() command_control_check()

Loading…
Cancel
Save

Powered by TurnKey Linux.