Fix encoder direction inversion being ignored

This commit is contained in:
Gleb Sabirzyanov 2022-06-21 15:18:42 +10:00 committed by Kyle Brown
parent 0f9eb196c2
commit d70de71c5f

View File

@ -227,8 +227,7 @@ class EncoderHandler(Module):
# Else fall back to GPIO # Else fall back to GPIO
else: else:
gpio_pins = pins[:3] new_encoder = GPIOEncoder(*pins)
new_encoder = GPIOEncoder(*gpio_pins)
# In our case, we need to define keybord and encoder_id for callbacks # In our case, we need to define keybord and encoder_id for callbacks
new_encoder.on_move_do = lambda x, bound_idx=idx: self.on_move_do( new_encoder.on_move_do = lambda x, bound_idx=idx: self.on_move_do(