refactor call_method_name into actions.py so all the input messages go through the same pipe (mainly to be compatible with workings in plugins dev branch)

This commit is contained in:
Tristan Rowley
2019-12-22 22:09:39 +00:00
parent 5d239e5a5d
commit 6a14dfbe72
3 changed files with 19 additions and 27 deletions

View File

@@ -69,15 +69,9 @@ class AnalogInput(object):
norm_channel_value = None
print('the action being called is {}'.format(method_name))
self.call_method_name(method_name, norm_channel_value)
self.actions.call_method_name(method_name, norm_channel_value)
## not sure whether we want to update the screen in general; here - probably not most of the time ...
#if 'cc' not in message_name:
# self.display.refresh_display()
def call_method_name(self, method_name, argument=None):
if argument is not None:
getattr(self.actions, method_name)(argument)
else:
getattr(self.actions, method_name)()