Home AMX User Forum AMX General Discussion
Options

Zone wise merging for HVAC,Lights,Audio and Video via Structures

I inherited a project where the previous programmer used structures to divide hvac, audio, video and lights. So different rooms will have an id for a structure named Locations.

Now the client wants to merge dressing room and bathroom to a single zone but since the code is very complex and vast. I am able to merge video but audio, hvac and lights is having an issue.

Comments

  • Options
    a_riot42a_riot42 Posts: 1,624
    ajish.raju wrote: »
    I inherited a project where the previous programmer used structures to divide hvac, audio, video and lights. So different rooms will have an id for a structure named Locations.

    Now the client wants to merge dressing room and bathroom to a single zone but since the code is very complex and vast. I am able to merge video but audio, hvac and lights is having an issue.

    I can't really make heads or tails of it myself. Its not often I see code like this:
    	    WAIT 5  MOVE_MOTOR(20,2,1)
    	    WAIT 10 MOVE_MOTOR(20,3,1)
    	    WAIT 15 MOVE_MOTOR(20,4,1)
    	    WAIT 20 MOVE_MOTOR(20,5,1)
    	    WAIT 25 MOVE_MOTOR(20,6,1)
    	    WAIT 30 MOVE_MOTOR(20,7,1)
    	    WAIT 35 MOVE_MOTOR(20,8,1)
    	    WAIT 40 MOVE_MOTOR(20,9,1)
    	    WAIT 45 MOVE_MOTOR(20,10,1)
    	    WAIT 50 MOVE_MOTOR(20,11,1)
    	    WAIT 55 MOVE_MOTOR(20,12,1)
    	    WAIT 60 MOVE_MOTOR(20,13,1)
    	    WAIT 65 MOVE_MOTOR(20,14,1)
    	    WAIT 70 MOVE_MOTOR(20,15,1)
    	    WAIT 75 MOVE_MOTOR(20,16,1)
    

    This code was not meant to be easily editable from what I can see. There's a function called join_locations, so maybe you can use that, but its not obvious what it does. Normally merging two zones shouldn't that be a big deal. You've definitely got your work cut out for you that's for sure.
    Paul
  • Options
    ajish.rajuajish.raju Posts: 185
    From my study of the code, there is a location id of 39 for a dressing room and 9 for the bathroom. Now if the user selects the dressing room, i am doing a do push for the other zone. I am not able to find which channels to do push for the lights and hvac.
Sign In or Register to comment.