Skip to content
Snippets Groups Projects
Commit 483fb057 authored by jkerdreu's avatar jkerdreu
Browse files

Remove unused callback. In fact timer are more usefull than CB. so

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/fork@1774 b32b6428-25c9-4566-ad07-03861ab6144f
parent 352431ce
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,6 @@ class Engine(object): ...@@ -42,7 +42,6 @@ class Engine(object):
self.devices = [] # list of devices / use (un)register_devices() self.devices = [] # list of devices / use (un)register_devices()
self.started = False # engine started or not self.started = False # engine started or not
self.running = False # engine is running or not self.running = False # engine is running or not
self.callbacks = [] # functions to call every loop
self.timers = [] # functions to call periodic self.timers = [] # functions to call periodic
self.__last_timer = 0 # last timer check self.__last_timer = 0 # last timer check
...@@ -230,25 +229,6 @@ class Engine(object): ...@@ -230,25 +229,6 @@ class Engine(object):
except XAALError as e: except XAALError as e:
logger.error(e) logger.error(e)
#####################################################
# Callback
#####################################################
def add_callback(self,func):
""" register a function to call at every engine loop"""
self.callbacks.append(func)
def remove_callback(self,func):
""" remove a given callback """
self.callbacks.remove(func)
def process_callbacks(self):
""" process registered callbacks """
for func in self.callbacks:
try:
func()
except CallbackError as e:
logger.error(e.description)
##################################################### #####################################################
# timers # timers
##################################################### #####################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment