DEVLEV issue
IVCBen
Posts: 3
I am trying to trigger a level event of a series of different panels using the same level number and have seen that a DEVLEV array may do the trick for me, but for some reason I cannot get the event to trigger. See below for the code:
PROGRAM_NAME='Hull Business Centre'
DEFINE_DEVICE
TP_Room_0 = 10000:1:1 // iPad Ver 2
TP_Room_1 = 10001:1:1 // iPad Ver 2
TP_Room_2 = 10002:1:1 // iPad Ver 2
DEFINE_CONSTANT
INTEGER VOLUME_AC_IN_LEVEL = 59
DEVLEV dlvTPACVol[3] =
{
{TP_Room_0, VOLUME_AC_IN_LEVEL},
{TP_Room_1, VOLUME_AC_IN_LEVEL},
{TP_Room_2, VOLUME_AC_IN_LEVEL}
}
DEFINE_EVENT
LEVEL_EVENT[dlvTPACVol] // AC mic volume level change
{
local_var integer nACZoneVolTriggered
send_string 0, 'hello'
nACZoneVolTriggered = get_last(dlvTPACVol)
}
What am I doing wrong?
PROGRAM_NAME='Hull Business Centre'
DEFINE_DEVICE
TP_Room_0 = 10000:1:1 // iPad Ver 2
TP_Room_1 = 10001:1:1 // iPad Ver 2
TP_Room_2 = 10002:1:1 // iPad Ver 2
DEFINE_CONSTANT
INTEGER VOLUME_AC_IN_LEVEL = 59
DEVLEV dlvTPACVol[3] =
{
{TP_Room_0, VOLUME_AC_IN_LEVEL},
{TP_Room_1, VOLUME_AC_IN_LEVEL},
{TP_Room_2, VOLUME_AC_IN_LEVEL}
}
DEFINE_EVENT
LEVEL_EVENT[dlvTPACVol] // AC mic volume level change
{
local_var integer nACZoneVolTriggered
send_string 0, 'hello'
nACZoneVolTriggered = get_last(dlvTPACVol)
}
What am I doing wrong?
0
Comments
My usual MO is to create an array of panels, then reference channels/levels individually. So in this instance:
Thanks for your reply, that had done the trick and at least I now know l wasn't doing anything particularly wrong with my method, it just doesn't work.
Another perculiar issue I have now come accross is that if I use the code from above, but if I combine the virtual devices with the real ones and then point the level event at the new virtual device array it does not trigger anything.
The button pushing works fine though...