I have try this in lua and it always get different results.
I am trying to set the focus to infinity and lock it there,
but sometimes f returns 65535 and sometimes it returns something like 634 or less.
I have tried different combinations but it is always inconsistent.
-- set_prop(6, 4) -- Manual focus
print("Set to infinity")
set_prop(6, 3) -- Infinity
-- set_focus(65535) -- Infinity
sleep(2000)
set_aflock(1)
sleep(1000)
press("shoot_half")
sleep(1000)
press("shoot_full")
sleep(1000)
release("shoot_full")
release("shoot_half")
sleep(1000)
set_aflock(0)
f = get_focus()
print("FL at:", f)
print("")
sleep(2000)