diff --git a/software/HaasoscopeQt.py b/software/HaasoscopeQt.py index 980c4b6c..3c523567 100755 --- a/software/HaasoscopeQt.py +++ b/software/HaasoscopeQt.py @@ -443,6 +443,8 @@ def triggerposchanged(self,value): def rolling(self): d.rolltrigger = not d.rolltrigger d.tellrolltrig(d.rolltrigger) + if trigboardport!="": + trigboard.togglerolling() self.ui.rollingButton.setChecked(d.rolltrigger) if d.rolltrigger: self.ui.rollingButton.setText("Rolling/Auto") else: self.ui.rollingButton.setText("Normal") diff --git a/software/HaasoscopeTrigLibQt.py b/software/HaasoscopeTrigLibQt.py index d5a2dc54..f97183f7 100755 --- a/software/HaasoscopeTrigLibQt.py +++ b/software/HaasoscopeTrigLibQt.py @@ -10,6 +10,12 @@ def construct(self,port): self.ser=Serial(port,115200,timeout=0.2) self.extclock=0 self.histostosend=-1 + self.dorolling=1 + + def togglerolling(self): + self.dorolling = not self.dorolling + self.ser.write(bytearray([13])) # toggle rolling + print("trigboard rolling is now",self.dorolling) def setclock(self, wantactiveclock): # True for wanting sync with external clock self.extclock = 0 @@ -91,4 +97,6 @@ def get_histos(self): def cleanup(self): self.setclock(False) + if not self.dorolling: self.togglerolling() self.ser.close() +