Commit 085b2a16 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Complete support of timer symbols

parent dfe6ea79
......@@ -143,6 +143,10 @@ inst {fv};'''.format(fv=fv_name)]
self.msc_scene.addResetTimer(self.taste_instance,
self.next_y,
message)
elif direction == 'timeout':
self.msc_scene.addTimeout(self.taste_instance,
self.next_y,
message)
# This is how to add a comment on the graph:
# comment = self.msc_scene.addComment(msg)
#comment.setCommentText("Hello!")
......
......@@ -208,6 +208,10 @@ class sdlHandler(QObject):
def send_tc(self, name, tc_func_ptr):
''' Send a parameterless TC '''
if name in self.timers:
self.buttons[name].setEnabled(False)
self.msc.emit('timeout', name)
else:
self.msc.emit('out', name)
tc_func_ptr()
self.on_event()
......@@ -222,12 +226,14 @@ class sdlHandler(QObject):
self.msc.emit('set', 'SET_{}({})'.format(name, duration))
self.log_area.addItem('Received event "SET_{}({})"'
.format(name, duration))
self.buttons[name].setEnabled(True)
def reset_timer(self, name):
''' Callback function when the SDL model resets a timer '''
self.msc.emit('reset', 'RESET_{}'.format(name))
self.log_area.addItem('Received event "RESET_{}"'
.format(name))
self.buttons[name].setEnabled(False)
def set_paramless_tc(self):
''' Once the DLL is loaded set the buttons to send paramless TC '''
......
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