Hello to everyone:

I recently got myself a new TV set to find out that the new tv remote
control interacted with the ir sensor I have in my freevo box. After trying
a lot of things in order to avoid this side-effect I decided to make a
change in freevo itself, and I think it could be useful for other people.
It's something like a remote key lock/unlock feature.

When the remote is locked no remote key is processed, until it's unlocked.

Here is the patch (I might have done the patch wrong, it's the first time I
make one, so please fix it if it's wrong).

--------------------------

--- rc.py       2008-02-17 13:24:41.000000000 +0100
+++ rc.py       2007-11-18 20:49:50.000000000 +0100
@@ -179,8 +179,6 @@
         self.default_keystroke_delay1 = 0.25  # Config
         self.default_keystroke_delay2 = 0.25  # Config

-       self.keylock = False
-
         global PYLIRC
         PYLIRC = True

@@ -265,14 +263,8 @@
             self.lastkeystroke = nowtime
             self.repeat_count += 1

-           for code in list:
-               if code == config.KEYLOCK and not(self.keylock):
-                       self.keylock = True
-               if code == config.KEYUNLOCK and self.keylock:
-                       self.keylock = False
-               print self.keylock
-               if self.keylock == False:
-                       return code
+            for code in list:
+                return code


 #
--------------------------------------------------------------------------------
@@ -471,7 +463,6 @@
         self.inputs = []
         if use_pylirc:
             try:
-
                 self.inputs.append(Lirc())
             except:
                 pass

-------------

It uses two config variables in the local_conf.py (key labels in lircrc):
KEYLOCK   = 'INPUT'
KEYUNLOCK = 'Q.VIEW'

It would be very nice to have some visual feed back, something like a little
icon in the idle bar that shows when the remote is locked and unlocked, but
that goes far beyond my knowledge of freevo / python. Perhaps someone with
more experience could add this functionality.

Greetings
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to