ultimate intervalometer script - General Help and Assistance on using CHDK stable releases - CHDK Forum
supplierdeeply

ultimate intervalometer script

  • 6 Replies
  • 6370 Views
*

Offline timgor

  • ***
  • 150
ultimate intervalometer script
« on: 18 / July / 2013, 10:40:02 »
Advertisements
Question about the "ultimate interferometer" script written by waterwingz:
Did you have a problem with the reboot() function?
I'm trying to apply reboot() function periodically in my script just with the following code:
Code: [Select]
set_record(0)
sleep(5000)
reboot()

it works good for about 100 times and then crashes with the lens out.
Did you have the problem?
Does the ultimate interferometer have something special to prevent this crash? 

Re: ultimate intervalometer script
« Reply #1 on: 18 / July / 2013, 11:15:58 »
The script puts the camera into playback mode and waits two minutes to be sure the lens has retracted prior to the reboot.  The docs in the wiki implies the function might not be completely stable but it's been okay for me so far. YMMV.
« Last Edit: 18 / July / 2013, 11:17:31 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline timgor

  • ***
  • 150
Re: ultimate intervalometer script
« Reply #2 on: 18 / July / 2013, 11:21:20 »
So, did you see the problems when you put less than 2 minutes (like 5 seconds) or you just never did that?
Is there any way to click "Alt" button directly from the script?
« Last Edit: 18 / July / 2013, 11:24:43 by timgor »

Re: ultimate intervalometer script
« Reply #3 on: 18 / July / 2013, 12:04:53 »
So, did you see the problems when you put less than 2 minutes (like 5 seconds) or you just never did that?
That script was a lot of work to get pulled together and tested.  I didn't spend a lot of time on the reset function beyond making it possible to only do it occasionally  (i.e. every few days) as I did not totally trust it based on the wiki comments.   The delay to wait for the lens to retract was coded in right from the start.

Quote
Is there any way to click "Alt" button directly from the script?
Off the top of my head (i.e. not tested)...   click("print") ?   Or enter_alt() & exit_alt() ?
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: ultimate intervalometer script
« Reply #4 on: 18 / July / 2013, 13:08:55 »
Only exit_alt() does this job.

msl
CHDK-DE:  CHDK-DE links

*

Offline timgor

  • ***
  • 150
Re: ultimate intervalometer script
« Reply #5 on: 18 / July / 2013, 15:32:24 »
exit_alt() doesn't switch to playback mode when you call it from the sript. Right?

waterwingz, 2 more questions:
1.   If you wait for 2 minutes after set_record(0) then what is the role of
Code: [Select]
while ( get_mode() == true ) do sleep(100) end?

2.  Is the get_mode() supposed to be true only after the lens is mechanically retracted? will it be true or false if something went wrong after set_record(0) and lens got stuck?

*

Offline reyalp

  • ******
  • 14117
Re: ultimate intervalometer script
« Reply #6 on: 18 / July / 2013, 16:23:07 »
exit_alt() doesn't switch to playback mode when you call it from the sript. Right?
No, it just takes CHDK out of alt mode. This is affects the OSD and how key presses are handled, along with the rest of the normal alt mode behaviors. Outside of alt mode, scripted key presses do not work, but physical key presses on the key pad should be interpreted normally.

Quote
2.  Is the get_mode() supposed to be true only after the lens is mechanically retracted? will it be true or false if something went wrong after set_record(0) and lens got stuck?
No, get_mode is not aware of this. Most cameras have an option in the Canon firmware for lens retract delay, so even if we knew how, it would be incorrect for get_mode() to wait until the lens was retracted to report the camera in the "play" state. There are some eventprocs (on some cameras at least) which report and control the lens retract state. See
http://chdk.setepontos.com/index.php?topic=6857.msg73227#msg73227
http://chdk.setepontos.com/index.php?topic=9287.msg95743#msg95743

Waiting for get_mode to change in script is a good idea because the state change may not have completed when the set_record function returns. If the script wants to be sure it's in a specific state before it continues (for example, to send key presses that depend on being in record or play) then it should wait.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal