wshub: persist calibration alongside sources; add config reload

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino Ferrari
2026-08-16 19:27:23 +02:00
co-authored by Claude Sonnet 4.6
parent 66efd74dd5
commit dfd257cfd9
3 changed files with 213 additions and 12 deletions
+5
View File
@@ -239,6 +239,10 @@ type Hub struct {
sm *SourceManager // set after construction; used for WS-initiated source changes
// cal holds the per-signal calibration table. It is metadata only: the
// rings, the history and the trigger comparator all keep raw samples.
cal *calTable
// Ring buffers for hi-res zoom data.
// ringsMu protects the map structure; each sigRing has its own RWMutex for data.
ringsMu sync.RWMutex
@@ -270,6 +274,7 @@ func NewHub() *Hub {
rings: make(map[string]*sigRing),
statsMap: make(map[string]*SourceStat),
trigger: newTriggerEngine(),
cal: newCalTable(),
}
}