prevent S90 focus resetting when LCD turns off? - Script Writing - CHDK Forum  

prevent S90 focus resetting when LCD turns off?

  • 4 Replies
  • 2576 Views
*

Offline esmail

  • *
  • 15
  • Canon S90
prevent S90 focus resetting when LCD turns off?
« on: 28 / October / 2011, 07:44:07 »
Advertisements
Hi all,

Totally new to CHDK - but very impressed.

Is it possible to disable the autofocus on the S90? Or, to ask the question another way, once I set the focus manually to infinity, keep it there between shots, even if the LCD turns off due to powersave? I don't want the camera to (re)focus to something closer next time, even if there is something closer to the camera. (The camera is never off between shots). I am running of batteries, so I do want the LCD to go off to give me more shooting time.

If so, I haven't been able to do so, perhaps someone can help?

Is there a CHDK function that allows one to set and keep focus at infinity?

More details below:

I think I know how to lock the focus for one shot but not repeated shots.

Here's the situation: I often will shoot images from inside, either from behind a fine mesh net or windows. In order to make them mostly "disappear" I focus to infinity with a relative large aperture.

Example:

When I set the camera up with MF to infinity, the first shot is fine, but subsequent shots end up with the focus being on the window and/or screen, leaving everything outside blurry :-( .. so I have sharp water drops on the window, but blurry buildings outside.

I have been playing with the very nice CHDK Lightning script by Fudgey to catch images of lightening for instance. First image of lightning through the window is sharp, after that, sharp window, out of focus lightning. Is there a way to modify this script to keep the fous at infinity? I imagine this would be useful for many.

I haven't tried, but I suspect the same problem may exist with the time lapse script if the interval is large enough for the LCD to turn off.

I want the focus to stay on infinity.

I can start the camera up in (C)ustom mode with AV set to MF infinity, but again the same problem happens between shots.

I *really* like my S90 - if I can figure out how to do this, I'll be happy :-)

Thanks,

Esmail

PS: I was also looking for a way to turn of the LCD while running this script, the only "trick" I found for it to stay off between shots is to plug in the AV cable .. that seems to work. Is there another way?

*

Offline fe50

  • ******
  • 3105
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: prevent S90 focus resetting when LCD turns off?
« Reply #1 on: 29 / October / 2011, 08:30:48 »
Something to test with your S90 ;)

a) assign the "Sleep" (ZZzz) function to the PRINT/SHORTCUT buton from the Canon menu,
    this way you can disable the display & the sensor electronics completely to save power.
    The camera will "wake up" again after an image is captured, any button is pressed or the camera is moved...

b) With this, set up the camera, e.g. to Av mode, MF on, focus set manually - capture a test image...
c) Now press PRINT for ~ 1s to enter power safe mode, display & sensor will be disabled now
d) Press PRINT, the cam awakes, MF mode is disabled - but the distance settings should still be set
    -> do not press any button or change any setting, don't press the shutter in this sep !
e) Activate MF again with the corresponding button

Now the cam should use the focus distance you've set before...

If this scenario is working, a script which emulates these steps should be not a big problem...

*

Offline esmail

  • *
  • 15
  • Canon S90
Re: prevent S90 focus resetting when LCD turns off?
« Reply #2 on: 30 / October / 2011, 22:43:08 »
Hi fe50,

Sorry, just saw this message, I guess I didn't set notify for this thread (is there a way to set this by default for any thread I create or post in? I looked in the profile but didn't see a setting)


Something to test with your S90 ;)

a) assign the "Sleep" (ZZzz) function to the PRINT/SHORTCUT buton from the Canon menu,
    this way you can disable the display & the sensor electronics completely to save power.
    The camera will "wake up" again after an image is captured, any button is pressed or the camera is moved...

Right now I am using this button on my S90 to enter the ALT mode, how would I get to that mode if I reassigned this button (or am I misunderstanding this?)

Quote

b) With this, set up the camera, e.g. to Av mode, MF on, focus set manually - capture a test image...
c) Now press PRINT for ~ 1s to enter power safe mode, display & sensor will be disabled now
d) Press PRINT, the cam awakes, MF mode is disabled - but the distance settings should still be set
    -> do not press any button or change any setting, don't press the shutter in this sep !
