klippy: Run the MCU connect code within the reactor

Setup the reactor and run the MCU connection code as a timer within
the reactor.  The connection code will make use of reactor greenlets
so that it can wait for events during the connection phase.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2016-11-28 13:14:56 -05:00
parent bafe796eeb
commit 5d805ba550
4 changed files with 28 additions and 24 deletions

View file

@ -59,7 +59,6 @@ class GCodeParser:
for h in handlers)
def run(self):
self.fd_handle = self.reactor.register_fd(self.fd, self.process_data)
self.reactor.run()
def finish(self):
self.reactor.end()
self.toolhead.motor_off()