On 8 February 2017 at 13:32, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: >> > I think it would make sense to unconditionally apply the hysteresis >> > to low/high, i.e. always set >> > low = low - hyst >> > high = high + hyst >> > >> > so that you get "sticky" ranges once you're in them? >> >> Yes, maybe that's better, I guess I want to avoid just adding a lag / >> delay in reporting changes that are not due to measurement error or >> temporary. Could also do something in between, e.g. use "low - hyst" >> if signal is close to low, otherwise just "low". > > That's sort of what you had, but except for the precise definition of > "close", no? > > Actually, no, because you used "last - hyst" rather than "low - hyst" > it's different. I think we can live with checking if it's close, say > setting to "low - hyst" when it's within low + hyst - that avoids the > problem I outlined above and gets a bit more responsiveness, I guess. I sent a version with this logic but came up with values that would still cause the continous events as in your example, specifically with a hyst of 3 and the reported RSSI values jumping between -51 and -47. This could be avoided by changing operators between "less than" and "less or equal" but I eventually sent a version with the "sticky" ranges you suggested, I think that is just as good. Best regards