UAV camera script - page 2 - Script Writing - CHDK Forum

UAV camera script

  • 11 Replies
  • 9734 Views
*

Offline reyalp

  • ******
  • 14125
Re: UAV camera script
« Reply #10 on: 15 / March / 2014, 16:50:45 »
Advertisements
call_event_proc('SS.Create');
call_event_proc('SS.MFOn');
You will need to set Enable Lua Native Calls in the CHDK Miscellaneous menu if you want to use these functions.
Also worth noting for anyone else reading, the function names may vary on on other models.
Don't forget what the H stands for.

Re: UAV camera script
« Reply #11 on: 15 / March / 2014, 17:23:49 »
Also worth noting for anyone else reading, the function names may vary on on other models.

I've been playing with this for CHDK 1.2.0.  Except for a few cams that crash in MF mode, it should put most of the rest into MF mode if set_aflock() is not working for you.

Code: [Select]
function enable_mf()
    if call_event_proc("SS.Create") ~= -1 then
        if call_event_proc("SS.MFOn") == -1 then   
            if call_event_proc("PT_MFOn") ~= -1 then
                if get_prop(props.FOCUS_MODE) ~= 1 then post_levent_for_npt("PressSw1AndMF") end
            end
        end
    elseif call_event_proc("RegisterShootSeqEvent") ~= -1 then
        if call_event_proc("PT_MFOn") == -1 then
            if call_event_proc("MFOn") == -1 then
                if get_prop(props.FOCUS_MODE) ~= 1 then post_levent_for_npt("PressSw1AndMF") end   
            end
        end
    else
        if get_prop(props.FOCUS_MODE) ~= 1 then post_levent_for_npt("PressSw1AndMF") end           
    end
    if (get_prop(props.FOCUS_MODE) == 1 ) then print("MF enabled") else print("MF enable failed") end 
end
 
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal