show SECoP/cfg for recorders

+ auto select stick when stick_menu inf <name>.config
  starts with <name>
This commit is contained in:
2025-06-23 12:59:10 +02:00
parent 6a191e49da
commit 35abc1c182
4 changed files with 18 additions and 6 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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 ""} {

View File

@ -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