julianschill / klipper-led_effect

LED effects plugin for klipper
GNU General Public License v3.0
645 stars 117 forks source link

[BUG] 'MCU_adc' object has no attribute 'setup_minmax' #211

Open yet-another-average-joe opened 6 days ago

yet-another-average-joe commented 6 days ago

Klipper last update (v0.12.0-256-g6d700502) killed the "analog" feature. A new ADC management was introduced with this commit.

self.mcu_adc.setup_minmax(ANALOG_SAMPLE_TIME, ANALOG_SAMPLE_COUNT) led_effect.py, line 366

doen't work anymore. setup_minmax() was replaced with setup_adc_sample() in Klipper.

Seems that renaming the function call in led_effect.py solves the problem, but now led_effect is "dirty" (of course)...

Replaced :

self.mcu_adc.setup_minmax(ANALOG_SAMPLE_TIME, ANALOG_SAMPLE_COUNT)

with

self.mcu_adc.setup_adc_sample(ANALOG_SAMPLE_TIME, ANALOG_SAMPLE_COUNT)

julianschill commented 6 days ago

Thanks for reporting. Will look into this.