whole House matrix questions
adcantrell
Posts: 24
The system i am doing right now is basically an 8x8 matrix to as many areas for viewing or listening and the way the client wanted the hand full of TPs programmed, is to pick an area and then on the next screen pick a source for the area from any TP. all the TPs would be the same and you would basically be able to do anything from any of them.
I figured an exp programmer would use some type of condtional statement to nest all the matrix/source codes and activate the different code blocks depending on the area and source selected,etc. I was thinking maybe switch/case? im not sure and keep in mind im a noob(this being my first project).
obviously the cheap way to do this would be to multiple source pages, etc but I know thats not the way to do it here. an example of code would really help me! thanks!
I figured an exp programmer would use some type of condtional statement to nest all the matrix/source codes and activate the different code blocks depending on the area and source selected,etc. I was thinking maybe switch/case? im not sure and keep in mind im a noob(this being my first project).
obviously the cheap way to do this would be to multiple source pages, etc but I know thats not the way to do it here. an example of code would really help me! thanks!
0
Comments
Create an array that has the current zone controlled for each touch panel.
So, if there are 5 TPs, the the array Current_Audio_Zone would be 5 cells wide. (one for each TP.)
The client selects the zone they wish to control which sets the array Current_Audio_Zone [this TP] to whichever output they selected.
Then when they selected a source for that zone, I'd populate a Current_Source[number of output zones] with that source.
Of course, I'm oversimplifying this for the example but this is the basis for it. I'd then create a function to handle the actual switching of the HA switcher and another hink of code to deal with all the popup page navigation and so forth.
Hope that helps.
Also, it lowers the amount of traffic sent back and forth to each panel since the data is only updated or refreshed on panels that are on the matrix or wholehouse pages, and they can call it out of the stored data.
The way I implement it in code is probably overly complex, but it works well for me, is simple for the end user to execute, and system response is very snappy. I use lots of GET_LASTs, and BUTTON.INPUT.DEVICEs, and just simple IF/THEN statements to figure out what to do.
Here's an example of the structure definitions
--John