Home AMX User Forum NetLinx Studio

PUSH BUTTON_EVENT being called twice

Hi all, I am quite stumped on this one.

I have an AMX touch panel with some buttons. When I push and release I see the following in diagnostics:
Line     36 (13:45:48):: Input Status:Pushed [10002:1:1] - Channel 1125 
Line     37 (13:45:48):: Input Status:Released [10002:1:1] - Channel 1125

I have the following handler code:
BUTTON_EVENT[tpArray,1125]
BUTTON_EVENT[tpArray,1145]
BUTTON_EVENT[tpArray,1165]
BUTTON_EVENT[tpArray,1185]
{
    PUSH: {
	STACK_VAR nZone
	
	nZone = (BUTTON.INPUT.CHANNEL - 1100) /20
	send_string 0,"'Received button press on channel ',itoa(button.input.channel),' zone ',itoa(nZone)"
	// ...
    }
}

This gives me the output:
Line    393 (13:45:48)::  Received button press on channel 1125 zone 1
Line    394 (13:45:48)::  Received button press on channel 1125 zone 1

Does anybody know why the event handler is being called twice?! Thanks in advance for any ideas!

Comments

  • ijedijed Posts: 28
    what's in tpArray?
    Is the input device declared twice?

    a get_last(tpArray) in your debug string might help figure out what's going on :)
  • tomktomk Posts: 24
    ijed wrote: »
    what's in tpArray?
    Is the input device declared twice?

    It sure is. That's kind of embarrassing. Thanks! :)
Sign In or Register to comment.