mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[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:
@@ -422,6 +422,10 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) {
|
||||
|
||||
void HAL_Shutdown(void) {}
|
||||
|
||||
void HAL_SimPeriodicBefore(void) {}
|
||||
|
||||
void HAL_SimPeriodicAfter(void) {}
|
||||
|
||||
int64_t HAL_Report(int32_t resource, int32_t instanceNumber, int32_t context,
|
||||
const char* feature) {
|
||||
if (feature == nullptr) {
|
||||
|
||||
@@ -33,4 +33,18 @@ void HALSIM_SetSendError(HALSIM_SendErrorHandler handler) {}
|
||||
|
||||
void HALSIM_SetSendConsoleLine(HALSIM_SendConsoleLineHandler handler) {}
|
||||
|
||||
int32_t HALSIM_RegisterSimPeriodicBeforeCallback(
|
||||
HALSIM_SimPeriodicCallback callback, void* param) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void HALSIM_CancelSimPeriodicBeforeCallback(int32_t uid) {}
|
||||
|
||||
int32_t HALSIM_RegisterSimPeriodicAfterCallback(
|
||||
HALSIM_SimPeriodicCallback callback, void* param) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void HALSIM_CancelSimPeriodicAfterCallback(int32_t uid) {}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user