Maybe you could update your script to 121a.
The script is already 121a ready, so the latest version should run ok.
function get_focus_distance_lower() -- returns lower focus distance in mm, but note 'accuracy' is 1cm from Canon local x = -1 if (bi.platsub == "101a") then x = peek(0x00244918, 2) elseif (bi.platsub == "120f") then x = peek(0x0024495C, 2) else error('Not 101a or 120f') end if x == -1 then return -1 else return x*10 endend
Do you know the peek values?
for get_lens_name_fn I don't know...
local get_lens_name_fn = 0xfc2f3fd5 if (bi.platsub == "101a") then get_lens_name_fn = 0xfc2f3fc3 end
I guess we need to wait until someone can get me the peek code for the 121a to put here:
function lens_name() local pname = 0x002449ad if (bi.platsub == "101a") then pname = 0x00244969 end local len = peek(pname-1,1) local i = 0...
However you could simplify your lens_name function by accessing the values directly in memory.
I’m afraid I don’t have the knowledge or wherewithal to take this approach, so, for now, I’ll just add the address to the function that is already there. I’m also not clear what you were suggesting regarding FreeMemory.
In your script line 204 is a duplicate of line 195 and IMO should be testing the value of pname not ppname.
Started by SkyWalker9 Script Writing
Started by SkyWalker9 « 1 2 » Completed and Working Scripts
Started by kidtree Completed and Working Scripts
Started by genosmm General Help and Assistance on using CHDK stable releases
Started by pigeonhill « 1 2 3 » Creative Uses of CHDK