Home AMX User Forum AMX Technical Discussion
Options

Double Button_Event

Has anyone encountered a double Button_Events (double Push) from a single button push? On the current code and TP pages I'm working on for ViewStat program scheduling I've run across a situation that when some buttons are pushed they generate two Button_Events (Push). Basically the button is pushed twice. I've checked my TP dev Array and my Define_Device numbers/name to make sure I didn't have the same thing listed twice and there wasn't. I eliminated the dev Array completely w/ just a single device in the button_event but no difference. I changed port numbers thinking maybe I had old code somewhere doing a do_push or something. I created new buttons on the TP with the same numbers with no change. I have no "Release" or "Holds", plus neither one would make it run through the push a second time.

The TP buttons are normal general type, some with channel feedback while others are momentary. Some have pass through text buttons on top but no channel numbers.

I tried pushing the button really, really, really fast and it still does it. (That's a joke)

Any ideas?

Comments

  • Options
    I have no idea, but....have you been able to isolate it to a specific physical panel, or is it any panel that you pair with that code? What if you try Diagnostics/Emulate a Device to generate the push - do you get 1 or 2? Not sure where that would lead us on this one, but it would be interesting to know the answer. The only time I've ever encountered something like this was using wireless panels. I'm talking like TX64's, but I suppose the same thing could happen with MVPs..
  • Options
    I guess you need a "minimal expression" of the problem - keep hacking code out of the application until all that's left is the code that causes the problem, then show it to us all.
  • Options
    viningvining Posts: 4,368
    The effected buttons are channel numbers 1-25 out channels 1-55 and approximately 12 VT address channels that I added to the AMX ViewStat module (old version). The module itself starts using buttons channel numbers up in the mid 100's and I confirmed this in TPD4 that it uses nothing below 100 or 150 (whatever) which is why I started my buttons at 1. I'm not sure of the reasoning this module didn't start using buttons channel numbers starting at 1 but it is what it is. I've since change the values in my button array position 1-25 (which were channels 1-25 ) to channels 41-65 and everything is now working fine. Why, I don't know! The only thing that I can't see is in the COMM module but for the life of me I can't imagine what or why anything in there would possibly have an effect on channels. It should basically just be a parsing function and command handler (translater).

    It the code I'm writing there only a a get_last and no do_pushes or functions doing do_pushes and there isn't anything of that sort in the existing portion of the module and this is the only reference to this D:P:S in the entire code for TP, DEVICE and VIRTUAL.

    When I finish getting this ViewStat scheduler working I'll take another look and see what I can find but for now using the new channel numbers its working so I must press on before I continue chasing ghosts.
Sign In or Register to comment.