hepump: fix checks with neodry
fix checks look and code 0 (xds35) but not 8 (neodry)
This commit is contained in:
@ -204,7 +204,7 @@ proc hepump::check_valve {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc hepump::set_valve {} {
|
proc hepump::set_valve {} {
|
||||||
if {[sctval [sct parent]] != 0} return
|
if {[sctval [sct parent]] % 8 != 0} {return idle}
|
||||||
set val [hvali [sct]]
|
set val [hvali [sct]]
|
||||||
if {[sct target] < 2} {
|
if {[sct target] < 2} {
|
||||||
if {[hvali [sct parent]/[sct @motname]/encoder] > 20} {
|
if {[hvali [sct parent]/[sct @motname]/encoder] > 20} {
|
||||||
@ -238,7 +238,7 @@ proc hepump::slow_close {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc hepump::get_valve {} {
|
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 p [sct parent]/[sct @motname]
|
||||||
set stat [hgetpropval $p status]
|
set stat [hgetpropval $p status]
|
||||||
set pos [hvali $p/encoder]
|
set pos [hvali $p/encoder]
|
||||||
@ -296,7 +296,7 @@ proc hepump::get_valve {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc hepump::chk_running {} {
|
proc hepump::chk_running {} {
|
||||||
if {[sctval [sct parent]] != 0} return
|
if {[sctval [sct parent]] % 8 != 0} return
|
||||||
if {[sct target]} {
|
if {[sct target]} {
|
||||||
hset [sct parent]/[sct @motname]/output0 1
|
hset [sct parent]/[sct @motname]/output0 1
|
||||||
} else { # off
|
} else { # off
|
||||||
@ -314,8 +314,8 @@ proc hepump::chk_running {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc hepump::get_running {} {
|
proc hepump::get_running {} {
|
||||||
# only for xds35
|
# only for xds35 and neodry
|
||||||
if {[sctval [sct parent]] != 0} {return idle}
|
if {[sctval [sct parent]] % 8 != 0} {return idle}
|
||||||
|
|
||||||
set running [sctval [sct parent]/[sct @motname]/output0]
|
set running [sctval [sct parent]/[sct @motname]/output0]
|
||||||
set pumpoff [silent 1 hval [sct parent]/[sct @motname]/input3]
|
set pumpoff [silent 1 hval [sct parent]/[sct @motname]/input3]
|
||||||
@ -361,6 +361,7 @@ proc hepump::get_running {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc hepump::set_eco {} {
|
proc hepump::set_eco {} {
|
||||||
|
# xds35 only, not for neodry
|
||||||
if {[sctval [sct parent]] != 0} {return idle}
|
if {[sctval [sct parent]] != 0} {return idle}
|
||||||
if {[sct target] != [hvali [sct]]} {
|
if {[sct target] != [hvali [sct]]} {
|
||||||
hset [sct parent]/auto 0
|
hset [sct parent]/auto 0
|
||||||
@ -374,6 +375,7 @@ proc hepump::set_eco {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc hepump::get_eco {} {
|
proc hepump::get_eco {} {
|
||||||
|
# xds35 only, not for neodry
|
||||||
if {[sctval [sct parent]] != 0} {
|
if {[sctval [sct parent]] != 0} {
|
||||||
sct update 0
|
sct update 0
|
||||||
return idle
|
return idle
|
||||||
@ -385,11 +387,13 @@ proc hepump::get_eco {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc hepump::set_auto {} {
|
proc hepump::set_auto {} {
|
||||||
|
# xds35 only, not for neodry
|
||||||
if {[sctval [sct parent]] != 0} {return idle}
|
if {[sctval [sct parent]] != 0} {return idle}
|
||||||
sct update [sct target]
|
sct update [sct target]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc hepump::get_auto {} {
|
proc hepump::get_auto {} {
|
||||||
|
# xds35 only, not for neodry
|
||||||
if {[sctval [sct parent]] != 0} {return idle}
|
if {[sctval [sct parent]] != 0} {return idle}
|
||||||
set auto [hvali [sct]]
|
set auto [hvali [sct]]
|
||||||
set oldeco [sctval [sct parent]/eco]
|
set oldeco [sctval [sct parent]/eco]
|
||||||
|
Reference in New Issue
Block a user