From 4ea2f9a581e8b945c57a45f80517cfbb8d7f8e07 Mon Sep 17 00:00:00 2001 From: eiger Date: Tue, 6 Jun 2023 11:29:47 +0200 Subject: [PATCH] hepump: fix checks with neodry fix checks look and code 0 (xds35) but not 8 (neodry) --- tcl/drivers/hepump.tcl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tcl/drivers/hepump.tcl b/tcl/drivers/hepump.tcl index cdb9bd7..5f0a952 100644 --- a/tcl/drivers/hepump.tcl +++ b/tcl/drivers/hepump.tcl @@ -204,7 +204,7 @@ proc hepump::check_valve {} { } proc hepump::set_valve {} { - if {[sctval [sct parent]] != 0} return + if {[sctval [sct parent]] % 8 != 0} {return idle} set val [hvali [sct]] if {[sct target] < 2} { if {[hvali [sct parent]/[sct @motname]/encoder] > 20} { @@ -238,7 +238,7 @@ proc hepump::slow_close {} { } proc hepump::get_valve {} { - if {[sctval [sct parent]] != 0} {return idle} + if {[sctval [sct parent]] % 8 != 0} {return idle} set p [sct parent]/[sct @motname] set stat [hgetpropval $p status] set pos [hvali $p/encoder] @@ -296,7 +296,7 @@ proc hepump::get_valve {} { } proc hepump::chk_running {} { - if {[sctval [sct parent]] != 0} return + if {[sctval [sct parent]] % 8 != 0} return if {[sct target]} { hset [sct parent]/[sct @motname]/output0 1 } else { # off @@ -314,8 +314,8 @@ proc hepump::chk_running {} { } proc hepump::get_running {} { - # only for xds35 - if {[sctval [sct parent]] != 0} {return idle} + # only for xds35 and neodry + if {[sctval [sct parent]] % 8 != 0} {return idle} set running [sctval [sct parent]/[sct @motname]/output0] set pumpoff [silent 1 hval [sct parent]/[sct @motname]/input3] @@ -361,6 +361,7 @@ proc hepump::get_running {} { } proc hepump::set_eco {} { + # xds35 only, not for neodry if {[sctval [sct parent]] != 0} {return idle} if {[sct target] != [hvali [sct]]} { hset [sct parent]/auto 0 @@ -374,6 +375,7 @@ proc hepump::set_eco {} { } proc hepump::get_eco {} { + # xds35 only, not for neodry if {[sctval [sct parent]] != 0} { sct update 0 return idle @@ -385,11 +387,13 @@ proc hepump::get_eco {} { } proc hepump::set_auto {} { + # xds35 only, not for neodry if {[sctval [sct parent]] != 0} {return idle} sct update [sct target] } proc hepump::get_auto {} { + # xds35 only, not for neodry if {[sctval [sct parent]] != 0} {return idle} set auto [hvali [sct]] set oldeco [sctval [sct parent]/eco]