send feedback events to all touchpanels
slip cougan
Posts: 34
I'm using this pseudo code to generate the push and feedback events to a few panels. Some of the feedback is specific to the panel that generated the push but I have some push feedback events that I want to send to all panels. I know this should be real simple but it's just not working for me. What am I missing.
Many thanks
slip
DEFINE_DEVICE
// Touchpanels
TP1 = 10001:1:0
TP2 = 10002:1:0
DEFINE_VARIABLE
DEV devPanels[] = {TP1, TP2}
DEFINE_FUNCTION fnProcessBtn(INTEGER menuButton)
{ // pseudo code to determin feedback type
if(1st condition met) // do feedback to local panel only
{
on[devPanels[panelIndex], menuButton]
}
if(2nd condition met) // do feedback to all panels
{
on[devPanels[0], menuButton] // << I have tried devPanels[0] & devPanels[] here to no avail
}
}
BUTTON_EVENT[devPanels,0]
{
PUSH:
{
panelIndex = GET_LAST(devPanels)
panelDeviceNumber = BUTTON.INPUT.DEVICE.NUMBER // for other housekeeping
pushIndex = BUTTON.INPUT.CHANNEL
fnProcessBtn(pushIndex)
}
}
Many thanks
slip
DEFINE_DEVICE
// Touchpanels
TP1 = 10001:1:0
TP2 = 10002:1:0
DEFINE_VARIABLE
DEV devPanels[] = {TP1, TP2}
DEFINE_FUNCTION fnProcessBtn(INTEGER menuButton)
{ // pseudo code to determin feedback type
if(1st condition met) // do feedback to local panel only
{
on[devPanels[panelIndex], menuButton]
}
if(2nd condition met) // do feedback to all panels
{
on[devPanels[0], menuButton] // << I have tried devPanels[0] & devPanels[] here to no avail
}
}
BUTTON_EVENT[devPanels,0]
{
PUSH:
{
panelIndex = GET_LAST(devPanels)
panelDeviceNumber = BUTTON.INPUT.DEVICE.NUMBER // for other housekeeping
pushIndex = BUTTON.INPUT.CHANNEL
fnProcessBtn(pushIndex)
}
}
0
Comments
so simply:
on[devPanels, menuButton] ??
Didn't try that one