[SOLVED] Cannot change the af mode with my code

Started by Marsu42, April 08, 2013, 12:54:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marsu42

I can change drive, iso, metering, ae just fine - but the camera doesn't want to change the af mode ... any idea why?

lens_wait_readytotakepic(64);
new_af_mode = ONE_SHOT;
prop_request_change(PROP_AF_MODE, &new_af_mode, 4);
msleep(10);

Marsu42

OK, I got the wrong len - *that*s why my card is filling up with assert logs :-p

ML ASSERT:
PROP_LEN(80000004) correct:2 called:4
at ../../src/property.c:308 (prop_request_change), task tweak_task
lv:0 mode:1

Marsu42

Nope, still nothing - this is annoying, what am I doing wong? This also doesn't work:

lens_wait_readytotakepic(64);
new_af_mode = ONE_SHOT;
prop_request_change(PROP_AF_MODE, &new_af_mode, 2);
msleep(10);

g3gg0

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

1%

You're out of LV? There is an LV prop and a regular photo mode prop.

Marsu42

Ok, I've got it - the PROP_HANDLER for the af mode didn't get called, it was in a big #ifdef bracket I didn't see - and since no value was saved it never tried to restore it - doh. I guess that's what happens when you work with a shell and a text editor and are used to Visual Studio :-\ ... how do you work on ml, do you use an ide?

And yes, I saw that there are lv and non-lv af props, I installed handlers for both and it works fine now.

1%

I used to use pluma on linux... now I use geanie. On windows I guess it would be notepad++ or some other "ide" like soft.

Marsu42

Quote from: 1% on April 09, 2013, 12:14:35 AM
On windows I guess it would be notepad++ or some other "ide" like soft.

I have little time for ml, I just want to implement the things I really desperately want for myself, that's why I though the quick & dirty bash & joe text editor way would be simplest - well, turns out it isn't :-\

Btw: Here's the result of the whole thing, please give feedback, imho the "sticky modes" are really useful for everybody:
https://bitbucket.org/hudson/magic-lantern/pull-request/72/sticky-modes-new-bracketing-sequence-delay/diff