show SECoP/cfg for recorders
+ auto select stick when stick_menu inf <name>.config starts with <name>
This commit is contained in:
@ -7,8 +7,11 @@ device stick_menu mb11 dil5
|
|||||||
set ins [result instrument]
|
set ins [result instrument]
|
||||||
if {[string match "prep*" $ins]} {
|
if {[string match "prep*" $ins]} {
|
||||||
set nr [string range $ins end end]
|
set nr [string range $ins end end]
|
||||||
|
exec frappy start $ins main mb11
|
||||||
makenv frappy_main -driver secop -port localhost:1511$nr
|
makenv frappy_main -driver secop -port localhost:1511$nr
|
||||||
|
# makenv frappy_stick -driver secop -port localhost:1521$nr
|
||||||
makeHePump
|
makeHePump
|
||||||
|
dolater 0 device makeitem name_label SECoP/mb11
|
||||||
} elseif {[lindex [split [info hostname] .] 0] ne $ins} {
|
} elseif {[lindex [split [info hostname] .] 0] ne $ins} {
|
||||||
error "runs on instruments or prep0-9 only"
|
error "runs on instruments or prep0-9 only"
|
||||||
} else {
|
} else {
|
||||||
|
@ -5,7 +5,9 @@ set ::secop_version 4
|
|||||||
set ins [result instrument]
|
set ins [result instrument]
|
||||||
if {[string match "prep*" $ins]} {
|
if {[string match "prep*" $ins]} {
|
||||||
set nr [string range $ins end end]
|
set nr [string range $ins end end]
|
||||||
|
exec frappy start $ins stick mb11stick
|
||||||
makenv frappy_stick -driver secop -port localhost:1521$nr
|
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} {
|
} elseif {[lindex [split [info hostname] .] 0] ne $ins} {
|
||||||
error "runs on instruments or prep0-9 only"
|
error "runs on instruments or prep0-9 only"
|
||||||
} else {
|
} else {
|
||||||
|
@ -1101,8 +1101,15 @@ proc samenv args {
|
|||||||
if {[silent "" result device stick_menu] eq ""} {
|
if {[silent "" result device stick_menu] eq ""} {
|
||||||
device stick_menu $name
|
device stick_menu $name
|
||||||
}
|
}
|
||||||
} elseif {[silent "" result device stick_menu] ne ""} {
|
} else {
|
||||||
set selected_stick "none"
|
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 ""} {
|
# if {$selected_stick ne ""} {
|
||||||
|
@ -254,10 +254,10 @@ proc check_config {service args} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc activate_stick {} {
|
proc activate_stick {} {
|
||||||
set name [hval /device/stick_label]
|
set prev [hval /device/stick_label]
|
||||||
frappy_config stick secop.stick
|
frappy_config stick secop.stick
|
||||||
# stick_label was changed - set it again
|
# stick_label was changed - set it again
|
||||||
device stick_label $name
|
device stick_label $prev
|
||||||
}
|
}
|
||||||
|
|
||||||
proc activate_addon {} {
|
proc activate_addon {} {
|
||||||
@ -272,7 +272,7 @@ proc sea_recorder {main stick addons} {
|
|||||||
samenv none
|
samenv none
|
||||||
cfg_env makeitem _secop $uri
|
cfg_env makeitem _secop $uri
|
||||||
frappy_config stick secop.config
|
frappy_config stick secop.config
|
||||||
device name_label $name
|
device name_label "SECoP/$name"
|
||||||
set defer _secop
|
set defer _secop
|
||||||
}
|
}
|
||||||
if {$stick ne "0"} {
|
if {$stick ne "0"} {
|
||||||
@ -280,7 +280,7 @@ proc sea_recorder {main stick addons} {
|
|||||||
if {$name eq ""} { set name $uri }
|
if {$name eq ""} { set name $uri }
|
||||||
addon stick none
|
addon stick none
|
||||||
cfg_env makeitem _secopstick $uri
|
cfg_env makeitem _secopstick $uri
|
||||||
device stick_label $name
|
device stick_label "SECoP/$name"
|
||||||
if {$defer eq "0"} {
|
if {$defer eq "0"} {
|
||||||
set defer _secopstick
|
set defer _secopstick
|
||||||
frappy_config stick secop.stick
|
frappy_config stick secop.stick
|
||||||
|
Reference in New Issue
Block a user