--[[@title Check subject distance@param a autonumber filename (y/n)@range a 0 1@default a 1--]]autonumber = (a==1)if autonumber then local nameBegin = 'A/checkSD' for i=0,99 do local fn = string.format('%s%02d.csv',nameBegin,i) if not os.stat(fn) then filename = fn break end end if not filename then error('No available filenames!') endelse filename = 'A/checkSD.cvs'endbi=get_buildinfo()log,err=io.open(filename,"wb")--sleep(100)if not log then error('failed to open '..tostring(filename)..': ' .. tostring(err))endlog:write(bi.platform, "\n", os.date(), "\n\n")log:write("Write SD: Canon SD:\n\n")set_mf(1)SD_in = 0SD_out = 0maxSD = 25000 -- max value to achieve infinity -- for SX50 (zoom = min) enough 15000for i = 1, maxSD, 1 do set_focus(i) --sleep(100) tmp = get_focus() if tmp ~= SD_out then SD_in = i SD_out = tmp log:write(string.format("%8d", SD_in)," ; ", string.format("%8d", SD_out),"\n") cls() print("Currend SD: "..i) if tmp == -1 then break end endend log:close()set_mf(0)
"MoveFocusLensWithPosition" has 3 arguments: 1) signed halfword 2) halfword 3) word"MoveFocusLensToPosition" has two: 1) halfword 2) word"MoveFocusPosition" has only one (halfword)If less arguments are provided, the eventproc will get junk for the remaining arguments.
So Nobody wants to help?
It would be good to compare with other SX50hs.
Quote from: Malysh-ok on 19 / April / 2015, 16:55:45It would be good to compare with other SX50hs.Here you go.
int shooting_get_subject_distance_(){ if (!conf.dof_subj_dist_as_near_limit) return shooting_get_canon_subject_distance(); else return shooting_get_far_limit_f(shooting_get_canon_subject_distance(), shooting_get_min_real_aperture(), get_focal_length(lens_get_zoom_point()));}
else return shooting_get_near_limit_f...
SD: .001NL: .001FL: .000
SD: .098NL: .081FL: .122
SD: 1.49NL: .612FL: Inf
SD: .619NL: .619FL: 1.52
Hello. Think writing in this topic.
Started by bisenberger Script Writing
Started by Andy Y General Help and Assistance on using CHDK stable releases
Started by Mickyj General Help and Assistance on using CHDK stable releases
Started by cdordoni General Discussion and Assistance
Started by pigeonhill « 1 2 » General Help and Assistance on using CHDK stable releases