Attempt to improve the logic of the display

This commit is contained in:
Charles Descamps 2025-11-22 21:07:01 -07:00
parent 615a97bcf7
commit 15daabd98f

View file

@ -142,10 +142,10 @@ def logger(hostname, csvfile, noprofilestats, pidstats, stdout):
# time remaining for the display, calculated for rounded seconds # time remaining for the display, calculated for rounded seconds
time_rem = msg['totaltime'] - msg['runtime'] time_rem = msg['totaltime'] - msg['runtime']
if time_rem == -1 or kiln_state == 'IDLE': if time_rem == -1 or kiln_state == 'IDLE':
if prev_kiln_state == 'IDLE': if prev_kiln_state == 'RUNNING':
seg.text = f"READY....TEMP{temp:4.0f}"
else:
seg.text = f"DONE....TEMP{temp:4.0f}" seg.text = f"DONE....TEMP{temp:4.0f}"
else:
seg.text = f"READY....TEMP{temp:4.0f}"
else: else:
hours = round(time_rem // 3600) hours = round(time_rem // 3600)
minutes = round((time_rem - (hours * 3600)) // 60) minutes = round((time_rem - (hours * 3600)) // 60)