EOS specific functions and variables (was Re: eos M10 port) - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

EOS specific functions and variables (was Re: eos M10 port)

  • 13 Replies
  • 1562 Views
*

Offline c_joerg

  • *****
  • 1248
Re: EOS specific functions and variables (was Re: eos M10 port)
« Reply #10 on: 09 / June / 2022, 01:54:03 »
Advertisements
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.

Yes, of course…

get_focus_distace_upper
get_focus_distace_lower

M3M10M100_Focus.lua
https://chdk.setepontos.com/index.php?topic=13756.msg139999#msg139999

power_down_for_seconds 

PowDownInt.lua
https://chdk.setepontos.com/index.php?topic=13956.msg142128#msg142128

cancels the retract timer for all P&S

Code: [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
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: EOS specific functions and variables (was Re: eos M10 port)
« Reply #11 on: 09 / June / 2022, 02:21:50 »
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.

Yes, of course…

get_focus_distace_upper
get_focus_distace_lower

M3M10M100_Focus.lua
https://chdk.setepontos.com/index.php?topic=13756.msg139999#msg139999

power_down_for_seconds 

PowDownInt.lua
https://chdk.setepontos.com/index.php?topic=13956.msg142128#msg142128

cancels the retract timer for all P&S

Code: [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
Plus  ;)

Code: [Select]
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 name
end

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: EOS specific functions and variables (was Re: eos M10 port)
« Reply #12 on: 09 / June / 2022, 10:47:58 »
Of course, discussion may drift ;)
https://chdk.setepontos.com/index.php?topic=2509.msg143461#msg143461

shooting.c plus #ifdef CAM_ILC =  :-*
https://chdk.setepontos.com/index.php?topic=14123.msg144804#msg144804

Edit: CAM_ILC = string.sub(bi.platform,1,1) == "m"  --  :D
« Last Edit: 10 / June / 2022, 13:03:46 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: EOS specific functions and variables (was Re: eos M10 port)
« Reply #13 on: 10 / June / 2022, 15:18:08 »
 :o ... Where are the famous "Related Topics" ??  :-X 
All lifetime is a loan from eternity.