Skip to content

Commit 2250d63

Browse files
committed
timer LCD displays cooling time after DROP
1 parent 2d5fec8 commit 2250d63

4 files changed

Lines changed: 12 additions & 14 deletions

File tree

src/artisanlib/canvas.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5834,22 +5834,17 @@ def updateLCDtime(self) -> None:
58345834
try:
58355835
if self.aw.sample_loop_running and len(self.timeindex) == 8: # ensure we have a valid self.timeindex array
58365836

5837-
if self.timeindex[0] != -1 and len(self.timex) > self.timeindex[0]:
5837+
if self.timeindex[6] != 0 and len(self.timex) > self.timeindex[6]:
5838+
ts = tx - self.timex[self.timeindex[6]]
5839+
elif self.timeindex[0] != -1 and len(self.timex) > self.timeindex[0]:
58385840
ts = tx - self.timex[self.timeindex[0]]
58395841
else:
58405842
ts = tx
58415843

58425844
# if more than max cool (from statistics) past DROP and not yet COOLend turn the time LCD red:
5843-
if (self.timeindex[0]!=-1 and self.timeindex[6] and
5844-
not self.timeindex[7] and
5845-
((len(self.timex) == 1+self.timeindex[6]) or
5846-
(len(self.timex)>self.timeindex[6] and (4*60+2 > (tx - self.timex[self.timeindex[6]]) > 4*60)))):
5847-
# switch LCD color to "cooling" color (only after 4min cooling we switch to slowcoolingtimer color)
5848-
if (tx - self.timex[self.timeindex[6]]) > 4*60:
5849-
timer_color = 'slowcoolingtimer'
5850-
else:
5851-
timer_color = 'rstimer'
5852-
self.aw.setTimerColor(timer_color)
5845+
if (self.timeindex[0]!=-1 and self.timeindex[6] != 0 and not self.timeindex[7] and
5846+
len(self.timex) > self.timeindex[6] and (tx - self.timex[self.timeindex[6]]) > 4*60):
5847+
self.aw.setTimerColor('slowcoolingtimer')
58535848

58545849
if self.chargeTimerFlag and self.timeindex[0] == -1 and self.chargeTimerPeriod != 0:
58555850
if self.chargeTimerPeriod > ts:
@@ -15308,6 +15303,7 @@ def markDrop(self, noaction:bool = False) -> None:
1530815303
# we check if this is the first DROP mark on this roast
1530915304
firstDROP = self.timeindex[6] == 0 # on UNDO DROP we do not send the record to plus
1531015305
if self.aw.buttonDROP.isFlat() and self.timeindex[6] > 0:
15306+
self.aw.setTimerColor('timer') # reset cooling timer color back to the default
1531115307
self.autoDropIdx = -1 # disable autoDROP to allow manual re-DROP
1531215308
# undo wrongly set FCs
1531315309
# deactivate autoDROP
@@ -15331,6 +15327,7 @@ def markDrop(self, noaction:bool = False) -> None:
1533115327
if 6 in self.l_annotations_dict:
1533215328
del self.l_annotations_dict[6]
1533315329
elif not self.aw.buttonDROP.isFlat():
15330+
self.aw.setTimerColor('rstimer') # cooling timer color
1533415331
self.incBatchCounter()
1533515332
# generate UUID
1533615333
if self.roastUUID is None: # there might be already one assigned by undo and redo the markDROP!

src/requirements-dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ types-jmespath>=1.1.0.20260408
1414
types-xlrd>=2.0.0.20260408
1515
types-qrcode>=8.2.0.20260408
1616
lxml-stubs>=0.5.1
17-
mypy==1.20.0
17+
mypy==1.20.1
1818
pyright==1.1.408
1919
ruff>=0.15.10
2020
pylint==4.0.5
@@ -29,7 +29,7 @@ pytest-datadir==1.8.0
2929
#PyVirtualDisplay==3.0
3030
#pytest-bdd==6.1.1
3131
#pytest-benchmark==4.0.0
32-
hypothesis>=6.151.12
32+
hypothesis>=6.151.13
3333
coverage>=7.13.5
3434
coverage-badge==1.1.2
3535
codespell==2.4.2

src/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ colorspacious==1.1.2
5151
openpyxl==3.1.5
5252
keyring==25.7.0
5353
prettytable==3.17.0
54-
lxml==6.0.2
54+
lxml==6.0.4
5555
matplotlib==3.10.8
5656
jinja2==3.1.6
5757
aiohttp==3.13.5

wiki/ReleaseHistory.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ v4.0.4 (Mar XX, 2026)
1919
- adds hack to prevent dtr/rts signaling on connecting serial ports
2020
- preserves weight/volume unit setup on loading/importing profiles
2121
- enables extra device curve fills on recording
22+
- timer LCD displays cooling time after DROP
2223
* FIXES
2324
- fixes autosave as PDF on regular `Save` on macOS ([Issue #2118](../../../issues/2118))
2425
- fixes regression which led to large automatic x-axis extensions for larger sampling rates ([Issue #2142](../../../issues/2142))

0 commit comments

Comments
 (0)