EOS M3 porting - page 57 - DryOS Development - CHDK Forum
supplierdeeply

EOS M3 porting

  • 618 Replies
  • 222479 Views
Re: EOS M3 porting
« Reply #560 on: 16 / July / 2019, 15:57:11 »
Advertisements
@c_joerg

BTW just confirmed the DoF info upper and lower is updated, but seem to need a sleep for info to update.
Looking good  :)

Re: EOS M3 porting
« Reply #561 on: 16 / July / 2019, 16:04:17 »
You may want to check again (watch the splash screen).
 
That is what i did. Check M3, SX50 and G1x. All CHDK DE.
May be the M3 is different because I build it by myself last time.

BTW just confirmed the DoF info upper and lower is updated, but seem to need a sleep for info to update.
Looking good  :)
Sure?
Did you compare the values with the result of my script?


M100 100a, M3 101a, 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 M3 porting
« Reply #562 on: 16 / July / 2019, 16:16:47 »
@c_joerg

Haven't done that but focused at about a 1m away (guess) and ran the script to drive the lens to near.
DoF values recorded as
108/93 at the start and 15/15 at the end.

I guess the middle of 108/93 is a reasonable estimate and of course 15cm in the focus min as stated by Canon.
Need to work out a way to know how long to sleep to ensure dofs updated.

Re: EOS M3 porting
« Reply #563 on: 16 / July / 2019, 16:52:29 »
Haven't done that but focused at about a 1m away (guess) and ran the script to drive the lens to near.
DoF values recorded as
108/93 at the start and 15/15 at the end.


Reply 2: These functions (DOF) were not implemented
https://chdk.setepontos.com/index.php?topic=13756.0


@Ant
Is DOF implemented now?
« Last Edit: 16 / July / 2019, 16:55:53 by c_joerg »
M100 100a, M3 101a, 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 M3 porting
« Reply #564 on: 16 / July / 2019, 17:07:48 »
Here's my test script, just to get me going  ;)


Thanks to @c_joerg


Code: [Select]
--[[
@title M3 Focus Test
@chdk_version 1.4

--]]

--  calls to use
--  call_event_proc("EFLensCom.FocusSearchFar")
--  call_event_proc("EFLensCom.FocusSearchNear")
--  call_event_proc("EFLensCom.MoveFocus",steps,speed)

bi=get_buildinfo()

function get_focus_distace_upper()
    local  x=-1
 
    if (bi.platform=="m3") and (bi.platsub=="101a") then
      x=peek(0x00244916, 2)
    elseif (bi.platform=="m3") and (bi.platsub=="120f") then
      x=peek(0x0024495A, 2)
    else
      print('Wrong platform')
    end
 
    return x
 
  end
 
  function get_focus_distace_lower()
    local  x=-1
 
    if (bi.platform=="m3") and (bi.platsub=="101a") then
      x=peek(0x00244918, 2)
    elseif (bi.platform=="m3") and (bi.platsub=="120f") then
      x=peek(0x0024495C, 2)
    else
      print('Wrong platform')
    end
 
    return x
 
  end

print(get_focus_distace_upper(),get_focus_distace_lower())
call_event_proc("EFLensCom.FocusSearchNear")
sleep(2000)
print(get_focus_distace_upper(),get_focus_distace_lower())

BTW if I comment out the sleep, the script fails, ie upper lower not updated :-(

Re: EOS M3 porting
« Reply #565 on: 17 / July / 2019, 02:03:46 »
@c_joerg

Not sure if you have experienced this, but I have confirmed you need a sleep after calling the move to register the upper and lower dofs.

Here is a snippet of my test code:

Code: [Select]
upper_pos = get_focus_distace_upper()
lower_pos = get_focus_distace_lower()
print(upper_pos,lower_pos)

call_event_proc("EFLensCom.FocusSearchNear")
sleep(sleep_time*100)
upper_pos = get_focus_distace_upper()
lower_pos = get_focus_distace_lower()
print(upper_pos,lower_pos)

call_event_proc("EFLensCom.MoveFocus",steps,speed)
sleep(sleep_time*100)
upper_pos = get_focus_distace_upper()
lower_pos = get_focus_distace_lower()
print(upper_pos,lower_pos)

If sleep_time is 0 then upper and lower don't change.

If sleep_time is 1, ie 100ms, then they do change but not as expected, ie distance change hasn't completed.

if sleep_time is 2, ie 200ms, or more then all looks good.

I guess the issue is that call_event_proc("EFLensCom.*") is not waiting for completion.

A sleep does work, but not very intelligent. I'll think about other ways, ie a if test.

Re: EOS M3 porting
« Reply #566 on: 17 / July / 2019, 03:31:45 »
Not sure if you have experienced this, but I have confirmed you need a sleep after calling the move to register the upper and lower dofs.
I don't have experience about that....
But I would expect if you go from upper to lower it need some time.
Would be interesting to know what this speed is when you use SearchFar instead of MoveFocus.


Du you have a Sigma lens?
It looks like you didn't get upper and lower limits with Sigma lenses.
M100 100a, M3 101a, 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

*

Offline Ant

  • ****
  • 432
Re: EOS M3 porting
« Reply #567 on: 17 / July / 2019, 05:50:30 »
@Ant
Is DOF implemented now?
No.

Quote
It looks like you didn't get upper and lower limits with Sigma lenses.
How did you get it?

P.S. I have Sigma 18-250.


Re: EOS M3 porting
« Reply #568 on: 17 / July / 2019, 12:17:11 »
I’m only using an 11-22mm EFM lens :-)

Re: EOS M3 porting
« Reply #569 on: 17 / July / 2019, 14:56:13 »
How did you get it?
I have a SIGMA 24mm f1.4 ART. I just checked again. My fault…
The SIGMA lens only moves in AF mode, not in MF. All my Canon lenses moves in AF and MF
M100 100a, M3 101a, 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

 

Related Topics