@reyalp Following up on the above, here is a list of M Cam Series Lua functionality that I hope you can enable:"EFLensCom.MoveFocus""EFLensCom.FocusSearchNear""EFLensCom.FocusSearchFar""GetEFLensFocusPositionWithLensCom"Plus anyothers that access Lens functionality ;-)
call_func_ptr(0xfc2f3315, target, speed, 0, 0)
I’ve looked at those files but I’ve note used the func_ptr approach before.
if bi.platform == "m3" and bi.bi.platsub=="120f" then function MoveFocus(target, speed) call_func_ptr(0xfc2f3315, target, speed, 0, 0) endelseif bi.platform == "m3" and bi.bi.platsub=="121a" then...
Initially I guess the best approach is to replace the following call_event_proc('FA.Create'), call_event_proc('InitializeAdjustmentSystem'), and far_count = call_event_proc('GetEFLensFocusPositionWithLensCom')+1
if (bi.platform=="m3") and (bi.platsub=="101a") then FocusSearchFar_FW = 0xfc43dfd9 FocusSearchNear_FW = 0xfc43dfff FocusPositionWithLensCom = 0xfc5a85c7 shutter_trigger = "print" elseif (bi.platform=="m3") and (bi.platsub=="120f") then FocusSearchFar_FW = 0xfc43e349 FocusSearchNear_FW = 0xfc43e36f FocusPositionWithLensCom = 0xfc5a8adf shutter_trigger = "print" elseif (bi.platform=="m3") and (bi.platsub=="121a") then FocusSearchFar_FW = 0xfc43e379 FocusSearchNear_FW = 0xfc43e39f FocusPositionWithLensCom = 0xfc5a8b0f shutter_trigger = "print" elseif (bi.platform=="m10") and (bi.platsub=="111a") then -- same address in 110d, 110f, 110g FocusSearchFar_FW = 0xfc42f83b FocusSearchNear_FW = 0xfc42f861 FocusPositionWithLensCom = 0xfc5be647 shutter_trigger = "set" else print("Something is not right") sleep(3000) returnend
On the M3 things seem to work as expected and, critically, after I take an image things remain as expected.On the M10, the same script, but with the correct addresses (obviously), doesn't behave as expected, in that after the image is taken the lens position seems to 'reset' itself to a new value :-(I've repeated the test multple times.So, it looks like the M10 is 'different' to the M3 :-(
110d0xfc42f7d7,EFLensCom_FocusSearchFar0xfc42f7fd,EFLensCom_FocusSearchNear0xfc5be5e3,GetEFLensFocusPositionWithLensCom110f/110g 0xfc42f80b,EFLensCom_FocusSearchFar0xfc42f831,EFLensCom_FocusSearchNear0xfc5be617,GetEFLensFocusPositionWithLensCom111a0xfc42f83b,EFLensCom_FocusSearchFar0xfc42f861,EFLensCom_FocusSearchNear0xfc5be647,GetEFLensFocusPositionWithLensCom
Quote from: pigeonhill on 15 / August / 2022, 11:40:32On the M3 things seem to work as expected and, critically, after I take an image things remain as expected.On the M10, the same script, but with the correct addresses (obviously), doesn't behave as expected, in that after the image is taken the lens position seems to 'reset' itself to a new value :-(I've repeated the test multple times.So, it looks like the M10 is 'different' to the M3 :-(Is it the same model of lens? Are focus and lens related settings identical on the cameras? I would be somewhat this was just a Canon firmware behavior difference.Also note that contra the comment, the addresses for these functions are NOT the same for the various M10 subs, except f and g which use the same port. They do appear to be correct for 111a though, so that shouldn't be the cause of the problem.Code: [Select]110d0xfc42f7d7,EFLensCom_FocusSearchFar0xfc42f7fd,EFLensCom_FocusSearchNear0xfc5be5e3,GetEFLensFocusPositionWithLensCom110f/110g 0xfc42f80b,EFLensCom_FocusSearchFar0xfc42f831,EFLensCom_FocusSearchNear0xfc5be617,GetEFLensFocusPositionWithLensCom111a0xfc42f83b,EFLensCom_FocusSearchFar0xfc42f861,EFLensCom_FocusSearchNear0xfc5be647,GetEFLensFocusPositionWithLensCom
--[[@title Test--]] props=require'propcase'bi = get_buildinfo()if (bi.platform=="m3") and (bi.platsub=="101a") then FocusSearchFar_FW = 0xfc43dfd9 FocusSearchNear_FW = 0xfc43dfff FocusPositionWithLensCom = 0xfc5a85c7 shutter_trigger = "print" elseif (bi.platform=="m3") and (bi.platsub=="120f") then FocusSearchFar_FW = 0xfc43e349 FocusSearchNear_FW = 0xfc43e36f FocusPositionWithLensCom = 0xfc5a8adf shutter_trigger = "print" elseif (bi.platform=="m3") and (bi.platsub=="121a") then FocusSearchFar_FW = 0xfc43e379 FocusSearchNear_FW = 0xfc43e39f FocusPositionWithLensCom = 0xfc5a8b0f shutter_trigger = "print" elseif (bi.platform=="m10") and (bi.platsub=="111a") then FocusSearchFar_FW = 0xfc42f83b FocusSearchNear_FW = 0xfc42f861 FocusPositionWithLensCom = 0xfc5be647 shutter_trigger = "video" else print("Only runs on the M3") sleep(3000) returnendtemp = call_func_ptr(FocusPositionWithLensCom)print(temp)ecnt = get_exp_count()shoot()repeat sleep(10) until (get_exp_count() ~= ecnt)temp = call_func_ptr(FocusPositionWithLensCom)print(temp)
Started by smilem General Help and Assistance on using CHDK stable releases
Started by Aket « 1 2 ... 21 22 » Feature Requests
Started by kmoreau893 General Discussion and Assistance
Started by waterwingz Script Writing
Started by saul_havens Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes)