mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[hal, wpilib] Remove DigitalGlitchFilter (#7725)
This commit is contained in:
@@ -269,32 +269,4 @@ HAL_Bool HAL_IsPulsing(HAL_DigitalHandle dioPortHandle, int32_t* status) {
|
||||
HAL_Bool HAL_IsAnyPulsing(int32_t* status) {
|
||||
return false; // TODO(Thad) Figure this out
|
||||
}
|
||||
|
||||
void HAL_SetFilterSelect(HAL_DigitalHandle dioPortHandle, int32_t filterIndex,
|
||||
int32_t* status) {
|
||||
auto port = digitalChannelHandles->Get(dioPortHandle, HAL_HandleEnum::DIO);
|
||||
if (port == nullptr) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return;
|
||||
}
|
||||
// mimics athena HAL
|
||||
port->filterIndex = filterIndex % 4;
|
||||
}
|
||||
|
||||
int32_t HAL_GetFilterSelect(HAL_DigitalHandle dioPortHandle, int32_t* status) {
|
||||
auto port = digitalChannelHandles->Get(dioPortHandle, HAL_HandleEnum::DIO);
|
||||
if (port == nullptr) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return 0;
|
||||
}
|
||||
return port->filterIndex;
|
||||
}
|
||||
|
||||
void HAL_SetFilterPeriod(int32_t filterIndex, int64_t value, int32_t* status) {
|
||||
// TODO(Thad) figure this out
|
||||
}
|
||||
|
||||
int64_t HAL_GetFilterPeriod(int32_t filterIndex, int32_t* status) {
|
||||
return 0; // TODO(Thad) figure this out
|
||||
}
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user