Skip to content

analogRead() broken #3

@pavelpetrovic

Description

@pavelpetrovic

Hi,

Please fix the following two lines in this file
https://github.com/MHEtLive/MHEtLiveArduino/blob/master/mhetlive-avr-1.0.0/1.0.0/cores/tiny88/wiring_analog.c

current (wrong):

if (17 <= pin <= 18) pin -= 11;	// allow for channel or pin numbers
else if (19 <= pin <= 24) pin -= 19;

should be (correct):

if (17 <= pin && pin <= 18) pin -= 11;	// allow for channel or pin numbers
else if (19 <= pin && pin <= 24) pin -= 19;

thanks and please avoid those lazy snakes :)
Pavel.

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