Changing to Last Channel Viewed
dsmith
Junior Member
Hello.
I would like press the "View Last Channel" buuton to my touch panel and the program remembers the current TV channel & switches back even if I change the channel. Also, my other problem my cablle system uses 2-999 for SD and 1000 and higher for HD. The length string command works for three digits but if but if I change the line to <5 then if adds another digit to the @TXT 1 box. I don't have an "enter" button on my panel, for the cable box changes when I stop pressing buttons. Thanks for the help.
My current code......
(******* THIS ARRAY IS DEFINED ABOVE IN DEFINE_VARIABLE SECTION *******************)
//NON_VOLATILE INTEGER TUNER_BTNS[] = {48,49,50,51,52,53,54,55,56,57}
(******* *******************)
BUTTON_EVENT[vdvTP,TUNER_BTNS] // ALL 10 TUNER BUTTONS (TUNER_BTNS IS AN ARRAY)
{
PUSH: // ACCUMULATE DATA AND DISPLAY IN BUTTON 1 ON PANEL
{
LOCAL_VAR BTN // DECLARE A LOCAL INTEGER VARIABLE (MUST BE *FIRST* UNDER PUSH)
BTN = (GET_LAST(TUNER_BTNS)) // GET_LAST GIVES ARRAY *POSITION* OF PUSHED BUTTON
PULSE[BUTTON.INPUT] // FEEDBACK TO BUTTON PUSHED
CH = "CH,ITOA(BTN)" // ADD NEW DIGIT
IF(LENGTH_STRING(CH) < 4) // 3 OR LESS DIGITS
{
SEND_COMMAND vdvTP,"'@TXT',1,CH" // UPDATE NUMBER IN TP BUTTON
CURRENT_CHANNEL = ATOI(CH)
}
ELSE // IMMEDIATE ERROR MESSAGE AND CLEAR VARIABLE
{
SEND_COMMAND vdvTP,'ADBEEP' // ERROR BEEPS
SEND_COMMAND vdvTP,"'@TXT',1,'ERROR'" // ERROR MESSAGE TO PANEL
WAIT 8
{
SEND_COMMAND vdvTP,'ADBEEP'
SEND_COMMAND vdvTP,"'@TXT',1,''" // CLEAR SCREEN
CH = '' // CLEAR VARIABLE
}
}
}
}
I would like press the "View Last Channel" buuton to my touch panel and the program remembers the current TV channel & switches back even if I change the channel. Also, my other problem my cablle system uses 2-999 for SD and 1000 and higher for HD. The length string command works for three digits but if but if I change the line to <5 then if adds another digit to the @TXT 1 box. I don't have an "enter" button on my panel, for the cable box changes when I stop pressing buttons. Thanks for the help.
My current code......
(******* THIS ARRAY IS DEFINED ABOVE IN DEFINE_VARIABLE SECTION *******************)
//NON_VOLATILE INTEGER TUNER_BTNS[] = {48,49,50,51,52,53,54,55,56,57}
(******* *******************)
BUTTON_EVENT[vdvTP,TUNER_BTNS] // ALL 10 TUNER BUTTONS (TUNER_BTNS IS AN ARRAY)
{
PUSH: // ACCUMULATE DATA AND DISPLAY IN BUTTON 1 ON PANEL
{
LOCAL_VAR BTN // DECLARE A LOCAL INTEGER VARIABLE (MUST BE *FIRST* UNDER PUSH)
BTN = (GET_LAST(TUNER_BTNS)) // GET_LAST GIVES ARRAY *POSITION* OF PUSHED BUTTON
PULSE[BUTTON.INPUT] // FEEDBACK TO BUTTON PUSHED
CH = "CH,ITOA(BTN)" // ADD NEW DIGIT
IF(LENGTH_STRING(CH) < 4) // 3 OR LESS DIGITS
{
SEND_COMMAND vdvTP,"'@TXT',1,CH" // UPDATE NUMBER IN TP BUTTON
CURRENT_CHANNEL = ATOI(CH)
}
ELSE // IMMEDIATE ERROR MESSAGE AND CLEAR VARIABLE
{
SEND_COMMAND vdvTP,'ADBEEP' // ERROR BEEPS
SEND_COMMAND vdvTP,"'@TXT',1,'ERROR'" // ERROR MESSAGE TO PANEL
WAIT 8
{
SEND_COMMAND vdvTP,'ADBEEP'
SEND_COMMAND vdvTP,"'@TXT',1,''" // CLEAR SCREEN
CH = '' // CLEAR VARIABLE
}
}
}
}
Comments
-
This can be a long road to partial function.
What if you hesitate while keying in "501" so you get 50, then 1? What's the last channel? What if you use channel up or down? What if you use the guide, scroll to new sections, and press select? What if the dvr changes the channel to record?
Maybe you could put in a TiVo cable box, and send it the command for LAST CHANNEL? -
How would you do partial functionality?
-
I personally think such a function fits into the category of 'good idea in theory but not-so-good in practice". John is bringing up a good point. The bottom line is that you have no way of knowing what the receiver is doing. So, you're trusting that things A) happened as you expected and
nothing has changed due to causes outside the control system. In bot cases your expected result is going to be wrong from the user's eyes. When the system gets horsed up because of some anomaly such as the one described ny John, the system is going to think the 'last channel' was 50 when that is not what the user expected at all. The user's experience is that the cable vox just went crazy and went from my last channel(say 204) to channel 50 then to channel 1. When he hits the last channel button, the system will dutifully go back to channel 1. So, the user thinks the stupid control system just went to three wrong channels.
I tend to not over promise functionality to clients if I cannot verify all parts of a particular system involved in making that functionality reliable. In my experience the client NEVER blames the gear hooks up to the control system. Their first scape goat is the control system.
Just sayin... -
Guess I'm stuck looking at the TV (haha). Seriously, thanks for your responses.
D Smith -
Another trap for young players on this is even if you utilise the STB or TV's LAST_CHANNEL command, it can get screwed up by the device itself.
For example I have experienced some STB's only recalling the last channel directly entered via the number buttons. But not when changing with CH+/-
In that case those channels cycled through with the CH+/- are not recalled with LAST_CHANNEL
Leave a Comment
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums