diff --git a/Ccs/scripts/time_updt.py b/Ccs/scripts/time_updt.py new file mode 100644 index 0000000000000000000000000000000000000000..56810af0bbd80ab6b41497a060ca823eb0a59519 --- /dev/null +++ b/Ccs/scripts/time_updt.py @@ -0,0 +1,21 @@ +# Periodically send a PUS TC(9,128) time update packet in a background task + +import threading + +def timetick(period): + global t_updt + print('START TIMETICK') + while t_updt: + ObtTime = cfl.get_cuc_now() + cfl.Tcbuild('SASW TimeUpdt', ObtTime, pool_name='LIVE', ack=0, sleep=period) + print('STOP TIMETICK') + + +PERIOD = 1 # time tick period in seconds + +t_updt = True +t = threading.Thread(target=timetick, args=[PERIOD]) +t.start() + +#! CCS.BREAKPOINT +t_updt = False \ No newline at end of file