Increase scale moving average window to reduce weight bouncing

5 samples at 100ms (500ms window) wasn't enough to smooth NAU7802 ADC
noise — the averaged value still varied by >2g between 1s report
intervals, and the stability state kept flipping, triggering a report
every cycle. Increased to 20 samples (2s window) so noise is smoothed
before reaching the reporting layer.
This commit is contained in:
maziggy
2026-02-27 13:31:51 +01:00
parent 541f8926b4
commit 12fe0741b5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ from collections import deque
logger = logging.getLogger(__name__)
MOVING_AVG_SIZE = 5
MOVING_AVG_SIZE = 20
class ScaleReader: