JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

auto enter after two channel numbers

 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - General Forum
View previous topic :: View next topic  
Author Message
friendlyfire



Joined: 21 Nov 2005
Posts: 55

                    
PostPosted: Fri Nov 25, 2005 3:35 pm    Post subject: auto enter after two channel numbers Reply with quote

Hi, here is a mod I am about to make, if anyone has any comments that would be great

My cable box accepts three digit channel selections but 99% of the time I view channels in the two digit range.

Goal of modificaiton is to send the enter automatically after the second number is keyed

I will use the TOAD/TOG protocol with one bit, call it C0

here is some pseudocode describing how I think to implement this. I don't have a great deal of experience coding remote control hacks so the main challenge for me is figuring out how to this pseudocode into "remote control code" (I realzied of course that it is quite different than coding with a high level language)

Autu Enter Hack:

AUTOENTER()
' this function called after every numeric key press
if C0 = 1 then transmit ("Enter")
else
C0 = 1
start timout_timer (~1 second )
end if

AUTOENTER_CLEAR()
' this function called whenever the enter key is pressed or called. The above function would call this one
C0 = 0

TIMEOUT_TIMER()
AUTOENTER(clear)
' i.e. if no key pressed for one second then clear the condition and start over

Comments? Suggestions? Has it been done before? (I searched but didn't find anything relevant)
thanks
Brian
Back to top
View user's profile Send private message Send e-mail
Nils_Ekberg
Expert


Joined: 02 Aug 2003
Posts: 1689
Location: Near Albany, NY

                    
PostPosted: Fri Nov 25, 2005 4:39 pm    Post subject: Reply with quote

I understand what you are trying to accomplish and the logic you posted will work in a program. However I am not sure how you will implement it using TT. Using TT you would have to allow for too many possibilities of bits being set since a 2 digit channel number could start with any number. Unless what you are talking about is using the TT protocol and making a new protocol (program).

My cable box accepts 1, 2, 3 or 4 digit channel Numbers also. If you enter only 1, 2 or 3 digits it acts like enter was hit after about 2 to 3 seconds. Most of the time I just let the box do it rather than manually hitting enter.
_________________
Nils
Files Section
Diagnosis File Section
Back to top
View user's profile Send private message Send e-mail
friendlyfire



Joined: 21 Nov 2005
Posts: 55

                    
PostPosted: Fri Nov 25, 2005 4:43 pm    Post subject: Reply with quote

Hi Nils,
I am proposing to replace each numeric key with a macro that will
a) transmit that number to the cable box
b) call the function (i.e. macro) I described in my initial post

I don't know if this means a new protocol or now. I didn't think so...

It seems to me that this logic does not suffer from the complication you are concerned about. Any combination of two digit numbers would work... am I missing something? I haven't used TT yet so perhaps there is something fundamental I don't understand about the protocol.

it is quite possible this can't be implemented and I appreciate any info that will help me avoid wasting a lot of time on it
Back to top
View user's profile Send private message Send e-mail
whompus



Joined: 27 Apr 2005
Posts: 540

                    
PostPosted: Fri Nov 25, 2005 5:20 pm    Post subject: Reply with quote

You guys are talking over my head. Get it sorted and I for one will use it. My box only excepts 3 diget codes or 2 diget with enter after. I decided for an extra set of fav channels to put the cable code on an unused device key and make macros 1=a channel 2=another and so on that way normal.shift.and alt shift gives me up to 30 fav ch on the # keys.
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21234
Location: Chicago, IL

                    
PostPosted: Fri Nov 25, 2005 5:57 pm    Post subject: Reply with quote

I'd probably do this using assembler in a replacement protocol. If you identify a register that is otherwise unused, you could store zeroes in it every time the ENTER button is pressed, then after any numeric button is pressed, you would test it for zeroes. If it is zeroes, you would increment it. If it isn't zeroes, you would send ENTER after the numeric button and then you would re-zero it.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Nils_Ekberg
Expert


