View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun May 02, 2010 5:02 am 
Offline
Joined: Mon May 24, 2004 10:49 pm
Posts: 112
Location: Calgary, Alberta, Canada
If I understand the Lirc documentation correctly, it is possible produce multiple commands with a single button press.

It looks like you can include several config = ... lines, and they will run in sequence. I don't see an obvious way put a pause between those commands.

I've figured out a somewhat convoluted way to achieve this. Using the "mode = " line seems almost like calling a subroutine (defined by a "begin modename" / "end modname" pair located above the definition for the button).

If I had that mode run irexec and shell out to a "sleep" command, I think that would achieve my goal.

I think the code would look something like this:
Code:
begin wait_5
#The "mode" subroutine block
  begin
     prog = irexec
     button = A-B
     config = sleep 5
     flags = mode
     # I think the flags line causes it to exit the mode
     # ie exit the subroutine, once the command is completed
  end
end wait_5

begin
   prog = mythtv
   button = A-B
   #   DVD Root Menu jump point configured as keystroke
   config = Shift+Ctrl+F9
   mode = wait_5
   config = Enter
end


While it looks good in theory, it doesn't work

What I'm trying to achieve to start playing a DVD iso file, Press the A-B button to jump to the DVD's root menu (skipping the copy warning, and previews), wait a few seconds for that menu to appear, then select the default menu choice (which is usually Play the Movie).

Is my understanding of the code correct? Is there a better way to insert that pause? Is there a better way to achieve my goal of playing the main movie semi-automatically?

I also have the impression that each button press begin/end groups should end with a "flag = quit" so lirc doesn't waste time processing the rest of the file. I've not seen that used in any of the samples I've looked at. Am I out to lunch on that point?


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 4 guests


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 post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu