mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[hal] Use last error reporting instead of PARAMETER_OUT_OF_RANGE (#3328)
Makes the error messages much more specific to each error.
This commit is contained in:
@@ -267,10 +267,6 @@ Java_edu_wpi_first_hal_EncoderJNI_setEncoderSamplesToAverage
|
||||
{
|
||||
int32_t status = 0;
|
||||
HAL_SetEncoderSamplesToAverage((HAL_EncoderHandle)id, value, &status);
|
||||
if (status == PARAMETER_OUT_OF_RANGE) {
|
||||
ThrowBoundaryException(env, value, 1, 127);
|
||||
return;
|
||||
}
|
||||
CheckStatus(env, status);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user