Is it somehow possible to set/query mecha position from lua? (I'm willing to take the risk of damaging the camera)
Or is there some not-extremely-hard way to overwrite camera-given limits of focus value? (of course if there is a table which just ends too early then it does not help)
On the second question: I used zoom 0 where manual focus works. Located subject at to distance 300, 400 and 500 and half-pressed shutter until the focus indicator turned green. Then immediately red get_focus(). Here's what I got: 300 -> 260, 400 -> 320, 500 -> 380
It looks like values set by autofocus are somewhat constantly smaller than the actual distance. Probably not the source of the problem but might just make it worse.
Waterwingz theory matches with this test: I set zoom into 44. Lowest possible focus value seems to be 1014, which (assuming focus number equals subject distance) feels way too high. With half press, the camera is able to autofocus into subject at distance 400, producing nice sharp picture. And the camera still thinks the focus value is 1014 when queried by get_focus(). So it really looks like the camera has no clue about the actual distance, it just (intelligently) drives the focus motor back and forth until the centerpiece of the image is sharp enough.
I've attached an old short script that manually sets a focus position and then reads back the focus value and the mechanical position.
call_event_proc("FA.Create")call_event_proc("InitializeAdjustmentFunction")
I couldn't find any thing where I had actually set the mechanical position and tested the script. But here are a few links if you are feeling adventurous.
MoveFocusLensToPosition would likely be a sufficient workaround, but using it just hangs the camera. Maybe i160 does not have such function, at least the address not definened here
Did you look at all three function calls and experiment with the necessary parameters as posted here ?
First parameter of MoveFocusLensWithPosition is the position as reported by GetFocusLensCurrentPosition and second seems to be speed. 100 is fast, 10 is slow and leaving the parameter out is horribly slow, causing crash in larger movement (maybe some timeout)
For eventprocs, leaving the parameter out will just use whatever garbage happens to be in memory / registers, so you definitely don't want to do that.
Do you have any idea what MoveFocusLensWithPosition 3rd parameter could possibly be. Looks like after very long (focus-pos-searching) session camera starts to crash when position changed at max zoom. Probably due aforementioned garbage.
Quote from: reyalp on 22 / August / 2016, 21:36:12For eventprocs, leaving the parameter out will just use whatever garbage happens to be in memory / registers, so you definitely don't want to do that.Do you have any idea what MoveFocusLensWithPosition 3rd parameter could possibly be. Looks like after very long (focus-pos-searching) session camera starts to crash when position changed at max zoom. Probably due aforementioned garbage. Battery-off reboot fixes the matter
call_event_proc("MoveFocusLensWithPosition", a, 100)
Started by amavroidis « 1 2 ... 5 6 » General Discussion and Assistance
Started by STEREO_A Creative Uses of CHDK
Started by reyalp DryOS Development
Started by reyalp General Discussion and Assistance