mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 22:54:10 -06:00
mcu: Handle adc initialization entirely in mcu code
Don't expose the ADC initialization to the gcode and heater code - instead, register a callback within the MCU_adc class and call it directly from the MCU class after configuration completes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
9755182adf
commit
d161d66741
3 changed files with 13 additions and 11 deletions
|
@ -58,10 +58,6 @@ class GCodeParser:
|
|||
self.gcode_handlers = dict((h, getattr(self, 'cmd_'+h))
|
||||
for h in handlers)
|
||||
def run(self):
|
||||
if self.heater_nozzle is not None:
|
||||
self.heater_nozzle.run()
|
||||
if self.heater_bed is not None:
|
||||
self.heater_bed.run()
|
||||
self.fd_handle = self.reactor.register_fd(self.fd, self.process_data)
|
||||
self.reactor.run()
|
||||
def finish(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue