Added asynch queue to send commands to the chopper selector.
This commit is contained in:
@ -4,16 +4,22 @@ namespace eval chopper {
|
||||
set master_chopper_id_simvar 1
|
||||
}
|
||||
|
||||
if {$sim_mode == false} {
|
||||
MakeAsyncProtocol std
|
||||
MakeAsyncQueue chopsel std chopsel1-bilby 30000
|
||||
}
|
||||
::utility::macro::getset int master_chopper_id {args} {
|
||||
variable sim_mode [SplitReply [chopper_simulation]]
|
||||
|
||||
if {$sim_mode == "false"} {
|
||||
if {$sim_mode == false} {
|
||||
if {$args == ""} {
|
||||
return "master_chopper_id = [sct_chopper_t0 transact {get master chopper}]"
|
||||
chopsel send {get master chopper}
|
||||
return "master_chopper_id = [SplitReply [chopsel send {get master chopper}]]"
|
||||
} else {
|
||||
sct_chopper_t0 transact "enable chopper selection"
|
||||
sct_chopper_t0 transact "set master chopper=$args"
|
||||
sct_chopper_t0 transact "disable chopper selection"
|
||||
chopsel send "get master chopper"
|
||||
chopsel send "enable chopper selection"
|
||||
chopsel send "set master chopper=$args"
|
||||
chopsel send "disable chopper selection"
|
||||
}
|
||||
} else {
|
||||
if {$args == ""} {
|
||||
|
Reference in New Issue
Block a user