mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Relay: In free(), set both forward and reverse to 0.
Also, check status in between the two calls. Change-Id: I5a6c24aefde3707a953a41cb7c56e8fb372e1ea0
This commit is contained in:
@@ -188,7 +188,8 @@ public class Relay extends SensorBase implements LiveWindowSendable {
|
||||
status.order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
RelayJNI.setRelayForward(m_port, (byte) 0, status.asIntBuffer());
|
||||
RelayJNI.setRelayForward(m_port, (byte) 0, status.asIntBuffer());
|
||||
HALUtil.checkStatus(status.asIntBuffer());
|
||||
RelayJNI.setRelayReverse(m_port, (byte) 0, status.asIntBuffer());
|
||||
HALUtil.checkStatus(status.asIntBuffer());
|
||||
|
||||
DIOJNI.freeDIO(m_port, status.asIntBuffer());
|
||||
|
||||
Reference in New Issue
Block a user