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

Global Long Key Presses (TV/1106)?

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



Joined: 26 Mar 2005
Posts: 9
Location: Castro Valley, CA

                    
PostPosted: Mon Mar 28, 2005 7:46 pm    Post subject: Global Long Key Presses (TV/1106)? Reply with quote

I have a URC-6131 w/JP1 and 8K EPROM, running the 6131 extender.

I have programmed a macro into the "shifted" version of each device button (CBL/SAT, DVD, VCR, AUD) to switch to the corresponding device. For instance, <SET> + <SAT/CBL> switches my TV to component input 1 (from the cable box), and my HT system to the auxillary sound input (also from my cable box).

Then, I discovered the LKP device in the extender (TV/1106), and decided to have some fun with it. Basically, I want:
- a short press on each device button to behave like the unextended device buttons, i.e. to only set the device mode of the remote control
- a long press on each device button to run my Shift-<button> macros, as described above.

Similarly, I want a short press on the Power button to switch on/off only the current device, and a long press to switch off all devices (much like the original 6131 power macro).

The problem I face is that the LKP protocol is local to each device mode. So while the remote is controlling the CBL/SAT device, I need one TV/1106 keymove for each device button, another set of keymoves for the DVD mode, and so on.

As an example, to get the desired short/long device press for the "CBL/SAT" button, I currently have:
Code:

   Device     Key        ->  Code       Hex Command           Notes
   TV         CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT
   CBL/SAT    CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT
   PVR        CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT
   AUD        CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT
   VCR        CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT
   DVD        CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT


All in all, I currently have 42 keymoves (6 control modes * 6 device buttons, plus 6 control modes * power) associated with this functionality. While this works, I would love to be able to eliminate this duplicated code/byte usage.

Ideas, anyone?
Back to top
View user's profile Send private message Send e-mail
mtakahar
Expert


Joined: 03 Aug 2003
Posts: 281

                    
PostPosted: Tue Mar 29, 2005 12:16 am    Post subject: Reply with quote

Keep only one of these key moves and create a regular macro with an X_ command to swtich to the device then execute the key move.
There's an example in the LDKP readme file.

Hal
Back to top
View user's profile Send private message
Hlorri



Joined: 26 Mar 2005
Posts: 9
Location: Castro Valley, CA

                    
PostPosted: Tue Mar 29, 2005 3:23 pm    Post subject: Thanks! Reply with quote

Thank you, Hal!

For some reason, I had assumed that a LKP key could not be executed from within a macro (perhaps after a half-hearted attempt at getting this to work at some point in the past).

I now did what you suggested, and it works great! My device buttons now execute macros like:
SAT/CBL -> <T_SAT> <O_SAT> <Shift-CBL/SAT>

In turn, the shifted version of these now contain LKP functions to set up inputs/outputs for the corresponding unit (essentially replacing my previous macros):
Shift-SAT/CBL -> [TV/1106] $40 $63 $D5 $73 $13 $93 $6B $1F $15 $07 $7F

However, the one remaining issue is the Power button. I cannot get a "short" press to send a power signal to the active unit using this method, because the LKP is bound to a specific device button (I use the "PVR" button, but it could just as easily be one of the phantom "dev7" or "dev8" buttons), so the macro will look like this:
Power -> <X_PVR> <Shift-Power> <X_Cancel>

In essence, a short press will send a power signal to the PVR device, no matter which device is currently active.

So, I am still stuck with the following keymoves for the Power button:
Code:

DEVICE   BUTTON  ->  SETUP CODE   HEX COMMAND
TV       Power   ->  TV/1106      $41 $83 $63 $83 $5F $83 $6B $83 $7F
CBL/SAT  Power   ->  TV/1106      $41 $83 $63 $83 $5F $83 $6B $83 $7F
PVR      Power   ->  TV/1106      $41 $83 $63 $83 $5F $83 $6B $83 $7F
VCR      Power   ->  TV/1106      $41 $83 $63 $83 $5F $83 $6B $83 $7F
DVD      Power   ->  TV/1106      $43 $6B $83 $7F $63 $83 $5F $83 $6B $83 $7F
AUD      Power   ->  TV/1106      $43 $6B $83 $7F $63 $83 $5F $83 $6B $83 $7F


(In DVD and AUD mode, I execute VCR->Power, since these three modes actually control the same physical Home Theatre box).

In any case, thanks a lot for your reply - it did help quite a bit!

Tor
Back to top
View user's profile Send private message Send e-mail
mtakahar
Expert


Joined: 03 Aug 2003
Posts: 281

                    
PostPosted: Wed Mar 30, 2005 12:57 am    Post subject: Reply with quote

Adding X_Cancel before the shift-power on the short side doesn't work?

You could save some more space by assigning the long side sequence to a phantom key then put the phantom key in the long side.

Hal
Back to top
View user's profile Send private message
Hlorri



Joined: 26 Mar 2005
Posts: 9
Location: Castro Valley, CA

                    
PostPosted: Wed Mar 30, 2005 1:32 am    Post subject: Reply with quote

Duh.

Sorry for these inane questions - I really ought to take a step back and look at the problem from different angles now and then.

Yes, I suppose a X_Cancel would work right-before the Power button in the short key sequence. I'll try it now.

OTOH, I am not sure which is less "ugly": Repeating the LKP code for the same button in all modes, as I have done, or breaking good encapsulation practices by embedding an X_Cancel code for a X_<device> selection done outside the context of the LKF. The latter sort of reminds me of "GOTO" statements from the Bad Old Days of BASIC programming... Confused

(I guess such scruples are the reason I'm not where Bill Gates is today.. Rolling Eyes )
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 - Extenders 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