Still have problems with lens.focus? Does the API test work correctly?
printf("Focus distance: %s\n", lens.focus_distance)
-- note: focus direction is not consistent
-- some lenses will focus to infinity, others to macro
printf("Focusing backward...\n")
while lens.focus(-1,3,true) do end
printf("Focus distance: %s\n", lens.focus_distance)
msleep(500)
for i,step in pairs{3,2,1} do
for j,wait in pairs{true,false} do
printf("Focusing forward with step size %d, wait=%s...\n", step, wait)
local steps_front = 0
while lens.focus(1,step,true) do
printf(".")
steps_front = steps_front + 1
end
printf("\n")
printf("Focus distance: %s\n", lens.focus_distance)
msleep(500)
printf("Focusing backward with step size %d, wait=%s...\n", step, wait)
local steps_back = 0
while lens.focus(-1,step,true) do
printf(".")
steps_back = steps_back + 1
end
printf("\n")
printf("Focus distance: %s\n", lens.focus_distance)
msleep(500)
printf("Focus range: %s steps forward, %s steps backward. \n", steps_front, steps_back)
end
end
printf("Focus test completed.\n")
If not, does it work correctly on some camera/lenses and not on others? Which ones?
(It works fine here on 60D)