Edit : I spent 10 minutes chasing through the get_focus() code hoping to see if -1 means "infinity" - which is my suspicion. Might be - ran out of time to chase it further. Sorry.
Waterwigz I tested that with a small script I made that just looped and read get_focus().
It works in a weird way since I seem to max out the focus at roughly 1m, even though reported value is 3353. reyalp .. is it normal that it maxes out so quick ? Or could get_focus() be inconsistent ?
Waterwingz, would you want to see the battery gimmick I added ? In case you'd like to use it.
reyalp .. is it normal that it maxes out so quick ? Or could get_focus() be inconsistent ?
Did your script do "half press" requests to make the camera refocus between each call to get_focus() ?
FWIW, this should not be needed if MF or AF lock is on (including set by set_mf or set_aflock if those work in the port)
if i understood the description of his script correctly, it just looped calling get_focus( ). No calls to set_focus( ). So with AFL or MF enabled, the focus distance should not change without a half-press.
At longer zooms, the values go much higher.
Sure. Although I'm not sure every CHDK camera can actually produce sounds - I'm pretty certain some of mine don't.
Yes, I only looped having half-press and having set the camera focus mode to continuous AF.This way the camera would refocus on every distance change. No need for set_focus().
Quote from: waterwingz on 04 / December / 2018, 21:01:11Sure. Although I'm not sure every CHDK camera can actually produce sounds - I'm pretty certain some of mine don't.I use the play_sound function. And use the built in canon sounds. I suppose most have them ?
A lot of values only update on half press even if the underlying state updates continuously, but this doesn't apply to get_focus.
For clarity then, the value returned by get_focus( ) only updates after a half_press ?
Quote from: waterwingz on 06 / December / 2018, 13:50:21For clarity then, the value returned by get_focus( ) only updates after a half_press ?No. I verified that the get_focus value updates continuously on SX710 in continuous AF mode, and I would expect it to be true of most/all other cameras.
Started by Jim
Completed and Working Scripts
Started by nadavofi
« 1 2 »
Started by Benny_H88
« 1 2 3 »
Started by davefolts
Creative Uses of CHDK
Started by GlobalSurvey
General Help and Assistance on using CHDK stable releases