Skip to content

Bug Report: enable pins as digital input pins to start reading not working for DI but for DIO #66

@mascheck55

Description

@mascheck55

Version

0.0.23alpha

Bug description

The function "bool enableDigitalInput(uint8_t pin, bool pullup) {" has in her first line:
if (!bitRead(pinMap[pin].capability, DI)) { ... but DI is 1 and for real DI (not DIO) there should be a 0. Hence I corrected as followes "if (!bitRead(pinMap[pin].capability, 0)) {" and that works also for DIO pins.

Steps to reproduce the bug

mark one pin as DI instead of DIO in the pin mapping file
try to use it as digital input in the myAutomation.h
watch the serial output of te EX-IOExpander and you get "ERROR! pin X not capable of digital input"

Expected behaviour

there schould be created a virtual Pin for Input only

Screenshots

No response

Hardware in use

DCC-EX Commandstation Mega
EX-IOExpander Nano

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working as designedEX-IOExpanderItem relates to EX-IOExpander

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    To Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions