From daf0c957b6625a11b24d83293f21a2931f439114 Mon Sep 17 00:00:00 2001 From: William Clark Date: Mon, 5 Dec 2022 13:25:30 +0000 Subject: [PATCH] write pcb table to adapter ratio table --- core/th7/service.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/core/th7/service.go b/core/th7/service.go index b28827f..0a6e289 100644 --- a/core/th7/service.go +++ b/core/th7/service.go @@ -127,9 +127,19 @@ func startCacheService(t *TH7Adapter) { } - t.mu.Lock() + // maybe update the pcb table here ? + + t.mu.Lock() // LOCK + t.data = data - t.mu.Unlock() + + // update the ratio table of the TH7 adapter + table := t.pcbPort.GetTable() + t.table.Pivdd = table.Pivdd + t.table.Vadj = table.Vadj + t.table.Vref = table.Vref + + t.mu.Unlock() // UNLOCK elapsed := time.Since(timer_start)