e) Activate MF again with the corresponding button

Now the cam should use the focus distance you've set before...

If this scenario is working, a script which emulates these steps should be not a big problem...

So are you saying that since the script won't press any buttons MF should stay at infinity? But what if the script executes a half-shoot? Isn't that equivalent to pressing a button?

I have been playing around with this some more .. what I found that works at least for shooting w/o a script (ie prevening MF infinity of getting reset when powersave turns off the LCD) is to override Subject Distance with the maximum value. That seems to stick regardless if the powersave comes on, or if I change from AV, TV or M .. so this is great.

If I wanted to modify the Lightning script, or the intervalmeter is there a way for me to do this programatically? That way I would only have to figure out where to put whatever command would let me set the focus to infinity in both of those scripts and I'd be ok :)

Also, I seem to remember reading that if I override some value, that any script I execute subsequently will use the value that was overridden? Is that true?  It seems that in that case I'd not even have to modify either of the scripts as long as I remembered to do this.

Am I on the right track here? Sorry for all these questions.

I have to say, CHDK is a tremendous tool, I am very grateful for those who developed this and made it available for us to use.

Esmail

*

Offline fe50

  • ******
  • 3105
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: prevent S90 focus resetting when LCD turns off?
« Reply #3 on: 31 / October / 2011, 04:06:29 »
(is there a way to set this by default for any thread I create or post in? I looked in the profile but didn't see a setting)
Go to the "Profile" tab, select "Modify Profile" -- "Notifications" there...

Quote
Right now I am using this button on my S90 to enter the ALT mode, how would I get to that mode if I reassigned this button (or am I misunderstanding this?)
* Short button press = ALT key (CHDK function)
* Long (~1s) button press = original Canon key
* In a script the original Canon key (with the assignement you've choosen in the Canon menu) is used

Quote
So are you saying that since the script won't press any buttons MF should stay at infinity?
Correct

Quote
But what if the script executes a half-shoot? Isn't that equivalent to pressing a button?
Yes, that's why the first action after wake up must be activating MF again...


You can set any CHDK override either from the CHDK menu or with the corresponding script menu;
when you've set an override, e.g. a fix Tv value, this setting will always be used while CHDK is running (and the override is active).

Some links for you:
* http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad
* http://chdk.wikia.com/wiki/Script_commands
* http://chdk.wikia.com/wiki/LUA/LUA_Reference
« Last Edit: 31 / October / 2011, 04:08:32 by fe50 »


*

Offline esmail

  • *
  • 15
  • Canon S90
Re: prevent S90 focus resetting when LCD turns off?
« Reply #4 on: 31 / October / 2011, 08:03:59 »
(is there a way to set this by default for any thread I create or post in? I looked in the profile but didn't see a setting)
Go to the "Profile" tab, select "Modify Profile" -- "Notifications" there...

Duh .. makes me feel stupid, I'm not sure why I didn't see this ... while I'm not familiar with this particular forum software, I have been doing this sort of thing from waaaay back, when BBS and usenet were the rage, and countless current forums since.  I must have been sleepy or something .... this setting is exactly where it ought to be. Sheesh.

Thanks for the explanation on how the PRINT/SHORTCUT key works, I didn't realize there was a timing issue involved in the keypress, makes sense.

Quote
You can set any CHDK override either from the CHDK menu or with the corresponding script menu;
when you've set an override, e.g. a fix Tv value, this setting will always be used while CHDK is running (and the override is active).

Thanks for confirming this ... good to know.

Quote
Some links for you:
* http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad
* http://chdk.wikia.com/wiki/Script_commands
* http://chdk.wikia.com/wiki/LUA/LUA_Reference

I had the first and last of these, but the one in the middle is new - thanks.

There seem to be many ways to set and keep the focus, including af_lock(), maybe set property,  .. if you wanted to set the focus at infinity programatically, how would you do it? Subject distance must be a 16-bit register given its max value I guess.

Seems like

      set_focus 65535

would be the way to go?


CHDK is awesome, but it definitely has a learning curve :)

 
« Last Edit: 31 / October / 2011, 11:24:52 by esmail »

 

Related Topics