From 257ba10abefe9485c5f04f59d144d05a1acc3505 Mon Sep 17 00:00:00 2001 From: William Clark Date: Mon, 5 Dec 2022 14:00:56 +0000 Subject: [PATCH] updating fields --- core/th7/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/th7/service.go b/core/th7/service.go index 0a6e289..8f1c249 100644 --- a/core/th7/service.go +++ b/core/th7/service.go @@ -81,6 +81,8 @@ func startCacheService(t *TH7Adapter) { for k := range t.cfg.Channels { tc := t.cfg.Channels[k].Thermo + data[k].Unit = t.cfg.Channels[k].Unit + data[k].Id = t.cfg.Channels[k].Id // if we can apply CJC with this configuration ... if thermocouple.WithinTemperatureRange(tc, pcb_temperature) { @@ -92,8 +94,6 @@ func startCacheService(t *TH7Adapter) { } data[k].Value -= cjc_uv - data[k].Unit = t.cfg.Channels[k].Unit - data[k].Id = t.cfg.Channels[k].Id } // CJC can not be applied