From 18a8b1d8ca2a7c2f8a84950a14eec3a32ffba92f Mon Sep 17 00:00:00 2001 From: tasp Date: Thu, 25 Aug 2022 14:57:31 +0200 Subject: [PATCH] ccu4flow: stop controlling when abs(dif) < tol/2 --- tcl/drivers/ccu4flow.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcl/drivers/ccu4flow.tcl b/tcl/drivers/ccu4flow.tcl index 53189fb..aafd8fa 100644 --- a/tcl/drivers/ccu4flow.tcl +++ b/tcl/drivers/ccu4flow.tcl @@ -541,7 +541,7 @@ proc ccu4flow::ctrl {} { # force init of reg_hyst state sct regstate reg setstate reg_hyst - } elseif {$dif * [sct dir] <= 0} { + } elseif {$dif * [sct dir] <= 0 || abs($dif) < $tol * 0.5} { setstate within_tolerance } elseif {$now < $lastim + $period} { # wait