mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Add support for writing RTR CAN Frames to the CAN API (#1900)
This commit is contained in:
committed by
Peter Johnson
parent
9f740e5905
commit
cb54602d49
@@ -89,6 +89,17 @@ public class CAN implements Closeable {
|
||||
CANAPIJNI.writeCANPacketRepeating(m_handle, data, apiId, repeatMs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write an RTR frame to the CAN device with a specific ID. This ID is 10 bits.
|
||||
* The length by spec must match what is returned by the responding device
|
||||
*
|
||||
* @param length The length to request (0 to 8)
|
||||
* @param apiId The API ID to write.
|
||||
*/
|
||||
public void writeRTRFrame(int length, int apiId) {
|
||||
CANAPIJNI.writeCANRTRFrame(m_handle, length, apiId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop a repeating packet with a specific ID. This ID is 10 bits.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user