function lens_name() local pname = 0 if (bi.platsub == "120f") then pname = 0x002449ad elseif (bi.platsub == "101a") then pname = 0x00244969 elseif (bi.platsub == "121a") then --pname =? 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
Assuming I've understood you, could you look at the following and confirm all is OK and fill in the ?? address for 121a
121a is the same as 120f which is why I wrote the code the way I did - 101a is the odd one out.
Forgot to say, you need to load the philmoz XIMR version
What happens if you don't use the philmoz version?
Use a separate card
...register non-EF-M lenses.
elseif lens_name() == "EF-M22mm f/2.0 MACRO STM" then Fmax = 22000 -- Longest focal length (mm) * 1000 Mmax = 217 -- Max magnification * 100 MFD = 150 -- Minimum Focus Distance in mm t = hiatus() -- distance between front and rear principals return true elseif lens_name() == "EF-M18-150mm f/3.5-6.3 IS STM" then Fmax = 150000 -- Longest focal length (mm) * 1000 Mmax = 259 -- Max magnification * 100 MFD = 450 -- Minimum Focus Distance in mm t = hiatus() -- distance between front and rear principals return true elseif lens_name() == "EF-S18-200mm f/3.5-5.6 IS" then Fmax = 320000 -- Longest focal length (mm) * 1000 Mmax = 592 -- Max magnification * 100 MFD = 450 -- Minimum Focus Distance in mm t = hiatus() -- distance between front and rear principals return true
Need or how to include cropfactor?
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