mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
[hal] Add SimValue reset() function (#3064)
This enables correct behavior for resetting incremental sensor values like encoder counts or gyro accumulated angle with WebSockets.
This commit is contained in:
@@ -40,6 +40,8 @@ void HAL_GetSimValue(HAL_SimValueHandle handle, struct HAL_Value* value) {
|
||||
void HAL_SetSimValue(HAL_SimValueHandle handle, const struct HAL_Value* value) {
|
||||
}
|
||||
|
||||
void HAL_ResetSimValue(HAL_SimValueHandle handle) {}
|
||||
|
||||
hal::SimDevice::SimDevice(const char* name, int index) {}
|
||||
|
||||
hal::SimDevice::SimDevice(const char* name, int index, int channel) {}
|
||||
|
||||
@@ -63,6 +63,15 @@ int32_t HALSIM_RegisterSimValueChangedCallback(HAL_SimValueHandle handle,
|
||||
|
||||
void HALSIM_CancelSimValueChangedCallback(int32_t uid) {}
|
||||
|
||||
int32_t HALSIM_RegisterSimValueResetCallback(HAL_SimValueHandle handle,
|
||||
void* param,
|
||||
HALSIM_SimValueCallback callback,
|
||||
HAL_Bool initialNotify) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void HALSIM_CancelSimValueResetCallback(int32_t uid) {}
|
||||
|
||||
HAL_SimValueHandle HALSIM_GetSimValueHandle(HAL_SimDeviceHandle device,
|
||||
const char* name) {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user