feedback help
tkroeger
Posts: 13
I'm needing help with this code that doesn't display feedback correctly. I have 8 inputs and 24 outputs, I also have a 'all' button to allow the user to send a single input to all monitors at once. I can select any input and send it to any number of outputs and the feedback works as it should. What doesn't work is when I select an input and send it to 'all'.
DEFINE_CALL 'ManualSwitch'
{
if (nSwitchIn < 4)
{
SEND_STRING DisplayDevice[nSwitchOut],"'kb 00 07',$0D"
}
Else if ((nSwitchIn > 3)&&(nSwitchIn < 8))
{
SEND_STRING DisplayDevice[nSwitchOut],"'kb 00 04',$0D"
}
Else if (nSwitchIn = 8)
{
SEND_STRING DisplayDevice[nSwitchOut],"'kb 00 03',$0D"
}
}
BUTTON_EVENT[dvTouch,102] // Send currently selected input to all outputs
{
PUSH:
{
local_var integer j
SEND_COMMAND dvEndeleo1,"'CLALLI',ITOA(nSwitchIn),'O0'" // SEND AUDIO AND VIDEO SWITCH COMMAND
SEND_COMMAND dvEndeleo2,"'CLALLI',ITOA(nSwitchIn),'O0'" // SEND AUDIO AND VIDEO SWITCH COMMAND
SEND_COMMAND dvEndeleo3,"'CLALLI',ITOA(nSwitchIn),'O0'" // SEND AUDIO AND VIDEO SWITCH COMMAND
for(j = 1; j < 25; j++)
{
nSwitchOut = j
nManualFeedback[nSwitchIn][nSwitchOut] = nManualFeedback[nSwitchIn][j]
call 'ManualSwitch'
}
}
}
[dvTouch,1] = nSwitchIn = 1
[dvTouch,2] = nSwitchIn = 2
[dvTouch,3] = nSwitchIn = 3
[dvTouch,4] = nSwitchIn = 4
[dvTouch,5] = nSwitchIn = 5
[dvTouch,6] = nSwitchIn = 6
[dvTouch,7] = nSwitchIn = 7
[dvTouch,8] = nSwitchIn = 8
[dvTouch,20] = nManualFeedback[nSwitchIn][1]
[dvTouch,21] = nManualFeedback[nSwitchIn][2]
[dvTouch,22] = nManualFeedback[nSwitchIn][3]
[dvTouch,23] = nManualFeedback[nSwitchIn][4]
[dvTouch,24] = nManualFeedback[nSwitchIn][5]
[dvTouch,25] = nManualFeedback[nSwitchIn][6]
[dvTouch,26] = nManualFeedback[nSwitchIn][7]
[dvTouch,27] = nManualFeedback[nSwitchIn][8]
[dvTouch,28] = nManualFeedback[nSwitchIn][9]
[dvTouch,29] = nManualFeedback[nSwitchIn][10]
[dvTouch,30] = nManualFeedback[nSwitchIn][11]
[dvTouch,31] = nManualFeedback[nSwitchIn][12]
[dvTouch,32] = nManualFeedback[nSwitchIn][13]
[dvTouch,33] = nManualFeedback[nSwitchIn][14]
[dvTouch,34] = nManualFeedback[nSwitchIn][15]
[dvTouch,35] = nManualFeedback[nSwitchIn][16]
[dvTouch,36] = nManualFeedback[nSwitchIn][17]
[dvTouch,37] = nManualFeedback[nSwitchIn][18]
[dvTouch,38] = nManualFeedback[nSwitchIn][19]
[dvTouch,39] = nManualFeedback[nSwitchIn][20]
[dvTouch,40] = nManualFeedback[nSwitchIn][21]
[dvTouch,41] = nManualFeedback[nSwitchIn][22]
[dvTouch,42] = nManualFeedback[nSwitchIn][23]
[dvTouch,43] = nManualFeedback[nSwitchIn][24]
Any insight will be very appreciated.
-Tim
DEFINE_CALL 'ManualSwitch'
{
if (nSwitchIn < 4)
{
SEND_STRING DisplayDevice[nSwitchOut],"'kb 00 07',$0D"
}
Else if ((nSwitchIn > 3)&&(nSwitchIn < 8))
{
SEND_STRING DisplayDevice[nSwitchOut],"'kb 00 04',$0D"
}
Else if (nSwitchIn = 8)
{
SEND_STRING DisplayDevice[nSwitchOut],"'kb 00 03',$0D"
}
}
BUTTON_EVENT[dvTouch,102] // Send currently selected input to all outputs
{
PUSH:
{
local_var integer j
SEND_COMMAND dvEndeleo1,"'CLALLI',ITOA(nSwitchIn),'O0'" // SEND AUDIO AND VIDEO SWITCH COMMAND
SEND_COMMAND dvEndeleo2,"'CLALLI',ITOA(nSwitchIn),'O0'" // SEND AUDIO AND VIDEO SWITCH COMMAND
SEND_COMMAND dvEndeleo3,"'CLALLI',ITOA(nSwitchIn),'O0'" // SEND AUDIO AND VIDEO SWITCH COMMAND
for(j = 1; j < 25; j++)
{
nSwitchOut = j
nManualFeedback[nSwitchIn][nSwitchOut] = nManualFeedback[nSwitchIn][j]
call 'ManualSwitch'
}
}
}
[dvTouch,1] = nSwitchIn = 1
[dvTouch,2] = nSwitchIn = 2
[dvTouch,3] = nSwitchIn = 3
[dvTouch,4] = nSwitchIn = 4
[dvTouch,5] = nSwitchIn = 5
[dvTouch,6] = nSwitchIn = 6
[dvTouch,7] = nSwitchIn = 7
[dvTouch,8] = nSwitchIn = 8
[dvTouch,20] = nManualFeedback[nSwitchIn][1]
[dvTouch,21] = nManualFeedback[nSwitchIn][2]
[dvTouch,22] = nManualFeedback[nSwitchIn][3]
[dvTouch,23] = nManualFeedback[nSwitchIn][4]
[dvTouch,24] = nManualFeedback[nSwitchIn][5]
[dvTouch,25] = nManualFeedback[nSwitchIn][6]
[dvTouch,26] = nManualFeedback[nSwitchIn][7]
[dvTouch,27] = nManualFeedback[nSwitchIn][8]
[dvTouch,28] = nManualFeedback[nSwitchIn][9]
[dvTouch,29] = nManualFeedback[nSwitchIn][10]
[dvTouch,30] = nManualFeedback[nSwitchIn][11]
[dvTouch,31] = nManualFeedback[nSwitchIn][12]
[dvTouch,32] = nManualFeedback[nSwitchIn][13]
[dvTouch,33] = nManualFeedback[nSwitchIn][14]
[dvTouch,34] = nManualFeedback[nSwitchIn][15]
[dvTouch,35] = nManualFeedback[nSwitchIn][16]
[dvTouch,36] = nManualFeedback[nSwitchIn][17]
[dvTouch,37] = nManualFeedback[nSwitchIn][18]
[dvTouch,38] = nManualFeedback[nSwitchIn][19]
[dvTouch,39] = nManualFeedback[nSwitchIn][20]
[dvTouch,40] = nManualFeedback[nSwitchIn][21]
[dvTouch,41] = nManualFeedback[nSwitchIn][22]
[dvTouch,42] = nManualFeedback[nSwitchIn][23]
[dvTouch,43] = nManualFeedback[nSwitchIn][24]
Any insight will be very appreciated.
-Tim
0
Comments
-John
-John
Edit: Oops, wasn't paying attention, you show the call in your code snippet. You'll need to use the correction in this post so that nSwitchOut get's updated for each pass of the loop.
Thanks for the correction. I'll make that change and see how it works. I appreciate the quick response.
Now when I press Input 1 and send to 'all' the feedback works. When I press Input 2, the output feedback shows none selected, which is correct. If I proceed to select 'all' the feedback changes to show Input 2 is now selected to all, which is correct. Now, when I press Input 1 again, it shows to still be going to 'all'.
I have 8 Inputs and 24 Outputs, matrix-ed. I just want my feedback to indicate which Input is routed to which Output. Seems simple enough. Sigh.
--John