Home AMX User Forum AMX Control Products

TP Send_Command for inactivity page

Has any one seen a send_command that would allow me to change the inactivity page flip page. I would like to change this based on the currently displayed page via page tracking or by other means. I currently flip to Picture Frame full screen after the inactvity timer times out but would like to change to a smaller Picture Frame window for certain pages (sort of a widow to the outside world). I've looked in Software history but didn't see anything that would work.

If there is such a command is there also one that would allow me to change the time out time as well.

I suppose I could figure this out and write code but if the inactivity page flip function is already in the system I'd prefer to use it.

Any help would be appreciated!

Comments

  • rehakrdrehakrd Posts: 5
    Setup Port Button Control

    Thought I'd bump this as it's as close to what I'm looking for as I could find.

    From other posts, I hear that you can't use DO_PUSH with buttons that are on the TP setup pages. I know I can make those buttons available by copying to user accessible pages, but....

    I'm trying to set the inactivity page timeout value (in code) so that if the client is watching TV on a CV15, they don't have the inactivity page come up.

    I hear there are some TP functions that you can call such as Reboot(), but I haven't been able to find any info or documentation about what I'm specifically looking for.

    Any insight would be greatly appreciated.

    Rich
  • John NagyJohn Nagy Posts: 1,742
    In the alternative, you could send a WAKE or just about anything invisible periodically to the panel when in the mode you want, to keep it awake within the time parameters you set for when it isn't in that mode.
  • rehakrdrehakrd Posts: 5
    Hmm, well the WAKE command works great for when the panel is in sleep mode, however what I have is an inactivity page showing the current time.

    There's a transparent button covering the entire inactivity page that flips to a default home page plus a couple popups when pressed.

    What I originally wanted to do was set the inactivity time to 0 when the client was watching TV on the touchpanel.

    Unfortunately there's no support on this touchpanel (CV15) for ^DTO and ?DTO commands.

    So I tried setting up a timeline that would run during the TV watching period that would do a DO_PUSH every second on the transparent button on the inactivity page effectively hiding the page as soon as it came up.

    The timeline ran fine and ran the DO_PUSH command as it was supposed to, but the page flips associated with the button press never took place. Tried emulating the button press with no luck as well.

    Not sure where I'm going wrong here, as it seems like this should be a pretty simple endeavor.

    ** update: just realized that allowing the inactivity page to even come up would take the client away from the TV page, gotta rethink this a bit - Rich
  • ericmedleyericmedley Posts: 4,177
    rehakrd wrote: »
    Hmm, well the WAKE command works great for when the panel is in sleep mode, however what I have is an inactivity page showing the current time.

    There's a transparent button covering the entire inactivity page that flips to a default home page plus a couple popups when pressed.

    What I originally wanted to do was set the inactivity time to 0 when the client was watching TV on the touchpanel.

    Unfortunately there's no support on this touchpanel (CV15) for ^DTO and ?DTO commands.

    So I tried setting up a timeline that would run during the TV watching period that would do a DO_PUSH every second on the transparent button on the inactivity page effectively hiding the page as soon as it came up.

    The timeline ran fine and ran the DO_PUSH command as it was supposed to, but the page flips associated with the button press never took place. Tried emulating the button press with no luck as well.

    Not sure where I'm going wrong here, as it seems like this should be a pretty simple endeavor.

    if you're using the panel's functions to make the page flips, etc... The Do_push command doesn't work. It only happens in code.

    If you do all your actions in code, you're going to have the control you need. Don't use any of the panel's built-in functions.
  • viningvining Posts: 4,368
    rehakrd wrote: »
    Hmm, well the WAKE command works great for when the panel is in sleep mode, however what I have is an inactivity page showing the current time.

    There's a transparent button covering the entire inactivity page that flips to a default home page plus a couple popups when pressed.

    What I originally wanted to do was set the inactivity time to 0 when the client was watching TV on the touchpanel.

    Unfortunately there's no support on this touchpanel (CV15) for ^DTO and ?DTO commands.

    So I tried setting up a timeline that would run during the TV watching period that would do a DO_PUSH every second on the transparent button on the inactivity page effectively hiding the page as soon as it came up.

    The timeline ran fine and ran the DO_PUSH command as it was supposed to, but the page flips associated with the button press never took place. Tried emulating the button press with no luck as well.

    Not sure where I'm going wrong here, as it seems like this should be a pretty simple endeavor.

    ** update: just realized that allowing the inactivity page to even come up would take the client away from the TV page, gotta rethink this a bit - Rich
    Get rid of the inactivity page set up in the TP and do it strictly in code. For every TP that you want to elimnate this problem create an array of all the TP ports like this:
    DEFINE_DEVICE
    
    dvTP_1_Port_1        = 10001:1:0 ;
    dvTP_1_Port_2        = 10001:2:0 ;
    dvTP_1_Port_3        = 10001:3:0 ;
    dvTP_1_Port_4        = 10001:4:0 ;
    dvTP_1_Port_5        = 10001:5:0 ;
    dvTP_1_Port_6        = 10001:6:0 ;
    
    VOLATILE DEV dvUI_1_AllPorts[] = 
    
         {
         dvTP_1_Port_1,
         dvTP_1_Port_2,
         dvTP_1_Port_3,
         dvTP_1_Port_4,
         dvTP_1_Port_5,
         dvTP_1_Port_6
         }
         
    DEFINE_EVENT
    
    DEFINE_EVENT    //BUTTON_EVENT [dvUI_1_AllPorts,0] 
    
    BUTTON_EVENT [dvUI_1_AllPorts,0] 
         
         {
         PUSH:
    	  {
    	  STACK_VAR INTEGER nTP_Indx ;
    	  //you don't even care what button it is
    	  
    	  nTP_Indx = GET_LAST(dvUI_1_AllPorts) ;
    	  
    	  CANCEL_WAIT 'INACTIVITY_TIMEOUT';
    	  
    	  SWITCH(nTP_Indx)
    	       {
    	       CASE 1://TP dev port with normal inactivity flip
    	       CASE 2:
    	       CASE 3:
    	       CASE 4:
    		    {
    		    WAIT COMMON_INACTIVITY_TIMEOUT 'INACTIVITY_TIMEOUT'
    			 {
    			 //do filp
    			 }
    		    }
    	       CASE 5:://TP dev port with longer inactivity flip
    		    {
    		    WAIT LONG_INACTIVITY_TIMEOUT 'INACTIVITY_TIMEOUT'
    			 {
    			 //do filp
    			 }
    		    }
    	       CASE 5:://TP dev port with no inactivity flip
    		    {
    		    //NO TIMEOUT
    		    //no flip
    		    }
    	       }
    	  }
         }
    
    You need to do something similar for each TP's ports for TP used in areas where this matters. Depending on the port last pushed you can set the inactivity page flip wait time to what ever you want or not fluip at all if that's what you want. You can all use a timeline insted of a wait and just kill/create or reload (?).

    You can still have your normal button events that handle your normal TP pushes and this would just be for this sort of tracking.
  • AuserAuser Posts: 506
    vining wrote: »
    Get rid of the inactivity page set up in the TP and do it strictly in code.

    [...]

    You need to do something similar for each TP's ports for TP used in areas where this matters. Depending on the port last pushed you can set the inactivity page flip wait time to what ever you want or not fluip at all if that's what you want. You can all use a timeline insted of a wait and just kill/create or reload (?).

    That's basically how I'd do it too.
  • rehakrdrehakrd Posts: 5
    vining wrote: »
    Get rid of the inactivity page set up in the TP and do it strictly in code. For every TP that you want to elimnate this problem create an array of all the TP ports like this:

    Thanks to everyone for the replies and Vining, thanks for that example!

    Hate it when you get in a rut and spend way too much time trying to do something in what you think should be the easiest way.

    Ended up using IF..ELSE with Button.Input.Device.Port conditions rather than the Switch...Case

    Have yet to implement the code, but it seems like it should work.
  • viningvining Posts: 4,368
    No, I don't use it but if I wanted to do this, this is how I would. At least yesterday when I wrote this that's how I would do it, tomorrow may be another story. There's no reason why it wouldn't work and as Auser posted this is sort of how he does it.

    BTW, my code implied flips but you can just sleep if you want. You could also nest additional code in the sleep waits so that after x amount of time you send sleep and then after the additonal amount of time you can then flip.

    Figure if nobody pushes for 10 minutes sleep but if it's sleeping for a day then go back to the main page so when the client returns they don't have to back out from where they were the day before or earlier. Of course it all depends on the job.
Sign In or Register to comment.