Skip to content

DigitalOutputs writeAll function not correctly writing to each Output #8

Closed
@kevmk04

Description

@kevmk04

When using the writeAll function for Digital Outputs, the function will only turn on/off all Outputs regardless of input integer. For example, supplying any value greater than zero will turn ON all Outputs. Providing a zero will turn OFF all Outputs.

Function source code is here:

void DigitalOutputsClass::writeAll(uint8_t val_mask) {

Within the function, it appears that the logical (&&) operator is being used where a bitwise (&) should be. I was able to test this with a Portenta Machine Control and confirmed that switching the operator fixes the issue and allows the integer to be correctly parsed into the individual outputs.

Line w/ Operator:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions