You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting a custom sample expiration using RunningAverageRssiFilter. setSampleExpirationMilliseconds changes the static expiration and thus running RSSI averages.
Actual behavior
All distance calculations use the value from RangedBeacon.sampleExpirationMilliseconds.
Yes, it appears I undid the change from #523 got undone in a bad merge.
I think it is safe to remove the sampleExpirationMilliseconds field from RangedBeacon entirely, including its use in commitMeasurements(). This field is a holdover from the 0.x version of the library where RangedBeacon was where this setting was stored. Only this method needs to be retained:
//kept here for backward compatibility
public static void setSampleExpirationMilliseconds(long milliseconds) {
sampleExpirationMilliseconds = milliseconds;
RunningAverageRssiFilter.setSampleExpirationMilliseconds(sampleExpirationMilliseconds);
}
Expected behavior
Setting a custom sample expiration using
RunningAverageRssiFilter. setSampleExpirationMilliseconds
changes the static expiration and thus running RSSI averages.Actual behavior
All distance calculations use the value from
RangedBeacon.sampleExpirationMilliseconds
.This is a regression of #523 (AltBeacon/android-beacon-library-reference#30). It was introduced in commit f084042 (PR #484) where the
RunningAverageRssiFilter
has it's value constantly reset after every cycle inRangedBeacon#commitMeasurements
.Steps to reproduce this behavior
RunningAverageRssiFilter.setSampleExpirationMilliseconds
RunningAverageRssiFilter
sample expirationAndroid Beacon Library version
2.12.3
The text was updated successfully, but these errors were encountered: