mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 22:54:10 -06:00
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:
parent
5d805ba550
commit
535c7b99b4
4 changed files with 34 additions and 42 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue