Author Topic: LiveView Zoom x10 option in AF+MF setting  (Read 5824 times)

mapline

  • New to the forum
  • *
  • Posts: 18
LiveView Zoom x10 option in AF+MF setting
« on: February 01, 2016, 11:30:29 AM »
Hi
First thanks for all the hard work that has gone in to ML as I am benefiting as a new user.
Learning more as I progress.

On M like AF+MF setting as it works really well I find.  Magic Focus set to focus ring only works well with *Back focus.

However when I worked out how to use LiveView zoom tweaks > Zoom x10 and set it just to focus ring FANTASTIC!.

Problem it only works in MF not AF+MF!

Please is it possible to change LiveView zoom tweaks > Zoom x10 and set it just to focus ring to work in AF+MF setting?

Then you have the best of both worlds AF on *Back focus and MF with x10 zoom on focus ring.

Many thanks Michael

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #1 on: February 01, 2016, 11:43:08 AM »
Should be easy, one just needs to know how to identify the AF+MF mode. Since none of my lenses have this mode, you can help with that.

Simply print the values of camera.af_mode from a Lua script, in each focus mode.

mapline

  • New to the forum
  • *
  • Posts: 18
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #2 on: February 02, 2016, 01:19:38 AM »
Hi
Will be glad to provide info required.
As new to this can you direct me to a post that provides info of how I can get and print values of a Lua script?
Thanks Michael

mapline

  • New to the forum
  • *
  • Posts: 18
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #3 on: February 02, 2016, 03:13:00 PM »
Hi
Got a bit further as found luna mode in ML.
Changed Hello World to Hello Michael. OK
Please can anyone help me on code for printing the values of camera.af_mode from a Lua script?
Thanks Michael

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #4 on: February 02, 2016, 03:23:16 PM »
Code: [Select]
print(camera.af_mode)

mapline

  • New to the forum
  • *
  • Posts: 18
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #5 on: February 03, 2016, 12:39:25 AM »
Hi
As only programming is in various basic's and VBA I have to start to learn C.
However as I only need data from 3 focus modes thought I may be able to include  in hello.lua script.

Hence
-- A very simple script.

function main()
    menu.close()
    console.show()
    print "Hello, Michael!"
    print "Press any key to exit."
   print(camera.af_mode)
    key.wait()
    console.hide()
end

keymenu = menu.new
{
    name = "Hello, World!",
    select = function(this) task.create(main) end,
}

But it did not show any data. Obviously not correct syntax!

Any help please to be able to get data?

Thanks Michael


Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8427
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #6 on: February 03, 2016, 03:05:56 AM »
It works pretty well. You will see an integer in console. See http://davidmilligan.github.io/ml-lua/modules/camera.html#af_mode

mapline

  • New to the forum
  • *
  • Posts: 18
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #7 on: February 03, 2016, 10:48:30 AM »
Hi
Thanks Walter as I was expecting more than a single digit!

So A1ex
Result of each focus mode is:
AF = 0
MF = 3
AF+MF =0

If it is a problem that AF and AF+MF are the same at 0 would it be a problem to make "LiveView zoom tweaks > Zoom" to apply to all focus modes which is the same as Magic Focus?

Please advise how I can be of further help
Thanks Michael

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #8 on: February 03, 2016, 11:17:39 AM »
Problem is: whenever you autofocus, ML will trigger the 10x zoom (which is not exactly what the AF algorithm expects in that moment).

So in this case, it's probably best to tweak the source code to your particular needs...

mapline

  • New to the forum
  • *
  • Posts: 18
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #9 on: February 03, 2016, 12:02:29 PM »
Is it possible to limit x10 to just when focus ring is turn ie then if will not apply on auto focus?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #10 on: February 03, 2016, 12:15:44 PM »
I'm not sure how to tell the difference between the two situations.

From property.h, it looks like PROP_LV_FOCUS_STATUS might be useful here; if it's triggered before PROP_LV_FOCAL_DISTANCE, this could work.

The change would be:

Code: [Select]
diff -r 0a80f11c5c18 src/shoot.c
--- a/src/shoot.c Tue Jan 19 21:41:02 2016 +0200
+++ b/src/shoot.c Wed Feb 03 13:12:40 2016 +0200
@@ -2423,6 +2423,7 @@
 void zoom_focus_ring_trigger() // called from prop handler
 {
     if (RECORDING) return;
+    if (lv_focus_status != 1) return;   /* don't trigger zoom from focus ring during autofocus */
     if (lv_dispsize > 1) return;
     if (gui_menu_shown()) return;
     if (!DISPLAY_IS_ON) return;

I didn't test it, as I'm a little busy with other issues these days, but I'm sure others will help you try it.

joyopd

  • Just arrived
  • *
  • Posts: 1
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #11 on: March 04, 2016, 02:46:32 PM »
Hi,

it will be quite nice to have a chance to use LiveView zoom tweaks > Zoom x10 while AF is still on.
Just to explain. I'm using ptp to control camera and do follow focus. But follow focus work only when AF is on.
Magic zoom not working on 500D from some reason.

If this will be possible, I can use trigger halfpress to zoom and focus remotely over USB.

Is there any way how to enable this without recompiling whole ML firmware?

I will be happy for any advice.
Thank you

mapline

  • New to the forum
  • *
  • Posts: 18
Re: LiveView Zoom x10 option in AF+MF setting
« Reply #12 on: July 12, 2016, 03:20:48 PM »
Hi
As this has not been taken up yet is it possible that LiveView Zoom x10 option could be added just when the focus ring is turned regardless of focus mode ( ie AF, M,or M+AF).
If it is limited to focus ring action it would not affect AF?
Many thanks in anticipation.  Anything I can do to help?
Michael