Silent pics and autofocus

Started by wolf, February 25, 2013, 09:43:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wolf

After some experiments with focus() I wonder whether there is already a possibility to focus to a given length.
I tried to write a script for testing and realized that when I trigger a silent pic, the camera tries to autofocus. Triggering [Zoom Out] doesn't work on a 550D.
Is there another way to trigger s-p?

I know the script can't be accurate.

void mm_focus(int mm)
{
    int foc_count;
    mm=mm/10;
    D = get_dof();
    if(D->focus_dist>mm)
    {
        while(D->focus_dist>=mm)
        {
            focus(5);
            foc_count++;
            D = get_dof();
        }
        for(int j=0; j<foc_count/2; j++)
            focus(-5);
            foc_count=0;
    }
    else
    {
        while(D->focus_dist<=mm)
        {
            focus(-5);
            foc_count++;
            D = get_dof();
        }
        for(int j=0; j<foc_count/2; j++)
            focus(5);
        foc_count=0;

    }
    focus_old=mm;
}

a1ex

If you set AF to back-button, it won't focus.