succd: factor out ringbuffer, do not recalculate average on every request

This commit is contained in:
Serge Bazanski 2024-09-28 09:35:41 +02:00
parent 42c9ae2fa7
commit 4df00f0a63
3 changed files with 47 additions and 32 deletions

View file

@ -28,6 +28,8 @@ func main() {
d := daemon{}
d.daemonState.rpOn = true
d.daemonState.piraniVolts3.limit = 3
d.daemonState.piraniVolts100.limit = 100
d.aboveRough.threshold = float64(flagPressureThresholdRough)
d.aboveHigh.threshold = float64(flagPressureThresholdHigh)