Skip to content

Typo in rotary_encoder.py #41

@Narukara

Description

@Narukara

I think there is a typo in line 82. It should be B << 1, not B << 2.

# We convert these to an ordinal sequence number by returning
# seq = (A ^ B) | B << 2
#
def rotation_sequence(self):
a_state = self.gpio.input(self.a_pin)
b_state = self.gpio.input(self.b_pin)
r_seq = (a_state ^ b_state) | b_state << 1
return r_seq

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions