Skip to content

Commit

Permalink
Merge with monashspinor/prevent_unicode_warning (Pull request labscri…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjbillington committed Jun 1, 2018
2 parents f530870 + a07067e commit f970adf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions labscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ def set_initial_trigger_time(self, t):

def trigger(self, t, duration, wait_delay = 0):
"""Ask the trigger device to produce a digital pulse of a given duration to trigger this pseudoclock"""
if t == 'initial':
if type(t) in [str, bytes] and t == 'initial':
t = self.initial_trigger_time
t = round(t,10)
if self.is_master_pseudoclock:
Expand Down Expand Up @@ -2115,7 +2115,7 @@ def generate_code():
def trigger_all_pseudoclocks(t='initial'):
# Must wait this long before providing a trigger, in case child clocks aren't ready yet:
wait_delay = compiler.wait_delay
if t == 'initial':
if type(t) in [str, bytes] and t == 'initial':
# But not at the start of the experiment:
wait_delay = 0
# Trigger them all:
Expand Down

0 comments on commit f970adf

Please sign in to comment.