mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 21:47:39 +02:00
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:
@@ -6,7 +6,7 @@ from collections import deque
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
MOVING_AVG_SIZE = 5
|
||||
MOVING_AVG_SIZE = 20
|
||||
|
||||
|
||||
class ScaleReader:
|
||||
|
||||
Reference in New Issue
Block a user