add manualfill to ccu4ext
This commit is contained in:
@ -15,7 +15,7 @@ proc stdConfig::ccu4ext {type {readlevel 0}} {
|
|||||||
prop write ccu4ext::writeExt $type
|
prop write ccu4ext::writeExt $type
|
||||||
prop read ccu4ext::fillExt $type
|
prop read ccu4ext::fillExt $type
|
||||||
|
|
||||||
prop enum watching=0,filling=1,inactive=2
|
prop enum watching=0,filling=1,inactive=2,manualfill=3
|
||||||
prop label "filling state"
|
prop label "filling state"
|
||||||
|
|
||||||
if {$type eq "n2"} {
|
if {$type eq "n2"} {
|
||||||
@ -72,6 +72,7 @@ proc ccu4ext::changestate {type state} {
|
|||||||
cc $auto 1
|
cc $auto 1
|
||||||
}
|
}
|
||||||
fill {
|
fill {
|
||||||
|
clientlog FILL$type
|
||||||
cc $cmd 1
|
cc $cmd 1
|
||||||
cc $auto 1
|
cc $auto 1
|
||||||
}
|
}
|
||||||
@ -144,7 +145,6 @@ proc ccu4ext::fillExt {type} {
|
|||||||
set valve [sctval /cc/hv]
|
set valve [sctval /cc/hv]
|
||||||
set auto [sctval /cc/ha]
|
set auto [sctval /cc/ha]
|
||||||
}
|
}
|
||||||
set enumtxt "watching,fill,inactive"
|
|
||||||
set errtxt ""
|
set errtxt ""
|
||||||
set sm [expr [DoubleTime] > [silent 0 sct change_time] + 10]
|
set sm [expr [DoubleTime] > [silent 0 sct change_time] + 10]
|
||||||
switch -- $valve {
|
switch -- $valve {
|
||||||
@ -165,7 +165,6 @@ proc ccu4ext::fillExt {type} {
|
|||||||
2 {
|
2 {
|
||||||
set txt "no fill valve"
|
set txt "no fill valve"
|
||||||
if {$sm} {setmode $type 2}
|
if {$sm} {setmode $type 2}
|
||||||
set enumtxt "$txt=2"
|
|
||||||
}
|
}
|
||||||
3 {
|
3 {
|
||||||
set errtxt timeout
|
set errtxt timeout
|
||||||
@ -177,7 +176,6 @@ proc ccu4ext::fillExt {type} {
|
|||||||
set errtxt "unknown error"
|
set errtxt "unknown error"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sct enum ${enumtxt}
|
|
||||||
if {$errtxt eq ""} {
|
if {$errtxt eq ""} {
|
||||||
updateval [sct]/state $txt
|
updateval [sct]/state $txt
|
||||||
hupdate [sct]/status ""
|
hupdate [sct]/status ""
|
||||||
@ -185,7 +183,10 @@ proc ccu4ext::fillExt {type} {
|
|||||||
hupdate [sct]/status $errtxt
|
hupdate [sct]/status $errtxt
|
||||||
updateval [sct]/state $errtxt
|
updateval [sct]/state $errtxt
|
||||||
}
|
}
|
||||||
|
if {[sctval [sct]] == 3} { # manualfill
|
||||||
|
changestate $type fill
|
||||||
|
return idle
|
||||||
|
}
|
||||||
set level [silent invalid result [hvali [sct]/readlevel]]
|
set level [silent invalid result [hvali [sct]/readlevel]]
|
||||||
if {! [string is double $level]} {
|
if {! [string is double $level]} {
|
||||||
hsetprop [sct]/readlevel geterror "illegal $type level reading"
|
hsetprop [sct]/readlevel geterror "illegal $type level reading"
|
||||||
@ -375,6 +376,10 @@ proc ccu4ext::writeExt {type {activate 1}} {
|
|||||||
}
|
}
|
||||||
return idle
|
return idle
|
||||||
}
|
}
|
||||||
|
# manualfill
|
||||||
|
3 {
|
||||||
|
changestate $type fill
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return idle
|
return idle
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user