Mutually Exclusive With Arrays
rolo
Posts: 51
I have a button array and a device array.
In this particular case , these buttons are for navigation between rooms.
Obviously I cannot have 2 rooms selected at once on a panel.
My statement will read something like this...
DEFINE_DEVICE
dvTP_1=128:1:1
DEFINE_CONSTANT
INTEGER nBtnArray_RoomNav[]={3001,3002} //Array For Navigation Button Numbers
DEV dvAllTP[]={dvTP_1} //Array For Touchpanels
DEFINE_EVENT
BUTTON_EVENT [dvAllTP,nBtnArray_RoomNav]
{
Push:
{
Do Whatever
}
}
How do I define the arrays' buttons as mutually exclusive?
Thanks
Rolo
In this particular case , these buttons are for navigation between rooms.
Obviously I cannot have 2 rooms selected at once on a panel.
My statement will read something like this...
DEFINE_DEVICE
dvTP_1=128:1:1
DEFINE_CONSTANT
INTEGER nBtnArray_RoomNav[]={3001,3002} //Array For Navigation Button Numbers
DEV dvAllTP[]={dvTP_1} //Array For Touchpanels
DEFINE_EVENT
BUTTON_EVENT [dvAllTP,nBtnArray_RoomNav]
{
Push:
{
Do Whatever
}
}
How do I define the arrays' buttons as mutually exclusive?
Thanks
Rolo
0
Comments
This way, if you ever need to know which room a panel is controlling, you can run conditionals / evaluations, etc. on this information.
But like James said it's nice to have a var tracking your selections because the buttons will turn off if the panel goes offline (which is actually a benefit in some situations).