Set the output low or high. Called by PortControl, only supported on local ports.
| 195 | |
| 196 | // Set the output low or high. Called by PortControl, only supported on local ports. |
| 197 | void GpOutputPort::WriteDigital(bool value) noexcept |
| 198 | { |
| 199 | lastPwm = (value) ? 1.0 : 0.0; |
| 200 | #if SUPPORT_CAN_EXPANSION |
| 201 | if (boardAddress != CanInterface::GetCanAddress()) |
| 202 | { |
| 203 | return; |
| 204 | } |
| 205 | #endif |
| 206 | port.WriteAnalog(lastPwm); // we must use WriteAnalog here because WriteDigital doesn't work on Duet 2 PWM ports |
| 207 | } |
| 208 | |
| 209 | #if SUPPORT_REMOTE_COMMANDS |
| 210 |
no test coverage detected