Eliminate the speed is to low error message when the actual speed is less than 3100 rpm, just set lamba=99999
Update message prefix for new velocity selector controller. r2872 | ffr | 2010-01-20 15:13:24 +1100 (Wed, 20 Jan 2010) | 3 lines
This commit is contained in:
committed by
Douglas Clowes
parent
4068f99180
commit
30002eb404
@@ -155,7 +155,7 @@ proc rdPwdAck {} {
|
||||
##
|
||||
# @brief Request a state report from the velocity selector
|
||||
proc getStatus {} {
|
||||
sct send "#SOS#STATE "
|
||||
sct send "N#SOS#STATE "
|
||||
return rdState
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ proc rdPwdAck {} {
|
||||
if {[string match {*#SES#You are not a valid user*} $staterep]} {
|
||||
return sendUID
|
||||
}
|
||||
if {[string match {#SOS#*} $staterep] == 0 } {
|
||||
if {[string match {N#SOS#*} $staterep] == 0 } {
|
||||
hset $root/device_error $staterep
|
||||
return idle
|
||||
}
|
||||
@@ -256,7 +256,7 @@ proc rdPwdAck {} {
|
||||
variable paramindex
|
||||
set speed [format "%5d" [sct target]]
|
||||
|
||||
sct send "#SOS#SPEED $speed"
|
||||
sct send "N#SOS#SPEED $speed"
|
||||
set angle [lindex [hval $statuspath] $paramindex(ttang) end]
|
||||
set lambda [AngleSpeedToWavelength $angle $speed]
|
||||
sct target $speed
|
||||
@@ -276,13 +276,13 @@ proc rdPwdAck {} {
|
||||
set state [string tolower [sct target]]
|
||||
switch $state {
|
||||
"idle" {
|
||||
sct send "#SOS#IDLE "
|
||||
sct send "N#SOS#IDLE "
|
||||
}
|
||||
"brake" {
|
||||
sct send "#SOS#BRAKE "
|
||||
sct send "N#SOS#BRAKE "
|
||||
}
|
||||
"init" {
|
||||
sct send "#SOS#TTINIT"
|
||||
sct send "N#SOS#TTINIT"
|
||||
}
|
||||
default {
|
||||
return idle
|
||||
@@ -297,7 +297,11 @@ proc rdPwdAck {} {
|
||||
|
||||
set angle [lindex [hval $statuspath] $paramindex(ttang) end]
|
||||
set aspeed [lindex [hval $statuspath] $paramindex(aspeed) end]
|
||||
set lambda [AngleSpeedToWavelength $angle $aspeed]
|
||||
if {$aspeed >= 3100} {
|
||||
set lambda [AngleSpeedToWavelength $angle $aspeed]
|
||||
} else {
|
||||
set lambda 99999
|
||||
}
|
||||
if {$lambda != [sct oldval]} {
|
||||
sct oldval $lambda
|
||||
sct update $lambda
|
||||
@@ -416,7 +420,7 @@ proc halt {root} {
|
||||
|
||||
proc setPar {par nextState} {
|
||||
set val [sct target]
|
||||
sct send "#SOS#$par $val"
|
||||
sct send "N#SOS#$par $val"
|
||||
return $nextState
|
||||
}
|
||||
|
||||
@@ -427,7 +431,7 @@ proc halt {root} {
|
||||
set angle [lindex [hval $statuspath] $paramindex(ttang) end]
|
||||
set speed [WavelengthToSpeed $angle $lambda]
|
||||
set fmtspeed [format "%5d" $speed]
|
||||
sct send "#SOS#SPEED $fmtspeed"
|
||||
sct send "N#SOS#SPEED $fmtspeed"
|
||||
sct target $lambda
|
||||
hsetprop $vs_root/setspeed target $speed
|
||||
hset $vs_root/status "busy"
|
||||
|
||||
Reference in New Issue
Block a user