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:
Kevin O'Connor 2016-11-22 12:37:37 -05:00
parent 9755182adf
commit d161d66741
3 changed files with 13 additions and 11 deletions

View file

@ -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):