Add support for writing RTR CAN Frames to the CAN API (#1900)

This commit is contained in:
Thad House
2019-09-28 16:49:34 -07:00
committed by Peter Johnson
parent 9f740e5905
commit cb54602d49
8 changed files with 100 additions and 0 deletions

View File

@@ -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