Joined: 02 Aug 2003
Posts: 1689
Location: Near Albany, NY

                    
PostPosted: Fri Nov 25, 2005 7:35 pm    Post subject: Reply with quote

If you always wanted to send an ENTER after every 2 digits it would be easy with TT. However if you sometimes need to send the third digit or just a single digit you have to wait to see if another number is pressed within a certain period of time and if not send the ENTER.

I may be having a brain check but I can't think of a way to do that with TT.

A special protocol using assembler language would not be too difficult to write. Just use one of the registers that TT uses if you are not using TT. If you are using an extender then TT source is in the extender .asm file. You could modify that and use it with the extender instead of TT. Or for that matter add a new protocol but just watch the memory usage in the extender.

If I had the time right now I would do it for you but I can't even get one simple thing I owe Rob done. (Yes, Rob I have not forgotten)
_________________
Nils
Files Section
Diagnosis File Section
Back to top
View user's profile Send private message Send e-mail
friendlyfire



Joined: 21 Nov 2005
Posts: 55

                    
PostPosted: Sat Nov 26, 2005 4:17 am    Post subject: Reply with quote

hi
Yes, I always want to send an enter after two presses, unless Ithe first digit is preceded with a shift (I hardly ever need this)
Channels 1-9 will be keyed as either 01-09 or a single digit followed by enter (just like I have to do it now)

I think under these conditions I should be able to build it with just a bunch of short macros and TT. But hey, I'm a newbie, what do I know? No harm trying, will let you know how it goes!


Brian

p.s. The timer to clear the register after a second of inactivity is something I have no clue on how to implement by the way, advice most appreciated on that.
Back to top
View user's profile Send private message Send e-mail
Nils_Ekberg
Expert


Joined: 02 Aug 2003
Posts: 1689
Location: Near Albany, NY

                    
PostPosted: Sat Nov 26, 2005 8:40 am    Post subject: Reply with quote

You will not be able to do a timer in TT.

Just use the basic functionality of TT as defined in the docs using the same bit in the TT on each number button.

When you press a number button you would
1) set the TT bit ON if it is OFF then send the first digit
2) set the TT bit OFF if it is ON and send the second digit and the ENTER
3) no matter if it is ON or OFF set it to OFF whenever you press ENTER

Remember, with this you will never be able to enter a 3 digit channel number.
_________________
Nils
Files Section
Diagnosis File Section
Back to top
View user's profile Send private message Send e-mail
friendlyfire



Joined: 21 Nov 2005
Posts: 55

                    
PostPosted: Sat Nov 26, 2005 2:01 pm    Post subject: Reply with quote

didn't see your reply until after I coded it. Your logic is basically the way I am doing it. Good news, it works. I can submit a 3 digit channel by preciding the sequence with a shift by the way.

The problem with not having a timer is that if a number key is pressed and then the remote put down for a while it still remembers the state indefinitely, so I know there will be times that the control appear to send an enter after only one press.

Bad news, I discoved this hack slows the response of the channel entries ny enough that I prefer to leave it the way it was.
I learned a lot in the process so it was not a waste of time. TT is far simpler to use than I expected .
thanks
Back to top
View user's profile Send private message Send e-mail
gfb107
Expert


Joined: 03 Aug 2003
Posts: 3411
Location: Cary, NC

                    
PostPosted: Sat Nov 26, 2005 2:06 pm    Post subject: Reply with quote

It might be worth trying this using an extender, which significantly speeds up macro execution.
_________________
-- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST)
Back to top
View user's profile Send private message Visit poster's website
friendlyfire



Joined: 21 Nov 2005
Posts: 55

                    
PostPosted: Sat Nov 26, 2005 8:30 pm    Post subject: Reply with quote

I'm using an 8811 with the version 3.3 extender. It might be possible to opitimize the code so I'll probably take another look at it at some poiint
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - General Forum All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control