[sim] Add HAL hooks for simulationPeriodic (#2881)

This allows vendor libs to hook into the begin or end of simulationPeriodic().
This commit is contained in:
Peter Johnson
2020-11-30 23:55:36 -08:00
committed by GitHub
parent d16f05f2c8
commit 339d7445b3
10 changed files with 195 additions and 0 deletions

View File

@@ -84,6 +84,30 @@ Java_edu_wpi_first_hal_HAL_exitMain
HAL_ExitMain();
}
/*
* Class: edu_wpi_first_hal_HAL
* Method: simPeriodicBeforeNative
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_edu_wpi_first_hal_HAL_simPeriodicBeforeNative
(JNIEnv*, jclass)
{
HAL_SimPeriodicBefore();
}
/*
* Class: edu_wpi_first_hal_HAL
* Method: simPeriodicAfterNative
* Signature: ()V
*/
JNIEXPORT void JNICALL
Java_edu_wpi_first_hal_HAL_simPeriodicAfterNative
(JNIEnv*, jclass)
{
HAL_SimPeriodicAfter();
}
/*
* Class: edu_wpi_first_hal_HAL
* Method: observeUserProgramStarting