forked from zietzm/Helmholtz_Test_Bench
Added ability to log data when test stand is commanded
This commit is contained in:
+6
-2
@@ -23,8 +23,6 @@ class ExecCSVThread(Thread):
|
||||
|
||||
def run(self):
|
||||
ui.ui_print("Starting Sequence Execution...")
|
||||
# g.threadLock.acquire() # Get lock to synchronize threads
|
||||
# ToDo: add locking/synchronization? Works without so far but might be more robust
|
||||
self.execute_sequence(self.array, 0.1, self.parent, self.controller) # run sequence
|
||||
# reset buttons on UI:
|
||||
if not g.exitFlag: # program window is open
|
||||
@@ -64,6 +62,12 @@ class ExecCSVThread(Thread):
|
||||
func.set_field(field_vec) # send field vector to test stand
|
||||
ui.ui_print(time.time() - t_zero)
|
||||
controller.StatusDisplay.update_labels() # update status display after change
|
||||
|
||||
# log change to the log file if user has selected event logging in the Configure Logging window
|
||||
logger = controller.pages[ui.ConfigureLogging] # get object of logging configurator
|
||||
if logger.event_logging: # data should be logged when test stand is commanded
|
||||
logger.log_datapoint() # log data
|
||||
|
||||
i = i + 1 # next row
|
||||
|
||||
g.threadLock.release() # allow going back to main thread now
|
||||
|
||||
Reference in New Issue
Block a user