manual focussing - General Help and Assistance on using CHDK stable releases - CHDK Forum

manual focussing

  • 14 Replies
  • 6055 Views
*

Offline timgor

  • ***
  • 150
manual focussing
« on: 19 / January / 2015, 10:07:13 »
Advertisements
I tried to test set_focus() function on A1400 and elph115 cameras.
It works good on A1400 but not for elph115. What is the problem? Is it particular problem of elph115 or we can fix it?
My basic problem is that it cannot setup automatic focusing  in a low light condition so I want to use manual focus to setup infinity.

*

Offline srsa_4c

  • ******
  • 4451
Re: manual focussing
« Reply #1 on: 19 / January / 2015, 10:27:31 »
I tried to test set_focus() function on A1400 and elph115 cameras.
It works good on A1400 but not for elph115. What is the problem?
Please execute this test (once without, once with the "shoot full" option): http://chdk.wikia.com/wiki/Testing#mftest.lua
Others have already done this, but no changes have been made to the port.
(AFAIK the elph115 port is a "blind" port, it was done without access to the camera.)

*

Offline timgor

  • ***
  • 150
Re: manual focussing
« Reply #2 on: 19 / January / 2015, 12:58:10 »
not clear... This function doesn't work on this camera or focus can be setup in other way?
I just performed the tests. Files attached. 0-means shoot half and 1-means shoot full.

*

Offline srsa_4c

  • ******
  • 4451
Re: manual focussing
« Reply #3 on: 19 / January / 2015, 15:03:46 »
not clear... This function doesn't work on this camera or focus can be setup in other way?
I just performed the tests. Files attached. 0-means shoot half and 1-means shoot full.
That's odd. None of the available methods work?
The porting thread has some earlier results, with some methods succeeding. The difference seems to be that those were done with continuous AF enabled.

The definitions that control the availability of set_focus are:
Code: [Select]
    #define CAM_SD_OVER_IN_AF               1
    #define CAM_SD_OVER_IN_AFL              1
    #define CAM_SD_OVER_IN_MF               1
in platform_camera.h. The first allows set_focus when the camera's focus is not locked in any way. The second allows set_focus when AF is locked on camera. The third allows set_focus when camera is set to MF (this can't be done with the Canon UI on this model), this one also requires some camera specific support code when enabled.

*

Offline timgor

  • ***
  • 150
Re: manual focussing
« Reply #4 on: 19 / January / 2015, 15:29:07 »
Yes, something strange. So you think that method set_focus() should work for this model?
Today morning I started to suspect that something wrong with my camera (may be hardware) because I just performed simple shot of landscape in a clear sunny day and it cannot focus to infinity. I just ordered a new one. I will perform the same tests after it will arrive and publish it here.
By the way is it possible that that sort of failure would happen because of Canon firmware failure?
Did you have any experience with firmware failure?

*

Offline srsa_4c

  • ******
  • 4451
Re: manual focussing
« Reply #5 on: 19 / January / 2015, 16:01:31 »
Yes, something strange. So you think that method set_focus() should work for this model?
I don't know. That old testing data seems to indicate some focusing success. However, CHDK won't allow set_focus() to succeed unless at least one of the previously mentioned #defines is present in platform_camera.h .
Quote
By the way is it possible that that sort of failure would happen because of Canon firmware failure?
Not sure what kind of firmware failure do you mean. If the firmware is dangerous to the hardware in any way then Canon would release a firmware update to correct it. This model has no published fw updates. Perhaps corruption of the firmware stored in flash ROM would also qualify as "firmware failure". If you suspect that, dump your camera's firmware and compare it to the other published firmware images. (Note that the camera's flash ROM also stores camera specific factory calibration data and camera settings, so the dumps will always be different.)

*

Offline timgor

  • ***
  • 150
Re: manual focussing
« Reply #6 on: 19 / January / 2015, 23:28:55 »
Hmm, I checked  platform_camera.h and #defines are not there.
Why is it? Did they forget to commit the #defines or they are not there for special reason?
May be I don't understand something.

Re: manual focussing
« Reply #7 on: 19 / January / 2015, 23:57:25 »
Hmm, I checked  platform_camera.h and #defines are not there. Why is it? Did they forget to commit the #defines or they are not there for special reason? May be I don't understand something.
It's too much work to try and recreate the time sequence,  but based on the lack of values on the right hand side for the ixus132 in the MF testing spreadsheet ,  it seems that the testing data for that camera was added after I submitted the patch for MF in 1.3.0.

So the #define are missing - they were not added when the port was added.   Curiously, the necessary routines for MF mode are in the ixus132_elph155/wrappers.c file.  So it's also possible I just missed one camera when I patched 1.3.0

Either way,  adding the #define is necessary now.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline timgor

  • ***
  • 150
Re: manual focussing
« Reply #8 on: 21 / January / 2015, 21:28:11 »
Please let me know what I'm doing wrong.
I just added three lines
    #define CAM_SD_OVER_IN_AF               1
    #define CAM_SD_OVER_IN_AFL              1
    #define CAM_SD_OVER_IN_MF               1
into
platform_camera.h
file.
I get crash when I try to perform focusing test with set_focus().
Why did the test worked before for other user?

Re: manual focussing
« Reply #9 on: 21 / January / 2015, 21:43:39 »
Please let me know what I'm doing wrong. I just added three lines
    #define CAM_SD_OVER_IN_AF               1
    #define CAM_SD_OVER_IN_AFL              1
    #define CAM_SD_OVER_IN_MF               1
into platform_camera.h file.

Sorry - I should have been more explicit.  Based in the result posted in the spreadsheet I linked here earlier, you should only add this :

Code: [Select]
    #define CAM_SD_OVER_IN_AFL              1
    #define CAM_SD_OVER_IN_MF               1
The associated code in wrapper.c for your camera looks correct.

Note that this will prevent set_focus() from working (and thus from crashing) if you try to use it without a set_aflock(1) or set_mf(1) command before it.

Quote
Why did the test worked before for other user?
It didn't.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal