Remove superfluous trailing white space from TCL files
This commit is contained in:
@@ -44,7 +44,7 @@ namespace eval ::scobj::velocity_selector {
|
||||
|
||||
proc AngleSpeedToWavelength {angle VsVarSpeed {velsel 0}} {
|
||||
variable nvs40Par
|
||||
variable nvs43Par
|
||||
variable nvs43Par
|
||||
variable velsel_ID
|
||||
|
||||
if {$velsel == 40} {
|
||||
@@ -78,7 +78,7 @@ namespace eval ::scobj::velocity_selector {
|
||||
set lambda0 [expr ($m_dTwistAngle*60.0*$VNeutron)/(360.0*$m_dLength*$m_iMaxSpeed)]
|
||||
set pi [expr acos(-1)]
|
||||
# set pi = 3.14159265358979;
|
||||
|
||||
|
||||
set A [expr (2.0 * $rBeamCenter * $pi) / (60.0 * $VNeutron)]
|
||||
set angle_rad [expr ($angle * $pi) / 180.0]
|
||||
set lambda1 [expr ( tan($angle_rad)+($A * $m_iMaxSpeed * $lambda0) ) / ((-($A*$A) * $m_iMaxSpeed * $VsVarSpeed * $lambda0 * tan($angle_rad) )+($A * $VsVarSpeed))]
|
||||
@@ -88,7 +88,7 @@ namespace eval ::scobj::velocity_selector {
|
||||
|
||||
proc WavelengthToSpeed {angle lambda1 {velsel 0}} {
|
||||
variable nvs40Par
|
||||
variable nvs43Par
|
||||
variable nvs43Par
|
||||
variable velsel_ID
|
||||
|
||||
if {$velsel == 40} {
|
||||
@@ -122,7 +122,7 @@ namespace eval ::scobj::velocity_selector {
|
||||
set lambda0 [expr ($m_dTwistAngle*60.0*$VNeutron)/(360.0*$m_dLength*$m_iMaxSpeed)]
|
||||
set pi [expr acos(-1)]
|
||||
# set pi = 3.14159265358979;
|
||||
|
||||
|
||||
set A [expr (2.0 * $rBeamCenter * $pi) / (60.0 * $VNeutron)]
|
||||
set angle_rad [expr ($angle * $pi) / 180.0]
|
||||
set VsVarSpeed [expr ( tan($angle_rad)+($A * $m_iMaxSpeed * $lambda0) ) / ((-($A*$A) * $m_iMaxSpeed * $lambda1 * $lambda0 * tan($angle_rad) )+($A * $lambda1))]
|
||||
@@ -281,7 +281,7 @@ proc rdPwdAck {} {
|
||||
|
||||
proc setSpeed {vs_root statuspath nextState} {
|
||||
variable paramindex
|
||||
set speed [format "%5d" [sct target]]
|
||||
set speed [format "%5d" [sct target]]
|
||||
|
||||
sct send "N#SOS#SPEED $speed"
|
||||
set angle [lindex [hval $statuspath] $paramindex(ttang) end]
|
||||
@@ -300,7 +300,7 @@ proc rdPwdAck {} {
|
||||
}
|
||||
|
||||
proc sendCommand {nextState} {
|
||||
set state [string tolower [sct target]]
|
||||
set state [string tolower [sct target]]
|
||||
switch $state {
|
||||
"idle" {
|
||||
sct send "N#SOS#IDLE "
|
||||
@@ -392,12 +392,12 @@ proc get_nearest_allowed_speed {speed} {
|
||||
|
||||
##
|
||||
# @brief This will check if the requested speed is allowed
|
||||
proc checkBlockedSpeeds {statuspath} {
|
||||
proc checkBlockedSpeeds {statuspath} {
|
||||
variable paramindex
|
||||
|
||||
set speed [sct target]
|
||||
set ttang [lindex [hval $statuspath] $paramindex(ttang) end]
|
||||
if {$ttang > 90} {
|
||||
if {$ttang > 90} {
|
||||
error "ERROR: You must first initialise the turntable"
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ proc checkBlockedWavelengths {statuspath} {
|
||||
|
||||
set lambda [sct target]
|
||||
set ttang [lindex [hval $statuspath] $paramindex(ttang) end]
|
||||
if {$ttang > 90} {
|
||||
if {$ttang > 90} {
|
||||
error "ERROR: You must first initialise the turntable"
|
||||
}
|
||||
set angle [lindex [hval $statuspath] $paramindex(ttang) end]
|
||||
@@ -457,7 +457,7 @@ proc halt {root} {
|
||||
|
||||
set angle [lindex [hval $statuspath] $paramindex(ttang) end]
|
||||
set speed [WavelengthToSpeed $angle $lambda]
|
||||
set fmtspeed [format "%5d" $speed]
|
||||
set fmtspeed [format "%5d" $speed]
|
||||
sct send "N#SOS#SPEED $fmtspeed"
|
||||
sct target $lambda
|
||||
hsetprop $vs_root/setspeed target $fmtspeed
|
||||
@@ -497,7 +497,7 @@ proc halt {root} {
|
||||
hsetprop $velselPath/status values busy,idle
|
||||
hfactory $velselPath/device_error plain spy text
|
||||
hset $velselPath/device_error ""
|
||||
|
||||
|
||||
# Must be set by user
|
||||
hfactory $velselPath/wavelength plain user float
|
||||
hsetprop $velselPath/wavelength permlink data_set
|
||||
@@ -512,7 +512,7 @@ proc halt {root} {
|
||||
hfactory $velselPath/geometry/position/VelSelPosZ plain user float
|
||||
hsetprop $velselPath/geometry/position/VelSelPosZ units "mm"
|
||||
hfactory $velselPath/geometry/position/VelSelCoordScheme plain user text
|
||||
|
||||
|
||||
# Setup nodes for state report parameters
|
||||
foreach par [lsort [array names paramindex]] {
|
||||
hfactory $velselPath/$par plain spy $paramtype($par)
|
||||
@@ -635,7 +635,7 @@ proc halt {root} {
|
||||
hset $velselPath/geometry/position/VelSelPosY 0.0
|
||||
hset $velselPath/geometry/position/VelSelPosZ 0.0
|
||||
hset $velselPath/geometry/position/VelSelCoordScheme "Cartesian"
|
||||
|
||||
|
||||
|
||||
|
||||
proc sct_velsel_init {velselPath } {
|
||||
@@ -658,7 +658,7 @@ proc halt {root} {
|
||||
makesctcontroller sct_velsel astvelsel $velsel_IP:$velsel_port "" 10
|
||||
sct_velsel poll $statusPath $pollrate
|
||||
}
|
||||
namespace export AngleSpeedToWavelength
|
||||
namespace export AngleSpeedToWavelength
|
||||
namespace export WavelengthToSpeed
|
||||
}
|
||||
namespace import ::scobj::velocity_selector::AngleSpeedToWavelength
|
||||
|
||||
Reference in New Issue
Block a user