Add new logic for the status of kiln to reflect DONE or READY with the current temp.
This commit is contained in:
parent
e5c6b9886e
commit
75ce5d4fe1
1 changed files with 10 additions and 5 deletions
|
|
@ -125,10 +125,15 @@ def logger(hostname, csvfile, noprofilestats, pidstats, stdout):
|
|||
temp = round(msg['temperature'])
|
||||
# time remaining for the display, calculated for rounded seconds
|
||||
time_rem = msg['totaltime'] - msg['runtime']
|
||||
if time_rem == -1 or msg['state'] == "IDLE":
|
||||
if msg['state'] == "IDLE":
|
||||
seg.text = f"READY...TEMP{temp:4.0f}"
|
||||
else:
|
||||
seg.text = f"DONE....TEMP{temp:4.0f}"
|
||||
else:
|
||||
hours = round(time_rem // 3600)
|
||||
minutes = round((time_rem - (hours * 3600)) // 60)
|
||||
seconds = round((time_rem - (hours * 3600) - (minutes * 60)))
|
||||
|
||||
seg.text = f"{hours:2.0f}-{minutes:2.0f}-{seconds:2.0f}TEMP{temp:4.0f}"
|
||||
# END ADD TEMP
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue