Last active
September 18, 2016 22:22
-
-
Save ilovetogetspamed/f0a71896168789c779da892fce385dd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
McuProtocol is a twisted protocol | |
... | |
class McuProtocol(basic.LineReceiver): | |
def | |
def mcu_requested_shaft_delay_milliseconds(self, *args): | |
""" | |
The MCU requested the shaft delay milliseconds from the config. | |
Args: | |
*args: None | |
Returns: None | |
""" | |
Logger.info('McuProtocol: Requested shaft-delay-ms') | |
config = app.load_config() | |
shaft_delay = config.get('Machine', 'shaft delay') | |
self.transport.write('{:d}'.format(int(shaft_delay))) | |
def anotherFunctions | |
class MyApp(Application) | |
... | |
config = ConfigParser | |
... | |
if __name__ == '__main__': | |
app = MyApp() # used for getting config file from McuProtocol class... there has to be a better way... | |
MyApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment