Home AMX User Forum AMX Technical Discussion
Options

Touchpanel not in use

Hi, just forgot how to monitor a button press in the touchpanel. I need to be able to know when someone has touched the panel.
Sorry for the dumb question?

Thanks in advance

Comments

  • Options
    Are you talking about just using a button_event, or are you trying to determine if any button is pressed?

    If it's the latter then it just:
    DEFINE_DEVICE
    dvTP  =  10001:1:0
    
    
    DEFINE_EVENT
    BUTTON_EVENT[dvTP,0] 		//Any button push on TP port 1
    


    --John
  • Options
    Touchpanel not in use

    What I want to do is use the panel like a slideshow. I need to create conditions that if no buddy touches the panel for sort amount of time, start flipping pages to use the panel like a slideshow. If someone touches it, will stop and return to the main page or the previous page.
    One of our special request of our special kind of client.

    Thanks,
  • Options
    glr-ftiglr-fti Posts: 286
    How about a Timeline? Every time the button is pushed you first kill the timeline that was running, if any, then start it over. If you set up the timeline correctly as to when you want the slideshow to start I think that will take care of it for you.
  • Options
    jjamesjjames Posts: 2,908
    I put the wired panels to sleep only if it's not in full video mode, so here's what I do - perhaps you can draw some conclusions on how to do it:
    BUTTON_EVENT[dv_TP,0]							// Button press monitoring
    {
    	RELEASE:
    	{
    		STACK_VAR INTEGER nIND;
    		nIND = GET_LAST(dv_TP)
    		
    		SWITCH(nIND)
    		{
    			CASE 1:
    			{
    				CANCEL_WAIT 'KIT SLEEP'
    				WAIT 3000 'KIT SLEEP'
                                            IF(nFULL_VIDEO[1] == FALSE)
    						SEND_COMMAND dvTP_KIT,"'SLEEP'";
    			}
    		}
    	}
    }
    
  • Options
    DHawthorneDHawthorne Posts: 4,584
    You can set a touch panel to go to a specific inactivity page; make that your slideshow page. If it has dynamic images, they shouldn't be pulling the server unless the page is displayed. Overlay the whole page with a transparent button that will return it to the previous page when pressed, and make sure the sleep timer is off.
  • Options
    Connected question

    Is there any way in getting some acknowledgement when the panel is touched wherever? (not necessarily on a button, but, obviously, on the touch sensitive area...)
    Let's say, for closing a popup whenever an area outside the actual window is tapped. Something similar to what happens in Windows if one right-clicks and then clicks anywhere else but on the popup menu itself.
  • Options
    ericmedleyericmedley Posts: 4,177
    Is there any way in getting some acknowledgement when the panel is touched wherever? (not necessarily on a button, but, obviously, on the touch sensitive area...)
    Let's say, for closing a popup whenever an area outside the actual window is tapped. Something similar to what happens in Windows if one right-clicks and then clicks anywhere else but on the popup menu itself.


    Some of the panels have motion sensors that could at least let you know when someone is moving nearby. That sensor can be set to a specific channel and port. So you could have something in the program to automatically watch that and, after some time, switch on the slide show.

    Panels can also let you know when they wake from sleep.

    Another thing you can do also is have a universal button event that resets a timer and after a while of no button pushes, have it go to the slide show.

    That's done by:
    BUTTON_EVENT[dvTP_1,0] // any button is pushed.
    {
    push:
      {
      // kill a timeline if active
      // start timeline for slide show after some time period.
      }
    }
    
    ... just some ideas.
  • Options
    JeffJeff Posts: 374
    Is there any way in getting some acknowledgement when the panel is touched wherever? (not necessarily on a button, but, obviously, on the touch sensitive area...)
    Let's say, for closing a popup whenever an area outside the actual window is tapped. Something similar to what happens in Windows if one right-clicks and then clicks anywhere else but on the popup menu itself.

    Not that I'm aware of. You'd basically have to make a big button everywhere else. What I generally do in this situation is make the popup modal so they can't click outside of it.

    J
  • Options
    Jeff wrote: »
    Not that I'm aware of.

    I thought so... This is also what I am doing, but seems to be a redundant work since the panel knows when it's touched, just doesn't share it with the control processor. For WAKE and BEEPS for instance....
Sign In or Register to comment.