LinHES Forums
http://forums.linhes.org/

Lirc - Insert Pause between multiple commands
http://forums.linhes.org/viewtopic.php?f=25&t=21033
Page 1 of 1

Author:  ChapmanI [ Sun May 02, 2010 5:02 am ]
Post subject:  Lirc - Insert Pause between multiple commands

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?

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/