Skip to content

Atm_led fails to turn off if using the level map feature #82

Description

@whittedb

After attempting to implement an led using the level map and brightness features and the led failing to turn off, I looked at the code.

The logic in the action() ENT_OFF code path seems wrong to me unless I'm having a senior moment and missing something obvious. I believe the correct logic should be as follows.

if (activeLow) {
    digitalWrite(pin, HIGH);
} else {
    if (levelMapSize) {
        analogWrite(pin, 0);
    } else {
        digitalWrite(pin, LOW);
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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