add flow ctrl hysteresis
with automatic nv, do not open nv before value is above 0.5 * (flowmax + flowstd)
This commit is contained in:
@ -30,7 +30,17 @@ proc flow::loop {difget flowget flowset path flowstd flowlim} {
|
|||||||
set flowtarget $setval
|
set flowtarget $setval
|
||||||
}
|
}
|
||||||
putIntoLimits flowtarget $flowstd $flowlim
|
putIntoLimits flowtarget $flowstd $flowlim
|
||||||
hupdate $path/flowtarget $flowtarget
|
set suppress_auto [silent 0 sct suppress_auto]
|
||||||
|
if {$suppress_auto || $flowtarget > ($flowstd + $flowlim) * 0.5} {
|
||||||
|
sct suppress_auto 0
|
||||||
|
hupdate $path/flowtarget $flowtarget
|
||||||
|
} else {
|
||||||
|
if {$flowtarget < $flowstd + 0.1} {
|
||||||
|
sct suppress_auto 1
|
||||||
|
} else {
|
||||||
|
hupdate $path/flowtarget $flowtarget
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc flow::bufferPut {path name var value} {
|
proc flow::bufferPut {path name var value} {
|
||||||
|
Reference in New Issue
Block a user