Skip to content

Commit

Permalink
Bug fixes after testing
Browse files Browse the repository at this point in the history
  • Loading branch information
CCS Operator Account committed Nov 5, 2021
1 parent 07414e4 commit c7afce5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/acquire.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ def do_scan(options):
tc.take_images()

def do_one_time_config(options):
idle_flush = options.get("IDLE_FLUSH")
if idle_flush:
print "one_time_config called %s" % options
if "idle_flush" in options:
idle_flush = options.getBool("idle_flush")
fp.fp.sequencerConfig().change("idleFlushTimeout", 0 if idle_flush else -1)
14 changes: 12 additions & 2 deletions lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def execute(config, command_line_options):
time.sleep(30) # wait a bit for getting settled
command_line_options["symlink"] = "/".join([symlink,alabel])

one_time_config = config.options("CONFIG")
one_time_config = config.items("CONFIG")
if one_time_config:
acquire.do_one_time_config(one_time_config)
acquire.do_one_time_config(Config(dict(one_time_config)))

items = config.options("ACQUIRE")
for item in items:
Expand Down Expand Up @@ -74,5 +74,15 @@ def getFloat(self, key, defaultValue=None):
raise Exception('Missing config value %s' % key)
return float(value)

def getBool(self, key, defaultValue=None):
value = self.get(key)
if not value:
if defaultValue != None:
return defaultValue
else:
raise Exception('Missing config value %s' % key)
return value.lower() in ['true', '1', 't', 'y', 'yes']


def getList(self, key):
return self.get(key).replace('\n','').split(',')

0 comments on commit c7afce5

Please sign in to comment.