fix valve readback
the ccu4 firmware does not report changes on valves upon the ? command. fix it: poll explicitly
This commit is contained in:
@@ -385,12 +385,14 @@ proc stdConfig::ccu4 {{title CCU4} args} {
|
||||
} elseif {[string match valve* $a]} {
|
||||
set nvalve [string range $a 5 end]
|
||||
for {set ch 1} {$ch <= 12} {incr ch} {
|
||||
node v$ch upd
|
||||
node v$ch rd -int 10
|
||||
prop read ccu4::readValve v$ch
|
||||
prop enum valve_off,valve_on,no_valve,timeout,timeout1,boost
|
||||
if {$ch > $nvalve} {
|
||||
prop visible false
|
||||
}
|
||||
node vc$ch out -int
|
||||
prop write ccu4::writeValve v$ch
|
||||
prop enum valve_off,valve_on
|
||||
if {$ch > $nvalve} {
|
||||
prop visible false
|
||||
@@ -404,6 +406,20 @@ proc stdConfig::ccu4 {{title CCU4} args} {
|
||||
return "CCU4"
|
||||
}
|
||||
|
||||
proc ccu4::readValve {valve} {
|
||||
# for some strange reason, v... are not queried with '?'
|
||||
# we have to do it here
|
||||
sct send $valve
|
||||
return ccu4::complete
|
||||
}
|
||||
|
||||
proc ccu4::writeValve {valve} {
|
||||
set res [ccu4::write]
|
||||
# update readback value immediately
|
||||
hupdate [sct parent]/$valve [sct target]
|
||||
return $res
|
||||
}
|
||||
|
||||
proc ccu4::completeStart {name} {
|
||||
set resval(cid) 0
|
||||
set resval(cir) ""
|
||||
|
||||
Reference in New Issue
Block a user