Skip to content

Commit

Permalink
Merge pull request #11 from artlbv/feature_TOA_DAC_setting
Browse files Browse the repository at this point in the history
Add TOA DAC threshold setting
  • Loading branch information
artlbv authored Sep 25, 2018
2 parents 2bbccf4 + 6da7986 commit 7dc0ff0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions daq-zmq-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
the_bit_string.set_lg_shaping_time(daq_options['shapingTime'])
the_bit_string.set_hg_shaping_time(daq_options['shapingTime'])
the_bit_string.set_tot_dac_threshold(daq_options['totDACThreshold'])
the_bit_string.set_toa_dac_threshold(daq_options['toaDACThreshold'])
the_bit_string.Print()
the_bits_c_uchar_p=the_bit_string.get_48_unsigned_char_p()
outputBitString=theDaq.configure(the_bits_c_uchar_p)
Expand Down
1 change: 1 addition & 0 deletions default-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ daq_options:
pulseDelay: 47
preampFeedbackCapacitance: 8
totDACThreshold: 200
toaDACThreshold: 270
shapingTime: 35
glb_options:
moduleNumber: 63
Expand Down
8 changes: 7 additions & 1 deletion skiroc2cms_bit_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ def set_tot_dac_threshold(self,thr):
for i in range(0,10):
bit=(thr>>i)&1
self.bits[61+i]=bit


def set_toa_dac_threshold(self,thr):
thr=thr&0x3ff
for i in range(0,10):
bit=(thr>>i)&1
self.bits[51+i]=bit

def Print(self):
print(self.bits)

0 comments on commit 7dc0ff0

Please sign in to comment.