Skip to content

Commit

Permalink
for rolling control of trigboard
Browse files Browse the repository at this point in the history
  • Loading branch information
drandyhaas committed May 13, 2021
1 parent b6f7859 commit a2d9927
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions software/HaasoscopeQt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 8 additions & 0 deletions software/HaasoscopeTrigLibQt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -91,4 +97,6 @@ def get_histos(self):

def cleanup(self):
self.setclock(False)
if not self.dorolling: self.togglerolling()
self.ser.close()

0 comments on commit a2d9927

Please sign in to comment.