A2500 porting thread - page 13 - DryOS Development - CHDK Forum  

A2500 porting thread

  • 154 Replies
  • 47828 Views
Re: A2500 porting thread
« Reply #120 on: 12 / January / 2014, 16:11:50 »
Advertisements
Thank you very much to all of you for all your great work.
I'll test this build and tell you how it went for me.

Odilon

Re: A2500 porting thread
« Reply #121 on: 13 / February / 2014, 12:27:20 »
Loving this build - except I'm having trouble getting set_focus to function at all.

set_aflock(1) works well (does in fact lock the focus); however, set_focus thereafter does nothing at all. I've tried enabling manual focus with set_prop(6, 4), and the camera does recognize that it is in manual focus mode, but still does not take the set_focus parameter.

Any suggestions?

Thanks!

Re: A2500 porting thread
« Reply #122 on: 13 / February / 2014, 16:51:05 »
set_aflock(1) works well (does in fact lock the focus); however, set_focus thereafter does nothing at all. I've tried enabling manual focus with set_prop(6, 4), and the camera does recognize that it is in manual focus mode, but still does not take the set_focus parameter
Any suggestions?
I'm still working on a general cleanup of set_focus() for all cameras.   Forum thread here : http://chdk.setepontos.com/index.php?topic=11078.0

For the A2500 the results tell me there are a number of things you can do with the current code.  However,  the camera will not set_focus() until PROPCASE_AF_LOCK is 1 and set_aflock(1) does not do that on its own.  So try adding set_prop( PROPCASE_AF_LOCK , 1) to your script right after doing a set_aflock(1)?

Ported :   A1200    SD940   G10    Powershot N    G16

Re: A2500 porting thread
« Reply #123 on: 14 / February / 2014, 13:20:48 »
Tried, and sadly, failed.

Here's my lua:

   set_aflock(1)
   sleep(2000)
   props=require('propcase')
   set_prop(props.AF_LOCK, 1)
   sleep(2000)
   set_prop(6, 4)
   sleep(2000)
   set_focus(1000)
   sleep(2000)

A get_focus() before and after reveal the same focus value. I have now also tried using the above lua after switching the camera to P mode, as well as with multiple half-shoots inbetween.

I feel like there must be something small that I'm missing... If you have any other suggestions, they would be greatly appreciated!


Re: A2500 porting thread
« Reply #124 on: 14 / February / 2014, 13:52:29 »
Just an FYI: I also have an A1400 and it exhibits the same behavior, not letting me use set_focus either. Tried the same things as above on it.

Thanks again.

Re: A2500 porting thread
« Reply #125 on: 14 / February / 2014, 17:30:02 »
   set_prop(6, 4)
You should not need this - try deleting it?


Quote
A get_focus() before and after reveal the same focus value. I have now also tried using the above lua after switching the camera to P mode, as well as with multiple half-shoots in between.
What happens if you do something like this
Code: [Select]
   set_aflock(1)
   sleep(2000)
   props=require('propcase')
   set_prop(props.AF_LOCK, 1)
   set_focus(1000)
   sleep(2000)
   shoot()
   sleep(2000)
   set_focus(10000)
   sleep(2000)
   shoot()

i.e.  actually take the shot ?

I'm away from my machine for a few more days so can't test on my A1200 but I'm pretty sure the above code will work.   

If you want to dig deeper,  take a look at the manual focus options tested in the script posted here :
http://chdk.setepontos.com/index.php?topic=11078.msg108859#msg108859
You will notice that the A2500 will in fact manually focus using that test script (although it requires a feature added to the 1.3.0 version of CHDK for the test code to work).  This is now a little behind, I need to update it,  but it has some "gems" : http://chdk.wikia.com/wiki/CHDK_Manual_Focus_and_Subject_Distance_Overrides

Update :  did you try manually putting the camera in AFL mode prior to doing a set_focus() ?  It's described on page 55 of the manual : http://gdlp01.c-wss.com/gds/8/0300010628/01/psa2500-cu-en.pdf

« Last Edit: 14 / February / 2014, 17:48:18 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: A2500 porting thread
« Reply #126 on: 16 / February / 2014, 00:31:54 »
waterwingz,

I still can't get it to work using this code either; however, the focus test script seems to function with the following option (all other methods fail or are unreliable):

 -- test using SS.Create event_proc to enter MF mode

