serialhdl: Make SerialReader.connect() blocking
Use the greenlet mechanism to wait for the connection to come up in the serial connect() method. This simplifies the calling code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -85,9 +85,6 @@ class Printer:
|
||||
def connect_file(self, output, dictionary):
|
||||
self.reactor.update_timer(self.stats_timer, self.reactor.NEVER)
|
||||
self.mcu.connect_file(output, dictionary)
|
||||
self.build_config()
|
||||
self.gcode.run()
|
||||
self.reactor.unregister_timer(self.connect_timer)
|
||||
def run(self):
|
||||
self.reactor.run()
|
||||
# If gcode exits, then exit the MCU
|
||||
|
||||
Reference in New Issue
Block a user