mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Some general cleanups in the HAL (#188)
AnalogTrigger initialization checks are now in the correct order. Plus frees no longer grab the structure if it is not needed.
This commit is contained in:
committed by
Peter Johnson
parent
8ac7e44f19
commit
866046edd1
@@ -84,12 +84,7 @@ HAL_FPGAEncoderHandle HAL_InitializeFPGAEncoder(
|
||||
|
||||
void HAL_FreeFPGAEncoder(HAL_FPGAEncoderHandle fpga_encoder_handle,
|
||||
int32_t* status) {
|
||||
auto encoder = fpgaEncoderHandles.Get(fpga_encoder_handle);
|
||||
fpgaEncoderHandles.Free(fpga_encoder_handle);
|
||||
if (encoder == nullptr) {
|
||||
*status = HAL_HANDLE_ERROR;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user