air_sensor: Replace thresholds with sample aggregation
This CL ditches the predefined VOC thresholds and instead keeps track of
the running mean and variance of a compensated air quality value. By
comparing the current value with statistics from aggregated past values,
it sets the LED color, e.g.
* blue (better than average)
* cyan (average)
* green (~1 standard deviations below average)
* yellow (~2 standard deviations below average)
* red (3+ standard deviations below average)
Change-Id: Ida319a9699ff02bbfdc5fb240f9bf55a8bcedb95
Reviewed-on: https://pigweed-internal-review.git.corp.google.com/c/pigweed/showcase/rp2/+/72654
Presubmit-Verified: CQ Bot Account <pigweed-internal-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Aaron Green <aarongreen@google.com>
12 files changed