-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
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:
| if (val_mask && (1 << ch)) { |
Metadata
Metadata
Assignees
Labels
No labels