A new way to handle large pressure changes
This changes the way "significant pressure changes" are detected.
Instead of just looking at the rate of pressure change between the last
event and the current one, it confirms that the last several have all been
trending in the same direction and that the pressure change over all
events that small window of time are under the threshold instead. You
can acheive the old style by making that window a negative number.
The larger the window, the more events might be considered. However,
since the pressure change is deemed "noise" if the pressure is
fluctuating within that window, a large window will likely have no
effect.
BUG=chromium-os:38428
TEST=Regression tests + manually gmerged on a link
Change-Id: I30714c57620db9f618723c1d8bb6a87cb1b60cb3
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41020
3 files changed