diff --git a/tcl/mb11.config b/tcl/mb11.config index 2539336..60b688b 100644 --- a/tcl/mb11.config +++ b/tcl/mb11.config @@ -7,8 +7,11 @@ device stick_menu mb11 dil5 set ins [result instrument] if {[string match "prep*" $ins]} { set nr [string range $ins end end] + exec frappy start $ins main mb11 makenv frappy_main -driver secop -port localhost:1511$nr + # makenv frappy_stick -driver secop -port localhost:1521$nr makeHePump + dolater 0 device makeitem name_label SECoP/mb11 } elseif {[lindex [split [info hostname] .] 0] ne $ins} { error "runs on instruments or prep0-9 only" } else { diff --git a/tcl/mb11.stick b/tcl/mb11.stick index 0ea1b0e..c5923fa 100644 --- a/tcl/mb11.stick +++ b/tcl/mb11.stick @@ -5,7 +5,9 @@ set ::secop_version 4 set ins [result instrument] if {[string match "prep*" $ins]} { set nr [string range $ins end end] + exec frappy start $ins stick mb11stick makenv frappy_stick -driver secop -port localhost:1521$nr + dolater 0 device makeitem stick_label SECoP/mb11 } elseif {[lindex [split [info hostname] .] 0] ne $ins} { error "runs on instruments or prep0-9 only" } else { diff --git a/tcl/seacom.tcl b/tcl/seacom.tcl index eabfc91..1a104a9 100644 --- a/tcl/seacom.tcl +++ b/tcl/seacom.tcl @@ -1101,8 +1101,15 @@ proc samenv args { if {[silent "" result device stick_menu] eq ""} { device stick_menu $name } - } elseif {[silent "" result device stick_menu] ne ""} { - set selected_stick "none" + } else { + lassign [silent "" result device stick_menu] first + if {$first eq $name} { + if {[file exists $name.stick]} { + set selected_stick $name + } + } elseif {$first ne ""} { + set selected_stick none + } } } # if {$selected_stick ne ""} { diff --git a/tcl/startup/frappy.tcl b/tcl/startup/frappy.tcl index 62e9782..b9c54bc 100644 --- a/tcl/startup/frappy.tcl +++ b/tcl/startup/frappy.tcl @@ -254,10 +254,10 @@ proc check_config {service args} { } proc activate_stick {} { - set name [hval /device/stick_label] + set prev [hval /device/stick_label] frappy_config stick secop.stick # stick_label was changed - set it again - device stick_label $name + device stick_label $prev } proc activate_addon {} { @@ -272,7 +272,7 @@ proc sea_recorder {main stick addons} { samenv none cfg_env makeitem _secop $uri frappy_config stick secop.config - device name_label $name + device name_label "SECoP/$name" set defer _secop } if {$stick ne "0"} { @@ -280,7 +280,7 @@ proc sea_recorder {main stick addons} { if {$name eq ""} { set name $uri } addon stick none cfg_env makeitem _secopstick $uri - device stick_label $name + device stick_label "SECoP/$name" if {$defer eq "0"} { set defer _secopstick frappy_config stick secop.stick