mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +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
@@ -92,6 +92,21 @@ Java_edu_wpi_first_hal_CANAPIJNI_writeCANPacketRepeating
|
||||
CheckStatus(env, status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_CANAPIJNI
|
||||
* Method: writeCANRTRFrame
|
||||
* Signature: (III)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_CANAPIJNI_writeCANRTRFrame
|
||||
(JNIEnv* env, jclass, jint handle, jint length, jint apiId)
|
||||
{
|
||||
auto halHandle = static_cast<HAL_CANHandle>(handle);
|
||||
int32_t status = 0;
|
||||
HAL_WriteCANRTRFrame(halHandle, static_cast<int32_t>(length), apiId, &status);
|
||||
CheckStatus(env, status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_CANAPIJNI
|
||||
* Method: stopCANPacketRepeating
|
||||
|
||||
Reference in New Issue
Block a user