Home AMX User Forum AMX Technical Discussion

AXESS PUSHes to Netlinx Button_Event

HI there,

I have here some old Access code where the control for all AV gear happens in mainline using almost the same Channels but nested in IF (DECK = dvSomeDev) ... ELSE IF (DECK = dvSomeOtherDev) .. ELSE. Prior to puting everything in a Button_Event with all respective Buttons in a Channel Array and using the DECK-Variable inside the Button_Event, I wanted to ask if there is a more elegant way of doing this? In a Button_Event I can't use the IF (DECK = dvSomeDev) outside the PUSH block but have to use it inside each and every push in order to determine how to control the particular device. These devices are quite different, some are controlled using serial, other via IR, others via IR but have some special non-standard timings/commands, etc, so that I can't use a simple SEND to SP statement for all of them. Or could leave it in mailine but it looks quite ugly, however it works this way. Any ideas?

Thanks much!

Comments

  • ericmedleyericmedley Posts: 4,177
    bob wrote: »
    HI there,

    I have here some old Access code where the control for all AV gear happens in mainline using almost the same Channels but nested in IF (DECK = dvSomeDev) ... ELSE IF (DECK = dvSomeOtherDev) .. ELSE. Prior to puting everything in a Button_Event with all respective Buttons in a Channel Array and using the DECK-Variable inside the Button_Event, I wanted to ask if there is a more elegant way of doing this? In a Button_Event I can't use the IF (DECK = dvSomeDev) outside the PUSH block but have to use it inside each and every push in order to determine how to control the particular device. These devices are quite different, some are controlled using serial, other via IR, others via IR but have some special non-standard timings/commands, etc, so that I can't use a simple SEND to SP statement for all of them. Or could leave it in mailine but it looks quite ugly, however it works this way. Any ideas?

    Thanks much!

    Can you post the code? That migt help some.
  • kbeattyAMXkbeattyAMX Posts: 358
    bob wrote: »
    HI there,

    I have here some old Access code where the control for all AV gear happens in mainline using almost the same Channels but nested in IF (DECK = dvSomeDev) ... ELSE IF (DECK = dvSomeOtherDev) .. ELSE. Prior to puting everything in a Button_Event with all respective Buttons in a Channel Array and using the DECK-Variable inside the Button_Event, I wanted to ask if there is a more elegant way of doing this? In a Button_Event I can't use the IF (DECK = dvSomeDev) outside the PUSH block but have to use it inside each and every push in order to determine how to control the particular device. These devices are quite different, some are controlled using serial, other via IR, others via IR but have some special non-standard timings/commands, etc, so that I can't use a simple SEND to SP statement for all of them. Or could leave it in mailine but it looks quite ugly, however it works this way. Any ideas?

    Thanks much!

    Sound like you want to reuse buttons for multiple devices to control basic transport and most of these devices have the same functionality.

    You could put all of the buttons in a button array. Use one button event and use DECK as a pointer to a DevArray of the devices that you want to control. In this way you could use a statement like PULSE[dvaDeck[DeckPointer],1] or any function you want to do. Even like SEND_COMMAND dvaDeck[DeckPointer],"'PON',13"

    The pointer would be modified in some source selection routine.
  • bobbob Posts: 296
    This is some of the code from Mainline. TP_STATUS is an Array holding status info about all TPs in particular about the dvDeck device currently each TP controls. dvTps1 is an array of four TPs the system has:
    nPanelIndex = GET_LAST(dvTps1)
    
    (***********************************************************)
    (***********************************************************) 
    IF (TP_STATUS[nPanelIndex].dvDeck == MACMINI)     	// TP_STATUS holds all TPs and dvDeck they are controlling
    {       
        
      PUSH[dvTps1,64]                           (* MENU *) 
      PUSH[dvTps1,65]                           (* ARROW UP *)   
      PUSH[dvTps1,66]                           (* ARROW DOWN *)   
      PUSH[dvTps1,67]                           (* ARROW LEFT *)   
      PUSH[dvTps1,68]                           (* ARROW RIGHT *)     
      PUSH[dvTps1,69]                           (* OK *)   
      {
        // SEND_COMMAND MACMINI, "'SP', PUSH_CHANNEL" 
        TO[MACMINI,PUSH_CHANNEL] 
        // PULSE[MACMINI,PUSH_CHANNEL] 
      }
    }
    (***********************************************************)
    (***********************************************************) 
    ELSE IF (TP_STATUS[nPanelIndex].dvDeck == CHELLO)   // cable box
    {        
      PUSH[dvTps1,10]                           (* 0 *) 
      PUSH[dvTps1,11]                           (* 1 *) 
      PUSH[dvTps1,12]                           (* 2 *) 
      PUSH[dvTps1,13]                           (* 3 *) 
      PUSH[dvTps1,14]                           (* 4 *) 
      PUSH[dvTps1,15]                           (* 5 *) 
      PUSH[dvTps1,16]                           (* 6 *) 
      PUSH[dvTps1,17]                           (* 7 *) 
      PUSH[dvTps1,18]                           (* 8 *) 
      PUSH[dvTps1,19]                           (* 9 *) 
      {
        PULSE[CHELLO,PUSH_CHANNEL]
      }
      PUSH[dvTps1,9]                            (* POWER *) 
      PUSH[dvTps1,20]                           (* ? *)   
      PUSH[dvTps1,50]                           (* TV GUIDE *)   
      PUSH[dvTps1,54]                           (* INFO *)   
      PUSH[dvTps1,55]                           (* MENU *)   
      PUSH[dvTps1,60]                           (* OK *)
      PUSH[dvTps1,61]                           (* RED *)
      PUSH[dvTps1,62]                           (* GREEN *)
      PUSH[dvTps1,63]                           (* YELLOW *)
      PUSH[dvTps1,64]                           (* BLUE *)
      PUSH[dvTps1,65]                           (* TV SIGN LIKE TeleText *)
      {
        SET_PULSE_TIME (1)
        PULSE[CHELLO,PUSH_CHANNEL]
        SET_PULSE_TIME (5)
      }                      
      PUSH[dvTps1,22]                           (* CHANNEL UP *)   
      PUSH[dvTps1,23]                           (* CHANNEL DOWN *)   
      PUSH[dvTps1,56]                           (* ARROW UP *)   
      PUSH[dvTps1,57]                           (* ARROW DOWN *)   
      PUSH[dvTps1,58]                           (* ARROW LEFT *)
      PUSH[dvTps1,59]                           (* ARROW RIGHT *)
      {
        SET_PULSE_TIME (1)
        TO[CHELLO,PUSH_CHANNEL]
        SET_PULSE_TIME (5)
      }  
      PUSH[dvTps1,80]  (* MTV 601 *)
      {
        PULSE[CHELLO,16]  
        WAIT 5 PULSE[CHELLO,10] 
        WAIT 5 PULSE[CHELLO,11] 
      }
      PUSH[dvTps1,81] (* VIVA 608 *)
      {
        PULSE[CHELLO,16]  
        WAIT 5 PULSE[CHELLO,10] 
        WAIT 5 PULSE[CHELLO,18] 
      }
      PUSH[dvTps1,82]  (* CNN 505 *)
      {
        PULSE[CHELLO,15]  
        WAIT 5 PULSE[CHELLO,10] 
        WAIT 5 PULSE[CHELLO,15] 
      }    
    }
    (***********************************************************)
    (***********************************************************) 
    ELSE IF (TP_STATUS[nPanelIndex].dvDeck == LUMAGEN)   
    {  
    
    (*
      PUSH[dvTps1,10]    (* DECK: LUMAGEN: 0 *)
        SEND_STRING dvLumagenSerial, "'0',$0D"
      PUSH[dvTps1,11]    (* DECK: LUMAGEN: 1 *)
        SEND_STRING dvLumagenSerial, "'1',$0D"
      PUSH[dvTps1,12]    (* DECK: LUMAGEN: 2 *)
        SEND_STRING dvLumagenSerial, "'2',$0D"
      PUSH[dvTps1,13]    (* DECK: LUMAGEN: 3 *)
        SEND_STRING dvLumagenSerial, "'3',$0D"
      PUSH[dvTps1,14]    (* DECK: LUMAGEN: 4 *)
        SEND_STRING dvLumagenSerial, "'4',$0D"
      PUSH[dvTps1,15]    (* DECK: LUMAGEN: 5 *)
        SEND_STRING dvLumagenSerial, "'5',$0D"
      PUSH[dvTps1,16]    (* DECK: LUMAGEN: 6 *)
        SEND_STRING dvLumagenSerial, "'6',$0D"
      PUSH[dvTps1,17]    (* DECK: LUMAGEN: 7 *)
        SEND_STRING dvLumagenSerial, "'7',$0D"
      PUSH[dvTps1,18]    (* DECK: LUMAGEN: 8 *)
        SEND_STRING dvLumagenSerial, "'8',$0D"
      PUSH[dvTps1,19]    (* DECK: LUMAGEN: 9 *)
        SEND_STRING dvLumagenSerial, "'9',$0D"
      PUSH[dvTps1,31]    (* DECK: LUMAGEN: POWER OFF *)
        SEND_STRING dvLumagenSerial, "'$',$0D"
      PUSH[dvTps1,64]    (* DECK: LUMAGEN: MENU *)
        SEND_STRING dvLumagenSerial, "'M',$0D"
      PUSH[dvTps1,65]    (* DECK: LUMAGEN: ARROW UP *)
        SEND_STRING dvLumagenSerial, "'^',$0D"
      PUSH[dvTps1,66]    (* DECK: LUMAGEN: ARROW DOWN *)
        SEND_STRING dvLumagenSerial, "'v',$0D"
      PUSH[dvTps1,67]    (* DECK: LUMAGEN: ARROW LEFT *)
        SEND_STRING dvLumagenSerial, "'<',$0D"
      PUSH[dvTps1,68]    (* DECK: LUMAGEN: ARROW RIGHT *)
        SEND_STRING dvLumagenSerial, "'>',$0D"
      PUSH[dvTps1,70]    (* DECK: LUMAGEN: MENU EXIT *)
        SEND_STRING dvLumagenSerial, "'X',$0D"
      PUSH[dvTps1,71]    (* DECK: LUMAGEN: MEMORY A *)
        SEND_STRING dvLumagenSerial, "'a',$0D"
      PUSH[dvTps1,72]    (* DECK: LUMAGEN: MEMORY B *)
        SEND_STRING dvLumagenSerial, "'b',$0D"
      PUSH[dvTps1,77]    (* DECK: LUMAGEN: MEMORY C *)
        SEND_STRING dvLumagenSerial, "'c',$0D"
      PUSH[dvTps1,78]    (* DECK: LUMAGEN: MEMORY D *)
        SEND_STRING dvLumagenSerial, "'d',$0D"
      PUSH[dvTps1,73]    (* DECK: LUMAGEN: SOURCE ASPECT RATIO 4:3 *)
        SEND_STRING dvLumagenSerial, "'n',$0D"
      PUSH[dvTps1,74]    (* DECK: LUMAGEN: SOURCE ASPECT RATIO LBX *)  
        SEND_STRING dvLumagenSerial, "'l',$0D"
      PUSH[dvTps1,75]    (* DECK: LUMAGEN: SOURCE ASPECT RATIO 16:9 *)  
        SEND_STRING dvLumagenSerial, "'w',$0D" 
      PUSH[dvTps1,76]    (* DECK: LUMAGEN: SOURCE ASPECT RATIO 1.85 *) 
        SEND_STRING dvLumagenSerial, "'j',$0D"    
      PUSH[dvTps1,30]    (* DECK: LUMAGEN: POWER ON *)
        CALL 'TURN_LUMAGEN_ON' 
    
      PUSH[dvTps1,69]    (* DECK: LUMAGEN: MENU OK *)
      PUSH[dvTps1,21]    (* DECK: LUMAGEN: MENU OK *)
        SEND_STRING dvLumagenSerial, "'k',$0D"  
    *)
    
      PUSH[dvTps1,77]    (* DECK: LUMAGEN: MEMORY C *)
        SEND_STRING dvLumagenSerial, "'c',$0D"
      PUSH[dvTps1,78]    (* DECK: LUMAGEN: MEMORY D *)
      {
        CALL 'TURN_MACMINI_MONITOR_ON'  // memD is linked to OUT3 and displayed on 19" LCD monitor
        WAIT 60 CALL 'TURN_MACMINI_FANS_ON'
        CALL 'TURN_LUMAGEN_ON'					// turn it on either from cold power off or standby mode
      }
      
      PUSH[dvTps1,30]    (* DECK: LUMAGEN: POWER ON *)
        CALL 'TURN_LUMAGEN_ON'  
    
      PUSH[dvTps1,10]    (* DECK: LUMAGEN: 0 *)
      PUSH[dvTps1,11]    (* DECK: LUMAGEN: 1 *)
      PUSH[dvTps1,12]    (* DECK: LUMAGEN: 2 *)
      PUSH[dvTps1,13]    (* DECK: LUMAGEN: 3 *)
      PUSH[dvTps1,14]    (* DECK: LUMAGEN: 4 *)
      PUSH[dvTps1,15]    (* DECK: LUMAGEN: 5 *)
      PUSH[dvTps1,16]    (* DECK: LUMAGEN: 6 *)
      PUSH[dvTps1,17]    (* DECK: LUMAGEN: 7 *)
      PUSH[dvTps1,18]    (* DECK: LUMAGEN: 8 *)
      PUSH[dvTps1,19]    (* DECK: LUMAGEN: 9 *)
      PUSH[dvTps1,21]    (* DECK: LUMAGEN: MENU OK - same as channel 69 *)
      PUSH[dvTps1,31]    (* DECK: LUMAGEN: POWER OFF *)
      PUSH[dvTps1,64]    (* DECK: LUMAGEN: MENU *)
      PUSH[dvTps1,65]    (* DECK: LUMAGEN: ARROW UP *)
      PUSH[dvTps1,66]    (* DECK: LUMAGEN: ARROW DOWN *)
      PUSH[dvTps1,67]    (* DECK: LUMAGEN: ARROW LEFT *)
      PUSH[dvTps1,68]    (* DECK: LUMAGEN: ARROW RIGHT *)
      PUSH[dvTps1,69]    (* DECK: LUMAGEN: MENU OK *)
      PUSH[dvTps1,70]    (* DECK: LUMAGEN: MENU EXIT *)
      PUSH[dvTps1,71]    (* DECK: LUMAGEN: MEMORY A *)
      PUSH[dvTps1,72]    (* DECK: LUMAGEN: MEMORY B *)
      PUSH[dvTps1,73]    (* DECK: LUMAGEN: SOURCE ASPECT RATIO 4:3 *)
      PUSH[dvTps1,74]    (* DECK: LUMAGEN: SOURCE ASPECT RATIO LBX *)  
      PUSH[dvTps1,75]    (* DECK: LUMAGEN: SOURCE ASPECT RATIO 16:9 *)   
      PUSH[dvTps1,76]    (* DECK: LUMAGEN: SOURCE ASPECT RATIO 1.85 *)     
      {
        SET_PULSE_TIME (2)
        PULSE[LUMAGEN,PUSH_CHANNEL]
        SET_PULSE_TIME (5)
        // TO[LUMAGEN,PUSH_CHANNEL]
        // SEND_COMMAND LUMAGEN, "'SP', PUSH_CHANNEL"
      }
    }
    (***********************************************************)
    (***********************************************************) 
    ELSE IF (nPanelIndex].dvDeck == XCARD)   
    {
      PUSH[dvTps1,9]    (* POWER ON/OFF *)
      PUSH[dvTps1,26]   (* MUTE *)
      PUSH[dvTps1,50]   (* VGA/TV *)
      PUSH[dvTps1,57]   (* PROGRAM *)
      PUSH[dvTps1,79]   (* MENU *)      
      PUSH[dvTps1,24]   (* VOLUME UP *) 
      PUSH[dvTps1,25]   (* VOLUME DOWN *)       
      {  
        SEND_COMMAND XCARD, "'SP', PUSH_CHANNEL"
      }      
      
      PUSH[dvTps1,1]    (* PLAY/PAUSE *)
      PUSH[dvTps1,2]    (* STOP *)
      PUSH[dvTps1,3]    (* PLAY/PAUSE, same command as channel 1 *)
      PUSH[dvTps1,4]    (* FFW *)
      PUSH[dvTps1,5]    (* REV *)       
      PUSH[dvTps1,10]   (* 0 *)
      PUSH[dvTps1,11]   (* 1 *)
      PUSH[dvTps1,12]   (* 2 *)
      PUSH[dvTps1,13]   (* 3 *)
      PUSH[dvTps1,14]   (* 4 *)
      PUSH[dvTps1,15]   (* 5 *)
      PUSH[dvTps1,16]   (* 6 *)
      PUSH[dvTps1,17]   (* 7 *)
      PUSH[dvTps1,18]   (* 8 *)
      PUSH[dvTps1,19]   (* 9 *)
      PUSH[dvTps1,20]   (* ENTER *)  
      PUSH[dvTps1,52]   (* TITLE *)
      PUSH[dvTps1,53]   (* OSD *)    
      PUSH[dvTps1,54]   (* LANGUAGE/AUDIO *)
      PUSH[dvTps1,55]   (* SUBTITLES *)
      PUSH[dvTps1,56]   (* ANGLE *)  
      PUSH[dvTps1,58]   (* L-R *)  
      PUSH[dvTps1,80]   (* ARROW UP *)
      PUSH[dvTps1,81]   (* ARROW DOWN *)
      PUSH[dvTps1,82]   (* ARROW LEFT *)
      PUSH[dvTps1,83]   (* ARROW RIGHT *)    
      PUSH[dvTps1,84]   (* OK/SEL *)          
      {
        ON [XCARD, PUSH_CHANNEL]    // don't work sending codes to SP
        OFF [XCARD, PUSH_CHANNEL]  
      }             
    }
    (***********************************************************)
    (***********************************************************) 
    ELSE IF (TP_STATUS[nPanelIndex].dvDeck == dvPCLinkMediaServer)   
    {
      //   SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-{CTRL}e'"      // this ejects the disc tray
      PUSH[dvTps1,9]    (* POWER ON/OFF *)
      PUSH[dvTps1,26]   (* MUTE *)
      PUSH[dvTps1,50]   (* VGA/TV *)
      PUSH[dvTps1,52]   (* TITLE *)
      {
        // unused buttons
      }
    
      PUSH[dvTps1,24]   (* VOLUME UP *) 
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-+'"
      PUSH[dvTps1,25]   (* VOLUME DOWN *)   
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS--'"
      PUSH[dvTps1,59]   (* PowerDVD7 Menu - Right Mouse Click *)
        SEND_COMMAND dvPCLinkMediaServer,"'MOUSE-RCLICK'" 
      PUSH[dvTps1,58]   (* BLANK *)
      {
        // SEND_COMMAND dvPCLinkMediaServer,"'BLANK-TOGGLE'" 
      }
      PUSH[dvTps1,57]   (* HIDE MOUSE *)  
        SEND_COMMAND dvPCLinkMediaServer,"'MOUSE-HIDE'"
      PUSH[dvTps1,8]   (* MENU *)   
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-{ESC}'"     
      PUSH[dvTps1,79]   (* MENU *)   
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-l'"       
      PUSH[dvTps1,1]    (* PLAY *)
      {
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-{ENTER}'"
        SEND_COMMAND dvPCLinkMediaServer,"'MOUSE-HIDE'"
      }
      PUSH[dvTps1,2]    (* STOP *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-s'"
      PUSH[dvTps1,3]    (* PAUSE *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-{SPACE}'"
      PUSH[dvTps1,4]    (* FFW *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-f'"
      PUSH[dvTps1,5]    (* REV *)       
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-b'"
      PUSH[dvTps1,10]   (* 0 *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-0'"
      PUSH[dvTps1,11]   (* 1 *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-1'"
      PUSH[dvTps1,12]   (* 2 *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-2'"
      PUSH[dvTps1,13]   (* 3 *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-3'"
      PUSH[dvTps1,14]   (* 4 *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-4'"
      PUSH[dvTps1,15]   (* 5 *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-5'"
      PUSH[dvTps1,16]   (* 6 *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-6'"
      PUSH[dvTps1,17]   (* 7 *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-7'"
      PUSH[dvTps1,18]   (* 8 *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-8'"
      PUSH[dvTps1,19]   (* 9 *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-9'"
      PUSH[dvTps1,20]   (* ENTER *)  
      {
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-{ENTER}'"
        SEND_COMMAND dvPCLinkMediaServer,"'MOUSE-HIDE'"
      }
      PUSH[dvTps1,53]   (* OPEN MEDIA *)
      {
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-{CTRL}o'" 
        SEND_COMMAND dvPCLinkMediaServer,"'MOUSE-HIDE'"
      }
      PUSH[dvTps1,54]   (* LANGUAGE/AUDIO *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-h'"
      PUSH[dvTps1,55]   (* SUBTITLES *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-u'"
      PUSH[dvTps1,56]   (* ANGLE *)  
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-a'"
      PUSH[dvTps1,80]   (* ARROW UP *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-{UP}'"
      PUSH[dvTps1,81]   (* ARROW DOWN *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-{DOWN}'"
      PUSH[dvTps1,82]   (* ARROW LEFT *)
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-{LEFT}'"
      PUSH[dvTps1,83]   (* ARROW RIGHT *)  
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-{RIGHT}'"
      PUSH[dvTps1,84]   (* OK/SEL - same as ENTER *) 
      {
        SEND_COMMAND dvPCLinkMediaServer,"'SENDKEYS-{ENTER}'"
        SEND_COMMAND dvPCLinkMediaServer,"'MOUSE-HIDE'"           
      }          
    }
    
  • bobbob Posts: 296
    Any hints?
  • kbeattyAMXkbeattyAMX Posts: 358
    Are you still using a G3 panel? With G4 I normally use 1 port per device. The first thing you want to do is make button arrays. You can jam all of the buttons into one array if you want. nButtons[] = {1,2,3,4,5} Like that. Put all of your TPs in an array and all of your devices in an array. Then you can do...
    button_event[dvaTP,nButtons]
    {
      push:
      {
         curr_TPindex = get_last(dvaTP)
         curr_Deck = TPstatus[curr_TPindex ].deck
         switch (curr_Deck )
         {
            case MacMini:
            {
               to[dvaDeck[curr_Deck],button.input.channel]
            }
         }
      }
    }
    

    Something like this. The above code is just a frame work to go from. I'm sure there's Syntax problems.
  • bobbob Posts: 296
    I am using 4 VPN-CPs in this system. Device 1 is allocated for A/V deck control, thus the deck variable to switch between them. The problem I see is that a single devices uses different commands for control, so there must be a nested SWITCH within the device to accomodate this. Not very future proof or elegant, but I am trying to redesign everything because there are decks that has been tested and work that way only.
  • kbeattyAMXkbeattyAMX Posts: 358
    I'm not to sure what you're looking. You have devices that share the same buttons. Therefor you need a pointer per panel to use the right device for the panel. What does elegant mean to you?
  • jjamesjjames Posts: 2,908
    I'm sort of Ken on this one. What's wrong with a SWITCH in determining which device to control?

    I too am confused as to what elegant means. Elegant - in my opinion - is getting it done and working, with room for adjustments if needed. Are you looking to just make the code more compact?
  • bobbob Posts: 296
    Guys, thanks much! I used BUTTON_EVENT[dvTps1, GenericChannels], inside the PUSH a SWITCH for the dvDeck variable and inside each CASE for dvDeck another SWITCH with grouped CASEs for the different SEND_COMMANDs (where they are different). Works great and is readable.

    Thanks again!
Sign In or Register to comment.