magfield.tcl: introduce timeout for ramp to fielf
This commit is contained in:
@ -247,8 +247,13 @@ proc magfield::run {} {
|
|||||||
if {[sct phase] != 0 || abs($tf - $pf) > $tol || $pm != 1} {
|
if {[sct phase] != 0 || abs($tf - $pf) > $tol || $pm != 1} {
|
||||||
# we have to go to persistent field
|
# we have to go to persistent field
|
||||||
if {![sct leads_at_field]} {
|
if {![sct leads_at_field]} {
|
||||||
|
if {[sct phase] == 2 && $now > [silent $now sct start_phase2] + 300} {
|
||||||
|
sct phase 1
|
||||||
|
clientlog "timeout ramping to persistent field -> redo"
|
||||||
|
}
|
||||||
if {[sct phase] < 2} {
|
if {[sct phase] < 2} {
|
||||||
sct phase 2 ;# ramping leads to field
|
sct phase 2 ;# ramping leads to field
|
||||||
|
sct start_phase2 $now
|
||||||
msg "ramp to persistent field $pf"
|
msg "ramp to persistent field $pf"
|
||||||
lassign [check_field $pf] ok
|
lassign [check_field $pf] ok
|
||||||
if {!$ok} {
|
if {!$ok} {
|
||||||
|
Reference in New Issue
Block a user