Skip to content

Commit 32b983c

Browse files
committed
- adds back edit (cut/copy/paste) keyboard shortcuts in load/save dialogs (Issue #2114)
- makes extra device setups more robust - don't reset live CM ET/BT readings on DROP and start the computation only after 90s into the roast - adds menu theme icons - lib updates
1 parent 8f5d57e commit 32b983c

11 files changed

Lines changed: 136 additions & 55 deletions

File tree

src/artisan-win.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ a = Analysis(['artisan.py'],
148148
datas=datas, # + copy_metadata('tzdata')
149149
hookspath=[],
150150
runtime_hooks=[r'pyinstaller_hooks\rthooks\pyi_rth_mplconfig.py'], # overwrites default MPL runtime hook which keeps loading font cache from (new) temp directory
151+
additional_hooks_dir=[],
151152
excludes=[],
152153
hiddenimports=hiddenimports_list,
153154
win_no_prefer_redirects=False,

src/artisanlib/aillio_r1.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -642,14 +642,25 @@ def __readreply(self, length:int) -> Any:
642642
# res['extraname2'] = ['RoR']
643643
# res['extramathexpression1'] = ['']
644644
# res['extramathexpression2'] = ['']
645-
# res['extraLCDvisibility1'] = [temp3_visibility]
646-
# res['extraLCDvisibility2'] = [temp4_visibility]
647-
# res['extraCurveVisibility1'] = [temp3_visibility]
648-
# res['extraCurveVisibility2'] = [temp4_visibility]
649-
# res['extraDelta1'] = [False]
650-
# res['extraDelta2'] = [True]
651-
# res['extraFill1'] = [False]
652-
# res['extraFill2'] = [False]
645+
###
646+
# res['extraLCDvisibility1'] = [False] * aw.self.nLCDS
647+
# res['extraLCDvisibility2'] = [False] * aw.self.nLCDS
648+
# res['extraCurveVisibility1'] = [False] * aw.self.nLCDS
649+
# res['extraCurveVisibility2'] = [False] * aw.self.nLCDS
650+
# res['extraDelta1'] = [False] * aw.self.nLCDS
651+
# res['extraDelta2'] = [False] * aw.self.nLCDS
652+
# res['extraFill1'] = [0] * aw.self.nLCDS
653+
# res['extraFill2'] = [0] * aw.self.nLCDS
654+
# if aw.self.nLCDS>0:
655+
# res['extraLCDvisibility1'][0] = temp3_visibility
656+
# res['extraLCDvisibility2'][0] = temp4_visibility
657+
# res['extraCurveVisibility1'][0] = temp3_visibility
658+
# res['extraCurveVisibility2'][0] = temp4_visibility
659+
# res['extraDelta1'][0] = False
660+
# res['extraDelta2'][0] = True
661+
# res['extraFill1'][0] = 0
662+
# res['extraFill2'][0] = 0
663+
##
653664
# res['extradevicecolor1'] = ['black']
654665
# res['extradevicecolor2'] = ['black']
655666
# res['extramarkersizes1'] = [6.0]

src/artisanlib/comm.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,10 @@ def CM_ETBT(self) -> tuple[float,float,float]:
10231023
# update counts and sum_of_squared_differences
10241024
BTlimit = self.aw.qmc.phases[1]
10251025
BT = (self.aw.qmc.temp2[-1] if len(self.aw.qmc.temp2)>0 else -1)
1026-
if BTlimit < BT and self.aw.qmc.timeindex[6] == 0: # BT above DRY END as specified in Phased dialog and before DROP is registered
1026+
if (BTlimit < BT and self.aw.qmc.timeindex[0] > -1 and
1027+
(tx - self.aw.qmc.timex[self.aw.qmc.timeindex[0]] > 90) and
1028+
self.aw.qmc.timeindex[6] == 0):
1029+
# BT above DRY END as specified in Phased dialog, at least 1:30m after CHARGE and before DROP is registered
10271030
ET = (self.aw.qmc.temp1[-1] if len(self.aw.qmc.temp1)>0 else -1)
10281031
nowB = self.aw.qmc.backgroundtime2index(tx) # points to the last entry if tx > all elements in btimex
10291032
ETB = (self.aw.qmc.temp1B[nowB] if len(self.aw.qmc.temp1B)>nowB>-1 else -1)
@@ -1036,7 +1039,8 @@ def CM_ETBT(self) -> tuple[float,float,float]:
10361039
self.CM_BT_readings_count += 1
10371040
BT_squared_diff = (BT - BTB)**2
10381041
self.CM_BT_sum_of_squared_differences += BT_squared_diff
1039-
else:
1042+
elif self.aw.qmc.timeindex[0] == 0:
1043+
# if CHARGE is not set reset readings, keep readings otherwise (eg. after DROP)
10401044
self.CM_ET_readings_count = 0
10411045
self.CM_ET_sum_of_squared_differences = 0
10421046
self.CM_BT_readings_count = 0

src/artisanlib/devices.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3110,6 +3110,7 @@ def resetextradevices(self, _:bool) -> None:
31103110
_t, _e, exc_tb = sys.exc_info()
31113111
self.aw.qmc.adderror((QApplication.translate('Error Message', 'Exception:') + ' resetextradevices(): {0}').format(str(e)),getattr(exc_tb, 'tb_lineno', '?'))
31123112

3113+
# x the index of the extra device to be deleted
31133114
def delextradevice(self, x:int) -> None:
31143115
try:
31153116
self.aw.qmc.extradevices.pop(x)
@@ -3147,10 +3148,11 @@ def delextradevice(self, x:int) -> None:
31473148
if self.aw.extraCurveVisibility2[x]:
31483149
self.aw.qmc.extratemp2lines.pop(before2)
31493150

3151+
# lists of constant length (self.aw.nLCDS)
31503152
self.aw.extraLCDvisibility1.pop(x)
3151-
self.aw.extraLCDvisibility1.append(True) # keep length constant (self.aw.nLCDS)
3153+
self.aw.extraLCDvisibility1.append(False) # keep length constant (self.aw.nLCDS)
31523154
self.aw.extraLCDvisibility2.pop(x)
3153-
self.aw.extraLCDvisibility2.append(True) # keep length constant (self.aw.nLCDS)
3155+
self.aw.extraLCDvisibility2.append(False) # keep length constant (self.aw.nLCDS)
31543156
self.aw.extraCurveVisibility1.pop(x)
31553157
self.aw.extraCurveVisibility1.append(True) # keep length constant (self.aw.nLCDS)
31563158
self.aw.extraCurveVisibility2.pop(x)

0 commit comments

Comments
 (0)