The following function is taking a parameter called filterWindowSamples
:
but in Phoenix Tuner the field is described as
How much filtering (milliseconds) to apply to vbat measurement. This impacts voltage compensation mode and vbat reporting.
So which is it? Is it the number of samples or the milliseconds of filtering? Additionally, in the tuner the value is selected from the following drop-down:
When using the API, there is no mention of those specific values, but when using the function, the actual value is truncated to the nearest value that’s on the dropdown. For example, if I give the function the value 200 it will take it down to 128. This behavior is not mentioned in either the javadoc or the online CTRE docs. Similar behavior is mentioned in another function:
Another somewhat related question, is how will the following function return an ErrorCode? Will I have to get it through getLastError()
? If so, how will I know if that error has originated from this operation?
Thanks in advance