Merged 2.4 branch
r2828 | ffr | 2009-11-25 09:56:49 +1100 (Wed, 25 Nov 2009) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
c58ee9fbcb
commit
2ec6505ef8
@@ -376,6 +376,7 @@ namespace eval scan {
|
||||
variable reset_position
|
||||
variable force_scan
|
||||
|
||||
if [ catch {
|
||||
set force_scan false
|
||||
|
||||
set hm_ft_names [array names ::nexus::histmem_filetype_spec]
|
||||
@@ -386,13 +387,13 @@ namespace eval scan {
|
||||
set savetype "save"
|
||||
set reset_position [SplitReply [::scan::runscan_reset_position]]
|
||||
if {[is_drivable $scanvar] == 0} {
|
||||
return -code error "The scan variable <$scanvar> must be drivable"
|
||||
error "The scan variable <$scanvar> must be drivable"
|
||||
}
|
||||
if {[string is integer $numpoints] != 1} {
|
||||
return -code error "Number of points <$numpoints> must be an integer"
|
||||
error "Number of points <$numpoints> must be an integer"
|
||||
}
|
||||
if { $numpoints < 1 } {
|
||||
return -code error "Number of points <$numpoints> must not be less than one"
|
||||
error "Number of points <$numpoints> must not be less than one"
|
||||
}
|
||||
::histogram_memory::count_method $mode
|
||||
::histogram_memory::count_size $preset
|
||||
@@ -417,11 +418,7 @@ namespace eval scan {
|
||||
}
|
||||
}
|
||||
"datatype" {
|
||||
if {[lsearch $hm_ft_names $val] == -1} {
|
||||
error "ERROR: datatype should be one of $hm_ft_names"
|
||||
} else {
|
||||
set ic_hmm_datatype $val
|
||||
}
|
||||
set ic_hmm_datatype $val
|
||||
}
|
||||
"savetype" {
|
||||
switch $val {
|
||||
@@ -432,7 +429,7 @@ namespace eval scan {
|
||||
set save_filetype scratch
|
||||
}
|
||||
default {
|
||||
return -code error "ERROR: $arg $val, valid values for $arg are 'save' or 'nosave'"
|
||||
error "ERROR: $arg $val, valid values for $arg are 'save' or 'nosave'"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -452,14 +449,14 @@ namespace eval scan {
|
||||
::scan::runscan_cmd -set feedback scan_step $step
|
||||
::scan::runscan_cmd -set mode $mode
|
||||
::scan::runscan_cmd -set preset $preset
|
||||
set status [catch {hmscan run $numpoints timer 0} msg]
|
||||
hmscan run $numpoints timer 0
|
||||
} message ] {
|
||||
set force_scan false
|
||||
|
||||
if {$status == 0} {
|
||||
return $msg
|
||||
} else {
|
||||
return -code error "ERROR [info level 0]\n$msg"
|
||||
}
|
||||
return -code error "ERROR [info level 0]\n$message"
|
||||
} else {
|
||||
set force_scan false
|
||||
return $message
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace import ::scan::runscan
|
||||
|
||||
Reference in New Issue
Block a user