Lift limit on profile size and partial implementation of drive command
r3129 | dcl | 2011-05-10 16:13:07 +1000 (Tue, 10 May 2011) | 1 line
This commit is contained in:
@@ -56,6 +56,11 @@ debug_log "rdValue [sct] [sct result]"
|
||||
|
||||
proc setTemp {tc_root nextState cmd} {
|
||||
debug_log "setTemp $tc_root $nextState $cmd [sct]=[sct target] [hget [sct]]"
|
||||
if {[sct writestatus] == "start"} {
|
||||
# Called by drive adapter
|
||||
hset $tc_root/status "busy"
|
||||
hsetprop $tc_root/setpoint driving 1
|
||||
}
|
||||
# ANSTO special temperature
|
||||
set temp [expr {10.0 * [sct target]}]
|
||||
set cmd "STT[format %04X [expr {int($temp)}]]"
|
||||
@@ -108,6 +113,7 @@ debug_log "rdTemp [sct] [sct result]"
|
||||
sct utime readtime
|
||||
debug_log "update result data=$data, oldval=[sct oldval]"
|
||||
}
|
||||
# TODO handle end of drive command
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -526,7 +532,12 @@ debug_log "setPoint $cmd $par"
|
||||
sct load_status "loading"
|
||||
sct idle_temp $dec_temp
|
||||
sct final_time $dec_time
|
||||
sct profile "[join $lines " "]"
|
||||
sct max_index [llength $lines]
|
||||
for {set line_no 0} {$line_no < [llength $lines]} {incr line_no} {
|
||||
set name profile_line_[format "%03d" $line_no]
|
||||
set profile_line [lindex $lines $line_no]
|
||||
sct $name $profile_line
|
||||
}
|
||||
sct oldval [sct target]
|
||||
sct update [sct target]
|
||||
sct utime readtime
|
||||
@@ -537,8 +548,8 @@ debug_log "setPoint $cmd $par"
|
||||
}
|
||||
sct send "RTC"
|
||||
} else {
|
||||
set my_list [split [sct profile] " "]
|
||||
set my_item [lindex $my_list $my_index]
|
||||
set name profile_line_[format "%03d" $my_index]
|
||||
set my_item "[set $name]"
|
||||
sct send "$my_item"
|
||||
}
|
||||
return $nextState
|
||||
@@ -560,10 +571,9 @@ debug_log "setPoint $cmd $par"
|
||||
# TODO Check response to LT...
|
||||
sct print "LT=>[sct result]"
|
||||
}
|
||||
set my_list [split [sct profile] " "]
|
||||
set my_index [expr {$my_index + 1}]
|
||||
sct index $my_index
|
||||
if {$my_index > [llength $my_list]} {
|
||||
if {$my_index >= [sct max_index]} {
|
||||
sct index -1
|
||||
sct load_status "loaded"
|
||||
return "idle"
|
||||
@@ -719,7 +729,9 @@ debug_log "checktol $tc_root $currtime $timecheck"
|
||||
# NOTE: The drive adapter initially sets the writestatus to "start" and will
|
||||
# only call this when writestatus!="start"
|
||||
proc drivestatus {tc_root} {
|
||||
debug_log "drivestatus $tc_root driving=[sct driving]"
|
||||
if {[sct driving]} {
|
||||
# TODO handle end of drive command
|
||||
return busy
|
||||
} else {
|
||||
sct print "drivestatus: idle"
|
||||
|
||||
Reference in New Issue
Block a user