Skip to content

Commit

Permalink
rename setup_minmax to setup_adc_sample for analog effect. Fixes [BUG…
Browse files Browse the repository at this point in the history
…] 'MCU_adc' object has no attribute 'setup_minmax' julianschill#211
  • Loading branch information
julianschill committed Jul 1, 2024
1 parent 28a3c25 commit 03a46ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion simulator/simulator/klippermock.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def set_stepper_pos(self, pos):
self.led_effect.handler.stepperPositions=[pos,pos,pos]
def setup_pin(self, name, pin):
return self
def setup_minmax(self, min, max):
def setup_adc_sample(self, min, max):
pass
def setup_adc_callback(self, time, adcCallback):
pass
Expand Down
2 changes: 1 addition & 1 deletion src/led_effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def __init__(self, config):
if self.analogPin:
ppins = self.printer.lookup_object('pins')
self.mcu_adc = ppins.setup_pin('adc', self.analogPin)
self.mcu_adc.setup_minmax(ANALOG_SAMPLE_TIME, ANALOG_SAMPLE_COUNT)
self.mcu_adc.setup_adc_sample(ANALOG_SAMPLE_TIME, ANALOG_SAMPLE_COUNT)
self.mcu_adc.setup_adc_callback(ANALOG_REPORT_TIME, self.adcCallback)
query_adc = self.printer.load_object(self.config, 'query_adc')
query_adc.register_adc(self.name, self.mcu_adc)
Expand Down

0 comments on commit 03a46ea

Please sign in to comment.