I rearranged the lua to make a "set and snap" script, but it seemingly doesn't work outside of the test script.

Code: [Select]
   call_event_proc("SS.Create")
   call_event_proc("SS.MFOn")
   sleep(1000)
   set_focus(1000)
   sleep(2000)
   shoot()
   sleep(2000)
   set_focus(10000)
   sleep(2000)
   shoot()

I also attempted half-shoots prior to each shoot. Still nothing.

I need to send you a thank you card (or something else that is more awesome than a card).

Ideas? I'll keep messing with it to see if I can figure out what I'm doing wrong on my own.

Thanks again.

EDIT: Just figured out that by running the above, somehow, the camera sets the subject distance/focus to infinity (shows as -1 when calling get_focus() after running that code). I can't seem to get it to set to anything else though, quite strange.
« Last Edit: 16 / February / 2014, 00:54:03 by ricberw »

Re: A2500 porting thread
« Reply #127 on: 16 / February / 2014, 03:18:03 »
I still can't get it to work using this code either; however, the focus test script seems to function with the following option (all other methods fail or are unreliable):

 -- test using SS.Create event_proc to enter MF mode

I rearranged the lua to make a "set and snap" script, but it seemingly doesn't work outside of the test script.
That's quite strange as I have test reports that show at least four methods work. 

Did you update the version of CHDK you are using to the most recent release of 1.3.0? 

Can you please post the resulting log file from the root of your SD card?  ( a2500.csv )

Quote
I need to send you a thank you card (or something else that is more awesome than a card).
Wow - a reward for helping you get it not to work.  What do I get for making it actually work?  (just kidding)

Quote
EDIT: Just figured out that by running the above, somehow, the camera sets the subject distance/focus to infinity (shows as -1 when calling get_focus() after running that code). I can't seem to get it to set to anything else though, quite strange.
Well,  set_focus(10000) is about 33 feet.  Which on little point and shoot cameras is essentially infinity.  But I'm not saying its working.
« Last Edit: 16 / February / 2014, 03:19:39 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: A2500 porting thread
« Reply #128 on: 16 / February / 2014, 10:05:50 »
Heh - I'm a big supporter of the "operating expenses" part of nonprofits, so giving you a gift pre-fix is something I'm used to.

On another note, I'm using 1.3.0 3359 without any modifications.

I have attached a2500.csv with a few of the results.

I changed the 10000 to a variety of other numbers, and it still didn't change anything (500, 1000, 1500, 2000, 2500).

I'm not with my a1400's at the moment, but when I get to them tomorrow morning, I'll run it a few times and send over the csv for that one as well.

Thanks again!

EDIT: This is the latest lua I'm running (have the prints in there so I get a running update on the cam screen):

Code: [Select]
call_event_proc("SS.Create")
call_event_proc("SS.MFOn")
set_focus(1000)
f1=get_focus()
print("pre-shoot half")
print(f1)
sleep(1000)
press('shoot_half')
sleep(200)
f2=get_focus()
print("push-shoot half")
print(f2)
release('shoot_half')
sleep(1000)
f3=get_focus()
print("release-shoot half")
print(f3)
press('shoot_full')
sleep(200)
f4=get_focus()
print("post-full shoot")
print(f4)
release('shoot_full')
sleep(2000)
f5=get_focus()
print("post-full shoot release")
print(f5)
set_focus(2000)
f1=get_focus()
print("pre-shoot half")
print(f1)
sleep(1000)
press('shoot_half')
sleep(2000)
f2=get_focus()
print("push-shoot half")
print(f2)
release('shoot_half')
sleep(1000)
f3=get_focus()
print("release-shoot half")
print(f3)
press('shoot_full')
sleep(200)
f4=get_focus()
print("post-full shoot")
print(f4)
release('shoot_full')
sleep(2000)
f5=get_focus()
print("post-full shoot release")
print(f5)
« Last Edit: 16 / February / 2014, 10:26:09 by ricberw »

*

Offline nafraf

  • *****
  • 1308
Re: A2500 porting thread
« Reply #129 on: 16 / February / 2014, 11:19:55 »
EDIT: This is the latest lua I'm running (have the prints in there so I get a running update on the cam screen):
Please try the following, in Canon Menu set:
Servo AF [Off]
Continuous AF [Off]
Then run your script again.

 

Related Topics