Skip to content

Launch All state reactions(interrupt ) if a second encoder is not connected #25

@fixus971

Description

@fixus971

Hi. There is a bug whereby if an encoder is missing(optional) and I call updateStatus().
In this case All interrupt routines are launched for
Encoder is released!
Encoder is pushed!
Encoder is long pushed!
Encoder is double pushed!
..
all this because this function does not check the error reported by the I2C bus
_stat = readEncoderByte(REG_ESTATUS);
receive -1 = 255

in lib i don't see a test function to check the connection.

I would add a "connected" boolean during setup or reset or begin

For the rest I am fine .. thanks
-Federico

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