From b75e0b5efb8a585d0a8dc0f5d956f6a4523dbb25 Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Thu, 26 Feb 2015 10:51:18 +1100 Subject: [PATCH] Make sure that the Lt0 command returns an error if the master_chopper_id isn't set. --- .../bilby/config/motors/motor_configuration.tcl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/site_ansto/instrument/bilby/config/motors/motor_configuration.tcl b/site_ansto/instrument/bilby/config/motors/motor_configuration.tcl index d867dd7e..cd11c265 100644 --- a/site_ansto/instrument/bilby/config/motors/motor_configuration.tcl +++ b/site_ansto/instrument/bilby/config/motors/motor_configuration.tcl @@ -521,12 +521,13 @@ sicslist setatt gs_L2_curtaind long_name L2_curtaind ## Lt0 proc Lt0 {} { - set t0_id [SplitReply [master_chopper_id]] - switch $t0_id { - "1" { set retval 0.0} - "2" { set retval 1100.0} - "3" { set retval 3300.0} - "4" { set retval 7700.0} + set master_id [SplitReply [master_chopper_id]] + switch $master_id { + 1 { set retval 0.0} + 2 { set retval 1100.0} + 3 { set retval 3300.0} + 4 { set retval 7700.0} + default {set retval "ERROR: master_id = $master_id"} } return "[lindex [info level 0] 0] = $retval" }