How to turn off display and keep focus locked? - Script Writing - CHDK Forum

How to turn off display and keep focus locked?

  • 4 Replies
  • 6567 Views
How to turn off display and keep focus locked?
« on: 25 / January / 2009, 17:36:05 »
Advertisements
I'm trying to figure out how to turn off the display and keep the AFLock enabled or do something equivalent. Currently, as soon as "Display" is pressed, AFL is released. So I have to do it in a script.

The following code will not work if display is off (it will not set the AFL):
Code: [Select]
sleep 1000
press "shoot_half"
sleep 1000
click "left"
release "shoot_half"

My goal is to turn off the display and shoot at fixed focus to save both battery and mechanic.

Have any idea how to do that? I have a SD900 if that matters.

TIA
« Last Edit: 25 / January / 2009, 17:37:50 by MikeXM »

Re: How to turn off display and keep focus locked?
« Reply #1 on: 26 / January / 2009, 00:46:19 »
In the last revisions we had two changes that'll help ya: one command to disable the backlight (saving energy and preserving af) and focus lock which stays locked even after display off. Read the changelog for the exact commands.

Re: How to turn off display and keep focus locked?
« Reply #2 on: 04 / May / 2009, 20:00:42 »
My goal is to turn off the display and shoot at fixed focus to save both battery and mechanic.

Any luck with that? I'm in the same boat and have at least been able to trick the screen to go off by using the a/v cable, but I'd love to stop the autofocusing...
English doesn't borrow from other languages -- it knocks them down in dark alleys and rifles through their pockets for loose gramar.

Re: How to turn off display and keep focus locked?
« Reply #3 on: 04 / February / 2011, 06:17:47 »
Hello! I got focus lock by setting MF mode manually (but i still don't know how to do it from script).

I tried click("display") in order to turn off display but it doesn't act as expected. AV cable works but image sensor is still engaged in this case so energy economy is not as great is it could be. It is possible to turn all unnecessary parts between shots?

Thanks in advance.

Re: How to turn off display and keep focus locked?
« Reply #4 on: 04 / February / 2011, 12:37:55 »
I did like there (A540) http://chdk.wikia.com/wiki/LUA/Scripts:_Accurate_Intervalometer_with_power-saving_and_pre-focus

Code: [Select]
props = require "propcase"

........
........

function seek_display_mode(mode)
   if get_prop(props.DISPLAY_MODE) == mode then
      return false
   else
      click "display"
      return true
   end
end

original_display_mode = get_prop(props.DISPLAY_MODE)
target_display_mode = 2 -- off
if d == 1 then
   while seek_display_mode(target_display_mode) do
      sleep(1000)
   end
end

shoot_loop()

if d == 1 then
   while seek_display_mode(original_display_mode) do
      sleep(1000)
   end
end
if x == 1 then shut_down() end

and it acts as i desired except short time after shots while taken picture is displayed.

Can anyone tell me whether i achieved maximum possible power saving or not?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal