Home AMX User Forum AMX General Discussion

Page flip

flcusatflcusat Junior MemberPosts: 309
I'm just wondering which would be the best approach for page flipping in code, in the following scenario. There is a MVP8400, that will control not only the system for the Master Bedroom, but also the multiroom audio for the Master Bathroom and the 2nd Floor Terrace. At the same time, there is a RTI remote, just for the Master Bedroom set up. If I control the flipping of pages in code, I can made the TP to follow the BP from the RTI remote, but if the MVP is being used for the multiroom audio, at the same time than the remote is controlling the Master Bedroom setup, it is going to be annoying. What is the best way to address this. Creating a flag that when activated won't send the flip page command to the MVP?

Comments

  • TonyAngeloTonyAngelo Code Monkey Posts: 315
    Simply add a flag variable and when you're on a page other then the master bedroom set the flag to on, if the flag is on, don't do the flip. If the flag is off, meaning your on the master bedroom page, then follow the RTI.

    You could do the same thing if the page flips were in the panel, by turning page tracking on and setting the flag based on current page feedback, but I like doing it in code better.
  • SensivaSensiva Junior Member Posts: 211
    Yes!!
    flcusat wrote: »
    Creating a flag that when activated won't send the flip page command to the MVP?

    Definitely YES!!. In most of our multiroom systems, I design only one page for TV and another for DVD, and another for music...etc.

    And through the room selection buttons in the main page, it assign a value to a flag of which room are you in now, so you can use only one MVP , and controlling any other zone through keypads or remotes or any other input device won't interfer the MVP display (if it is in different zone)

    One of the most important and significant features of any automation system (AMX or any) is Decision Making on behalf of the user, since you pushed living room, and pushed volume up, then you don't have to think which zone to raise its volume, the controller will do it for you.

    this method has pros and cons, you won't have to design many pages in TP4, Single MVP is enough for about 4 or 6 rooms(your quotation won't stun the client), but on the other side, you should get ready for alot of SWITCH CASE and SELECT ACTIVE statements in each button event in through the whole mainline, so, if you didn't do it wisely and in a smart way, you may get the system a little bit of slow response.

    I hope I am not complicating things... did I?? :o
  • flcusatflcusat Junior Member Posts: 309
    Thanks Tony.
  • flcusatflcusat Junior Member Posts: 309
    Sensiva wrote: »

    I hope I am not complicating things... did I?? :o

    No at all. Thanks for your reply.
  • TonyAngeloTonyAngelo Code Monkey Posts: 315
    Sensiva wrote: »
    this method has pros and cons, you won't have to design many pages in TP4, Single MVP is enough for about 4 or 6 rooms(your quotation won't stun the client), but on the other side, you should get ready for alot of SWITCH CASE and SELECT ACTIVE statements in each button event in through the whole mainline, so, if you didn't do it wisely and in a smart way, you may get the system a little bit of slow response.

    Or, (this is just one way of simplifying) you put all the buttons in an array, then you have one button event. From there you send the button pushed to whatever function is relevant, fnVideoSwitch() or fnPageFlip(). then you contain all the logic in the function and greatly reduce the number of switch,case/select/active statements.
  • truetrue Junior Member Posts: 307
    I tend to seperate the subsystems out via pages, and sources and transports on a page by popups. This way, I can send popup commands to the panel for specific pages, so if the page is flipped, the correct item is already being shown. If the A/V page isn't being shown, then you simply don't see any changes until you flip to that page.

    My panels usually flow as subsystems to rooms/zones instead of rooms/zones to subsystems, though.
  • SensivaSensiva Junior Member Posts: 211
    TonyAngelo wrote: »
    then you contain all the logic in the function and greatly reduce the number of switch,case/select/active statements.

    I know what you mean, but this will reduce how many lines in code, not how many instructions are executed by the controller...
Sign In or Register to comment.