Home AMX User Forum NetLinx Studio
Options

send feedback events to all touchpanels

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)
}
}

Comments

  • Options
    viningvining Posts: 4,368
    Get rid of [0]. just use dvPanels
  • Options
    slip couganslip cougan Posts: 34
    Thanks Vav
    so simply:
    on[devPanels, menuButton] ??

    Didn't try that one :)
Sign In or Register to comment.