I am having problems when I set hyperfocal distance on the SX30. I am using almost identical scripts on SX30 and SX220HS, and I only have this issue on the SX30. I set focus to the hyperfocal distance at zoom step 0, and after maybe one in 5 power cycles (autocycles every 4 hrs) the focus sets to minimum instead. I had this problem at other zoom steps too.
For example images you can see here (timelapse on a river):http://www.flickr.com/photos/usgs_elwhacams/sets/72157631807258313/
(power cycle triggers uploads from the eye-fi card over a mifi 2200).
I think the problem is here:
local p = get_prop(props.FOCUS_MODE)
if p == 1 then
print "Manual focus (MF) found"
while p ~= 1 do
p = get_prop(props.FOCUS_MODE)
print "Focus set to manual (MF)"
local focused = false
hyFo = get_dofinfo().hyp_dist
print("focusing to hyperfocal distance")
focused = true
But I attached the whole script in case anyone is curious. CAUTION. THIS SCRIPT WILL DELETE IMAGE FILES IF MEMORY CARD HAS < 512 MB FREE SPACE.
I am heading to the site to try to add a sleep(1000) between hyFo = get_dofinfo().hyp_dist
but I would love to know how/if I can just focus to infinity instead.
I think infinity on the SX30 needs to be set to a large value. According to (this post
) by Philmoz, Infinity = 4294967295 (0xFFFFFFFF), and CHDK treats the value as a signed int so displays it as -1.
Does that mean that I would say set_focus(4294967295) or set_focus(-1) or set_focus(0xFFFFFFFF)?