Just to be clear, what I'm suggesting is adding script support for things people have already identified and found useful with peek(), call_func_ptr() etc, not a general wishlist of things that aren't implemented at all.
get_focus_distace_upperget_focus_distace_lower
power_down_for_seconds
cancels the retract timer for all P&S
--cancels the retract timer if (bi.platform=="sx50hs") and (bi.platsub=="100c") then call_func_ptr(0xFF049EB4) elseif (bi.platform=="s110") and (bi.platsub=="103a") then call_func_ptr(0xf8066b88) elseif (bi.platform=="sx230hs") and (bi.platsub=="101a") then call_func_ptr(0xff096474) elseif (bi.platform=="g1x") and (bi.platsub=="100e") then call_func_ptr(0xff099f1c) elseif (bi.platform=="g1x") and (bi.platsub=="101a") then call_func_ptr(0xff099f50) else print("No Cam") end
Quote from: reyalp on 09 / June / 2022, 00:00:43Just to be clear, what I'm suggesting is adding script support for things people have already identified and found useful with peek(), call_func_ptr() etc, not a general wishlist of things that aren't implemented at all. Yes, of course…Quote from: c_joerg on 08 / June / 2022, 02:01:19get_focus_distace_upperget_focus_distace_lowerM3M10M100_Focus.luahttps://chdk.setepontos.com/index.php?topic=13756.msg139999#msg139999Quote from: c_joerg on 08 / June / 2022, 02:01:19power_down_for_seconds PowDownInt.luahttps://chdk.setepontos.com/index.php?topic=13956.msg142128#msg142128Quote from: c_joerg on 08 / June / 2022, 02:01:19cancels the retract timer for all P&SCode: [Select] --cancels the retract timer if (bi.platform=="sx50hs") and (bi.platsub=="100c") then call_func_ptr(0xFF049EB4) elseif (bi.platform=="s110") and (bi.platsub=="103a") then call_func_ptr(0xf8066b88) elseif (bi.platform=="sx230hs") and (bi.platsub=="101a") then call_func_ptr(0xff096474) elseif (bi.platform=="g1x") and (bi.platsub=="100e") then call_func_ptr(0xff099f1c) elseif (bi.platform=="g1x") and (bi.platsub=="101a") then call_func_ptr(0xff099f50) else print("No Cam") end
function lens_name() local pname = 0 if (bi.platform=="m3") then if (bi.platsub == "101a") then pname = 0x00244969 else pname = 0x002449ad end elseif (bi.platform=="m10") then pname = 0x272065 end local len = peek(pname-1,1) local i = 0 local t = {} while i < len do local c = peek(pname + i, 1) if c == 0 then break end table.insert(t, string.char(c)) i = i + 1 end local name = table.concat(t) return nameend
Of course, discussion may drift