Modules & non required channels - correct convention
I have a module that requires about 60 input channels specified in an array for the relevant touchpanel buttons, which is common practise.
However, the module provides significant functionality above what i actually require so do not want to have 60 buttons on the touch-panel when only a handful of them will ever be used. When creating the array for the input channels, what is the safest way to code for the 'missing, non-required' channels?
hope that makes sense!
However, the module provides significant functionality above what i actually require so do not want to have 60 buttons on the touch-panel when only a handful of them will ever be used. When creating the array for the input channels, what is the safest way to code for the 'missing, non-required' channels?
hope that makes sense!
0
Comments
INTEGER nTandberg_Buttons[] = {x, x, x, x, x, etc} And in the UI: BUTTON_EVENT[dvTP, nTandberg_Buttons] { PUSH: { nButton_Index = GET_LAST(nTandberg_Buttons) SWITCH(nButton_Index) { CASE 1: { Do Something } CASE 2: { Do Something } } } }Don't know if that helps or not.
thanks!!
DEFINE_CONSTANT NO_FUNCTION_BTN = 4000; DEFINE_VARIABLE INTEGER nTandberg_Buttons[] = { 100, 101, NO_FUNCTION_BTN, 103, 104 } DEFINE_EVENT BUTTON_EVENT[dvTP, nTandberg_Buttons] { PUSH: { IF (BUTTON.INPUT.CHANNEL != NO_FUNCTION_BTN) { nButton_Index = GET_LAST(nTandberg_Buttons) SWITCH(nButton_Index) { CASE 1: { Do Something } CASE 2: { Do Something } } } } } DEFINE_PROGRAM IF (nTandberg_Buttons[1] != NO_FUNCTION_BTN) [dvTP, nTandberg_Buttons[1]] = (SOMETHING = SOMETHINGELSE)