KAP & UAV Exposure Control Intervalometer Script - page 100 - Completed and Working Scripts - CHDK Forum

KAP & UAV Exposure Control Intervalometer Script

  • 1068 Replies
  • 409625 Views
*

Offline reyalp

  • ******
  • 14080
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #990 on: 04 / December / 2018, 17:20:42 »
Advertisements
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.
Yes. When you set_focus (or AF on a distant object, or use Canon MF, on cameras that have it) beyond a certain (camera / zoom dependent) distance, you start getting -1 back from get_focus.

This does not necessarily mean that it's the focus setting that gives the best focus for distant objects, and at lest in the Canon MF case, there can be many focus positions beyond where get_focus starts returning -1.
Don't forget what the H stands for.

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #991 on: 04 / December / 2018, 19:52:02 »
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 ?
If it is true that puts an end to the auto lens retract idea  :-[


Waterwingz, would you want to see the battery gimmick I added ? In case you'd like to use it.

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #992 on: 04 / December / 2018, 21:01:11 »
Waterwigz I tested that with a small script I made that just looped and read get_focus().
Did your script do "half press" requests to make the camera refocus between each call to get_focus() ?

Quote
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 ?
I spent a lot of time working and reworking the MF stuff in CHDK. One of my conclusions over time was that while most cameras could be tricked into setting a fixed focus point, the calibration on the models that do not offer true MF under Canon control is pretty much non-existent.  The functions to set focus are in the code but somehow not calibrated - or at least the lens mechanism goes to some fixed position but Canon made no attempt to make that position represent the focus distance requested. 

I would expect the same lack of calibration exists with get_focus( ) too.

I gave some thought to adding a manual calibration function to CHDK so that a user could adjust where CHDK tells the Canon firmware to position the lens for each requested real distance.  It's on my "someday" list as actually performing the calibration would be slow, finickity, and tedious.

Quote
Waterwingz, would you want to see the battery gimmick I added ? In case you'd like to use it.
Sure.  Although I'm not sure every CHDK camera can actually produce sounds - I'm pretty certain some of mine don't.
« Last Edit: 04 / December / 2018, 21:07:09 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14080
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #993 on: 04 / December / 2018, 23:33:36 »
reyalp .. is it normal that it maxes out so quick ? Or could get_focus() be inconsistent ?
My SX710 goes to -1 around ~4000 at full wide. The point where it changes seems to vary, while I was playing around with manual control sometimes it would go to 4400 and sometimes 3900. At longer zooms, the values go much higher.

This .txt https://app.box.com/s/83xz0ltib3v5ebq6m8edlpn8ju2c4wcb is a log from testing elph180 with chdkptp. Between the 2nd and 3rd runs, I zoomed the lens in and back out to fully wide. (linked because attachments seem to be broken at the moment)
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)

According the ixus125_elph110hs platform_camera.h, SD override is only supported with set_mf or set_aflock.

edit: I assumed the script was doing set and get, if it's like waterwingz described, then disregard this.
« Last Edit: 05 / December / 2018, 00:23:53 by reyalp »
Don't forget what the H stands for.


Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #994 on: 05 / December / 2018, 00:12:12 »
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.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #995 on: 06 / December / 2018, 06:08:26 »
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.

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().


At longer zooms, the values go much higher.


Hmmm, maybe if I'd get the camera to zoom in I could get more distance before -1 appears.
Thus being able to use it for the before landing lens retract. Though zooming in and out does sound a bit of
a hassle I will probably give it a go.


Sure.  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 ?
For anybody who wants to try it I have attached. There are other small changes too.

*

Offline reyalp

  • ******
  • 14080
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #996 on: 06 / December / 2018, 13:18:43 »
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().
That makes sense. A lot of values only update on half press even if the underlying state updates continuously, but this doesn't apply to get_focus. Beware that continuous AF will prevent CHDK focus overrides from working.

Quote
Sure.  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 ?
AFAIK all powershots have sounds. The one tricky bit is if you mute sounds in the menu, it also mutes play_sound.
Don't forget what the H stands for.

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #997 on: 06 / December / 2018, 13:50:21 »
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 ?

Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 14080
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #998 on: 06 / December / 2018, 16:28:27 »
For 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.
Don't forget what the H stands for.

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #999 on: 06 / December / 2018, 16:40:02 »
For 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.
So the value returned by get_focus( ) only updates after a half_press unless you are using continuous AF mode, and in that case it updates continuously ?
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics