updating fields

This commit is contained in:
William Clark 2022-12-05 14:00:56 +00:00
parent 1e7a9c2916
commit 257ba10abe

View File

@ -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