diff --git a/src/tempus/Tempus.py b/src/tempus/Tempus.py index 90af78a59b929cc41a2ba0415bc5375a256c6720..606a8b3fa7b8009d218726554b14772fdad9e635 100644 --- a/src/tempus/Tempus.py +++ b/src/tempus/Tempus.py @@ -233,7 +233,7 @@ class Tempus(Device): # os.system(f'{self.CFG_DIR}/B3_timing_dacs.py') cannot be used, # as the script accesses the mytpx4 instance await self.send_command( - f"exec(open('{self.CFG_DIR}/B3_timing_dacs.py').read())") + f"exec(open('{self.CFG_DIR}/{self.dacsFile.value}').read())") await self.send_command( f"mytpx4.setDAC('DAC_Vthreshold', {self.vthreshold.value})") await self.send_command( @@ -338,6 +338,15 @@ class Tempus(Device): defaultValue=100, allowedStates={State.INIT, State.ON}) + @String( + displayedName="DACS py File", + defaultValue="B3_timing_dacs.py", + allowedStates={State.INIT, State.ON}) + async def dacsFile(self, value): + self.dacsFile = value + # if self.state not in (State.UNKNOWN, State.ERROR): + # self.state = State.INIT # force re-initialization + @String( displayedName="Equalisation npy File", defaultValue="B3_equalisation_HV100.npy",