From e2d57edf45a76abf8e20591faa0ae8e70b700ace Mon Sep 17 00:00:00 2001 From: William Clark Date: Tue, 21 Nov 2023 14:57:53 +0000 Subject: [PATCH] gofmt --- config/config.go | 6 +++--- core/th7/service.go | 6 ++---- data/config/data.go | 4 ++-- data/core/data.go | 5 ++--- filter/filter.go | 3 +-- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/config/config.go b/config/config.go index 05c73b8..dc41fa1 100644 --- a/config/config.go +++ b/config/config.go @@ -98,9 +98,9 @@ func Load() (config.Config, error) { return cfg, err } c.Thermo = tc - - c.Filter.SampleSize = v.GetInt(head+".filter.samples") - + + c.Filter.SampleSize = v.GetInt(head + ".filter.samples") + cfg.Channels = append(cfg.Channels, c) } diff --git a/core/th7/service.go b/core/th7/service.go index c1d3065..caa3bce 100644 --- a/core/th7/service.go +++ b/core/th7/service.go @@ -15,8 +15,6 @@ const ( DurWaitRestart = 1000 * time.Millisecond ) - - // Continuously sample each configured channel, apply filter, and save result // in a mutex controlled shared data object, that can be accessed at any time // by a web-request or similar. @@ -36,13 +34,13 @@ func startCacheService(t *TH7Adapter) { for t.run { timer_start := time.Now() - + for channel := range t.cfg.Channels { channel_id := t.cfg.Channels[channel].Id channel_gain := t.cfg.Channels[channel].Gain - for i:=0; i