A way to get_zoom() on EOS-M 100 - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

A way to get_zoom() on EOS-M 100

  • 13 Replies
  • 4854 Views
*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: A way to get_zoom() on EOS-M 100
« Reply #10 on: 31 / October / 2020, 15:42:35 »
Advertisements
Got a AF Voigtlaender-APO-ZOOMAR-VMV-28-210  :xmas today,
zp=98, but on M100-100a the Lua-
function get_focus_distace_lower( :-X ) + _upper( :blink: ) = 0!
Same with Canon EF28-90 &EF70-210.
Good, maybe fine with  STM15-45, Can EF-100-300 USM & ...
Can EFS18-55: Don´t know, AF faulty,random&blocking, always fdl=25 and fdu=25.
Code: [Select]
// platform/m???/main.c

int get_focal_length(int zp) {
    if (zp==0) return _GetLensWideFocalLength() * 1000;
    return _GetLensCurrentFocalLength() * 1000;
}

int get_zoom_x(int zp) {
    int wfl = _GetLensWideFocalLength();
    if (!wfl) {
        return 1;  // manual lens
    }
// -- return _GetLensCurrentFocalLength()*100 / (wfl*100);
// ++ M100_15-45_STM, CAN_EF-S_18-55, CAN_50 1:1.8 II, ...?
    return (_GetLensCurrentFocalLength()*15) / (wfl) -15;
}
// Saw a 18-270, so zp=151, updated shooting.c, here line 1239.
++ shooting.c
« Last Edit: 26 / December / 2020, 13:46:43 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: A way to get_zoom() on EOS-M 100
« Reply #11 on: 04 / November / 2020, 14:34:10 »
??? Seen in other EOS-M topics,too: some lenses avoid to write their dist_values at the expected addresses,
even Canon EF28-90 &EF70-210.

Older lenses probably do not offer this interface...

:-[  ;) at least they could have get_zoom() and an AV-trail, the lucky interfaced even more dof_values.  8)
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: A way to get_zoom() on EOS-M 100
« Reply #12 on: 11 / November / 2020, 15:00:17 »
 :) M3M10M100_Focus.lua log told me, that fdl and fdu always change together to
former fdu = newer fdl.
This funcion should do that with one call, if speed==0.
Code: [Select]
function MoveFocus(steps,speed)
steps=steps or 10
speed=speed or 0
local fdl=get_focus_distace_lower()
local fdu=get_focus_distace_upper()
local c=0
   if speed~=0 then call_event_proc("EFLensCom.MoveFocus",steps,speed); return end

   if fdu==0 then print(":( Lens not supported :("); restore() end
   repeat c=c+1
          call_event_proc("EFLensCom.MoveFocus",steps,50)
   until (c==math.abs(steps)) or
         (steps>0 and get_focus_distace_lower()>=bitand(fdu, 0x1fff)) or
         (steps<0 and get_focus_distace_upper()<=fdl)
end


function restore()   
print("Zoom,Focus=",get_zoom(),get_focus_distace_lower(),get_focus_distace_upper())
end


That´s a look at some dist_values with the recent approach, EFS 55-255 IS-STM ...
Code: [Select]
print(get_zoom(),dof.min_stack_dist,dof.near,dof.focus,dof.far,dof.hyp_valid,dof.hyp_dist,dof.dof,dof.coc,'--')
0 166 11206 15850 27065 false 38171 15859 19 --
4 170 3171 3347 3543 false 59193 372 19 --
6 199 3592 3777 3981 false 72192 389 19 --
9 211 4069 4255 4457 false 91614 388 19 --
12 227 4586 4781 4992 false 110740 406 19 --
15 253 5199 5403 5622 false 135417 423 19 --
16 268 5390 5594 5813 false 145169 423 19 --
21 302 6241 6455 6683 false 185061 442 19 --
27 347 8097 8370 8661 false 243932 564 19 --
28 357 8366 8640 8931 false 259919 565 19 --
34 385 4292 4352 4413 false 301623 121 19 --
30 367 3163 3199 3235 false 267900 72 19 --
18 282 8136 8580 9074 false 155261 938 19 --
24 321 207635 21328 -1 false 207635 -1 19 --
21 302 185061 -32289 -1 false 185061 -1 19 --
1 138 1546 1597 1651 false 46947 105 19 --
28 353 9490 9861 10261 false 248890 771 19 --
53 528 7048 7136 7225 false 557127 177 19 --
42 441 3055 3078 3100 false 389408 45 19 --
26 344 3915 3979 4045 false 234584 130 19 --
21 302 185061 -32289 -1 false 185061 -1 19 --
12 227 5842 6163 6520 false 110740 678 19 --
7 184 1396 1420 1444 false 78152 48 19 --
6 199 4031 4266 4528 false 72192 497 19 --
... might be a replacement in upper shooting.c, next try soon:
Code: [Select]
int   shooting_get_exif_subject_dist()          { return (peeks(eos_m+2)==INFINITY_DIST)?INFINITY_DIST:
                           /*return */                   (peeks(eos_m)>>1)+(peeks(eos_m+2)>>1); }
Edit2: Kept updated shooting.c, added platform/main.c for M100.100a
Edit3: Updated to updated M3M10M100_Focus.lua Version 0.71  ::)
« Last Edit: 17 / March / 2021, 14:04:53 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: A way to get_zoom() on EOS-M 100
« Reply #13 on: 26 / December / 2020, 13:44:37 »
 :) Have only M100 to test, but would expect same flow & values from M3 & M10, too ...
++ Useful lines for scripts :
EOSM=get_zoom_steps()<2
shooting_set_zoom_rel([v])  -- ~= autodetect.
shooting_set_zoom([1|2|3]) -- show values (%d|%x|timestamp)
Code: [Select]
#ifdef CAM_ILC
void shooting_set_zoom_rel(int v) { // temp. helper
switch (conf.platformid) {
case 13009: eos_m=0x001FC7FA; // m100_100a
break;
case 12953: eos_m=0x0024495A; // "m3"="120f" default :)
if (v==101) eos_m=0x00244916; // "m3"="101a"
break;
case 12960: eos_m=0x00272016; // m10 110d, 110f, 110g
break;
default: if (v>0xfffff) eos_m=v;
} // switch
}
« Last Edit: 01 / April / 2021, 14:57:15 by Caefix »
All lifetime is a loan from eternity.


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal