use enum_ prop in seadesc to store all members
because frappy can not handle dynamic enums
This commit is contained in:
@ -46,6 +46,8 @@ proc stdConfig::dil12 args {
|
||||
prop label "control sensor "
|
||||
prop help "click off to reload list"
|
||||
prop enum "off"
|
||||
# for seadesc:
|
||||
prop enum_ off=0,mix=5,sample=6,samplehtr=8
|
||||
default off
|
||||
prop check dil12::check_control
|
||||
prop write stdSct::completeUpdate
|
||||
|
@ -60,6 +60,7 @@ proc stdConfig::jtccr {} {
|
||||
node vm wr
|
||||
prop label vm
|
||||
prop enum closed,opened
|
||||
prop enum_ closed,opened,closing,opening,no_motor,undefined
|
||||
prop write jtccr::setmotvalve
|
||||
prop read jtccr::getmotvalve
|
||||
prop initstate init
|
||||
|
@ -48,6 +48,7 @@ proc stdConfig::magfield_kids {{bipolar 0}} {
|
||||
default 1
|
||||
prop write magfield::write_pers
|
||||
prop enum off,on
|
||||
prop enum_ forever_off=-1,off=0,on=1
|
||||
prop label "persistent mode:"
|
||||
prop help "hidden mode -1: completely off"
|
||||
|
||||
|
@ -55,7 +55,10 @@ proc describe_node {base path {visibility 1}} {
|
||||
|
||||
set hp $base/$path
|
||||
lassign [split [hinfo $hp] ,] type nkids length
|
||||
set enum [silent 0 hgetpropval $hp enum]
|
||||
set enum [silent 0 hgetpropval $hp enum_]
|
||||
if {$enum eq "0"} {
|
||||
set enum [silent 0 hgetpropval $hp enum]
|
||||
}
|
||||
set extra ""
|
||||
if {$enum eq "1"} {
|
||||
set type bool
|
||||
|
@ -440,6 +440,9 @@ proc stdConfig::kids {{title 0} code} {
|
||||
proc stdConfig::prop {prop args} {
|
||||
variable node
|
||||
eval [concat hsetprop $node $prop $args]
|
||||
if {$prop eq "enum"} {
|
||||
eval [concat hsetprop $node enum_ $args]
|
||||
}
|
||||
}
|
||||
|
||||
#action scripts
|
||||
|
Reference in New Issue
Block a user