Channel selection TP display
I have noticed a channel selection text display on several of the TP files that I have downloaded. I understand that with the IP/232 control over some of the Satellite receivers, the text field can be propagated with the current channel. I was wondering, is there a way to propagate that field with the channel numbers as they are entered, and then upon an Enter button selection, the entire string (in this case, channel 501 for example) can be sent? I was thinking about how clients of mine have a hard time using touchscreen numerics, because they are constantly looking between the TP and the screen, to be sure they entered the correct digit. I'm thinking that perhaps an integer array of 3 fields, assuming a maximum 3 digit channel entry, would be able to handle this.
Comments
I ran into this. It gets a little dicey when a DVR is involved and the client needs to enter in a couple numbers from the keypad or whatnot.
What I do is create a favorites page with about 50 or so buttons. They can be set by the user but come prepopulated with some common selections. Each button gets a number stored to it and/or a graphic for the channel/network. To set they type a number and press-n-hold. That way I know for a fact they are typing in a channel number.
BUTTON_EVENT[dvCV7Tp2, 10] BUTTON_EVENT[dvCV7Tp2, 11] BUTTON_EVENT[dvCV7Tp2, 12] BUTTON_EVENT[dvCV7Tp2, 13] BUTTON_EVENT[dvCV7Tp2, 14] BUTTON_EVENT[dvCV7Tp2, 15] BUTTON_EVENT[dvCV7Tp2, 16] BUTTON_EVENT[dvCV7Tp2, 17] BUTTON_EVENT[dvCV7Tp2, 18] BUTTON_EVENT[dvCV7Tp2, 19] { PUSH: { LOCAL_VAR integer nChannel FOR (nChannel=0;nChannel<4;nChannel++) { SWITCH(nChannel) { CASE 1: { SAT_CHANNEL_ARRAY[1] = BUTTON.INPUT.CHANNEL-10 } CASE 2: { SAT_CHANNEL_ARRAY[2] = BUTTON.INPUT.CHANNEL-10 } CASE 3: { SAT_CHANNEL_ARRAY[3] = BUTTON.INPUT.CHANNEL-10 PULSE[dvSAT,SAT_CHANNEL_ARRAY[1]] PULSE[dvSAT,SAT_CHANNEL_ARRAY[2]] PULSE[dvSAT,SAT_CHANNEL_ARRAY[3]] } } } } }SAT_CHANNEL_ARRAY is a 3 field array, as I am assuming a maximum of 3 digits to be entered(at least to start). I have gone for a switch-case as that was the first option that came into my head when it comes to propagating multiple sections of an array. The big problem I am having now is that when I press any numeric button, all 3 array items get propagated with the same number instead of each one individually, and also my nChannel variable starts at 0, but then with the first press, it jumps to 4. Something is wrong with my For loop...This will assign the array as they enter it and update the text field you have for it. I store it as a CHAR arrary, makes it easier when updating the touchpanel.
You will need a clear button:
Then an enter button when you are done.
However you do it, you will want to use the SP command (stacked pulse) rather then pulse. Each pulse will override the last, the SP command wait until the last one is finished before sending the next. You could also use an XCM command with the CHAR array if you wanted to.
Kevin D.
This way you have txt on the touch panel. The number dials if you wait 3 seconds or press 3 digits. The beauty is using an array of txt numbers to dial presets. Like presets[] = {'123',254','326')
DEFINE_VARIABLE integer nChannelBTN[] = {10,1,2,3,4,5,6,7,8,9} char Channel_text[3] define_function integer functionDialChannel(char channelNUM[3]) { local_var integer numsize,count numsize = length_string(channelNUM) + 1 for (count = 1;count < numsize;count++) { send_command dvDSS,"'SP',atoi(channelNUM)+10" } send_command dvDSS,"'SP',21" //enter } button_event[dvTP,nChannelBTN] { push: { Channel_text = "Channel_text,itoa(get_last(nChannelBTN)-1)" send_command dvTP,"'TEXT100-',Channel_text" cancel_wait 'channelWT' wait 30 'channelWT' { functionDialChannel(Channel_text) set_length_string(Channel_text,0) } if (length_string(Channel_text)= 3) { functionDialChannel(Channel_text) set_length_string(Channel_text,0) cancel_wait 'channelWT' } } }PM me if you have any specific questions.