Commit dce84547 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Initialization of timers (1st step)

parent a87c4151
......@@ -78,6 +78,8 @@ class sdlHandler(QObject):
self.tree_items = {}
self.dock_simu = self.start_simu()
self.current_sdl_state = None
# Handle the state of all timers ({'timerName': 'set'/'unset'})
self.timers = {}
@property
def dll(self):
......@@ -124,6 +126,7 @@ class sdlHandler(QObject):
# Initialization: set current state and internal variables
self.current_sdl_state = None
self.on_event()
self.init_timers()
@Slot()
def startStop(self):
......@@ -245,4 +248,11 @@ class sdlHandler(QObject):
.format(each['name']))
register_func(self.tm_func)
def init_timers(self):
''' When loading the DLL, initialize timers/set callbacks, etc '''
for each in self.proc.timers:
self.timers[each] = 'unset'
self.buttons[each].setEnabled(False)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment