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,11 +125,16 @@ def logger(hostname, csvfile, noprofilestats, pidstats, stdout):
|
||||||
temp = round(msg['temperature'])
|
temp = round(msg['temperature'])
|
||||||
# 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']
|
||||||
hours = round(time_rem // 3600)
|
if time_rem == -1 or msg['state'] == "IDLE":
|
||||||
minutes = round((time_rem - (hours * 3600)) // 60)
|
if msg['state'] == "IDLE":
|
||||||
seconds = round((time_rem - (hours * 3600) - (minutes * 60)))
|
seg.text = f"READY...TEMP{temp:4.0f}"
|
||||||
|
else:
|
||||||
seg.text = f"{hours:2.0f}-{minutes:2.0f}-{seconds:2.0f}TEMP{temp:4.0f}"
|
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
|
# END ADD TEMP
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue