Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - mk11174

#1
I was trying to film dogs catching Frizbee the other day, and was thinking, I wonder if there's a way to add a buffer record to Raw_Rec module, like have it record to buffer but not to file for the certain amount of frames the user chooses as a buffer, then when the action you want happens, you press the shutter and it records the buffer to video file? Might be a neat option to add to this module for wildlife or sports, especially if it will probably now save the camera settings you use in the video file as well. Or is this to much clutter for the module, maybe a separate module might be needed? I have been away from ML community for awhile and my coding skills are way to rusty to even know if this is possible or not. Thanks
#2
General Help Q&A / Graph Question
September 19, 2014, 10:48:37 AM
Hi, this is probably a question for the Main Devs, not a major question, just an issue that I have noticed when drawing on screen that I notice and I was wondering if someone could watch this video and let me know if its something that has a work-around or if it is just something that will always be this way? But again, not a major thing and I can easily live with it, but would be nice if this one issue was tweakable.

http://mfi.re/watch/05hb5sjp139c5w8/MVI_9270.avi
#3
Reverse Engineering / Timer Code Help
July 31, 2013, 10:55:36 AM
Hi, I was hoping anyone at all could give me a code example of a ML timer code, msleep just pauses live view if I try to use it, so I am guessing that is not the best option for what I am doing. I am using bolt trigger, and I wanted to add an extra thing to it, I want it to set off a detection every 10 seconds so I can have it capture images for a time lapse while it is waiting for actual bolts. I don't want to take regular pictures, just the RAW buffer captures, so I just want to say something like,

      if(timer==10)
     {
      bolt_raw_recording = 1;
     }
}

But how can I create a simple time code that wont freeze live view like msleep? Anyone that can help I would really be greatful, thanks.
#4
I created an experimental module that focuses to Infinity after you customize it for your lens.

It is working fine with my 18-55mm kit lens and 75mm-300mm Telephoto for my 550D.

If you were looking for a way to get your lens to infinity without have to go through the whole zoom 10x and all that, maybe this will work for you too. I can't be sure if it will work for any other cameras or lenses but it is working for mine so I figured why not share it just in case it does work for more then mine. So please no bad words if you have no luck with it, I am just sharing.

Ok, here is how to set it up!

The option Infinity will be in the Focus Menu, you will pres Q to get into its Sub Menu to change its settings, you will see it is very similar to the Follow Focus settings.

First find the settings for your lens by using Follow Focus. Set Focus Settings to:
Step Size    2
Step Delay 200ms
Step Wait   ON
Left/Right dir + / -

1. Zoom lens to max range.

2. Switch Lens to MF and turn Focus Ring all the way to the Infinity side, if your holding the cam looking at LCD grab ring and twist all the way to Left.

3. Switch back to AF.

4. Now zoom 10x on something you can use as your Infinity Object.

5. With Follow Focus on, use your Right Key to do one press at a time counting in your head till it is in Focus.
note:Remember the number of steps. DO NOT USE UP AND DOWN KEYS!

Now you can turn off Follow Focus.

Setting up Infinity Feature.

1. Turn lens to greatest zoom range if not already.

2. Switch Lens to MF and turn Focus Ring all the way to Left again.

3. Switch lens back to AF.

4. In the Infinity Sub Menu set to Custom, I doubt my 2 lenses will work for yours.

5. Set other settings like this:

Step Right = How many right key presses it took you to achieve focus.
Speed  =  The step size used when getting your settings with Follow Focus, in this case it was 2.
Delay = The delay used in when getting your settings with Follow Focus, in this case it was 200 for 200ms
Range = The zoom range you are at right now, Example: 18-55mm would be 55 of coarse. Cause we are taking are setting Full Zoom.

6. Once those settings are dialed in, they will save even after restart.

So to achieve Infinity focus from now on just:

Twist Lens to full zoom range.
Switch Lens to MF and turn Focus Ring all the way to Left on Infinity side.
Switch lens back to AF
Now run Infinity feature.
Switch lens back to MF
Your focus should be in focus if right where you manually configured it and you can freely zoom in and out and not lose focus to infinity as long as you don't touch the focus ring.

This is really probably only useful for those people who are picky about there Infinity being set the way they want it and they don't want to have to go through zooming in 10x all the time and finding something to aim at far away and manually messing with the Focus Ring. Or maybe the people who shoot night lightning like me and don't have any distant objects to check focus on, and for lightning it has to right on or the lightning will look soft.

This is my main reason for creating the module, for night lightning set up and to save set up time during day lightning plus focusing by hand doing the trick all the way to Infinity and back a bit never gives me sharp bolts.

Please let me know if you have any success with it. And sorry my 2 presets are in there, maybe if you have a 550D and the kits lens, maybe it will work for you on the 55mm or if you have 550D with 75-300mm but I doubt it will be exact same setting.

All this module is doing is the same thing you manually do with Follow Focus as long as your settings in Infinity match the Setting in Focus Settings, you can use differ settings in Focus Settings submenu but make sure you match them in the Infinity Feature settings. And when your using follow focus, go low, one press at a time so you don't skip at all, it may do 2 steps without realizing it, then it wont match up in the Infinity Module.

Also the neat thing is, even if you try it and it dont work, maybe your just a step off, so go ahead and tweak the steps 1 at a time in the Infinity Module till its correct, but if you can achieve focus with 5 steps to the right from all the way to Left, then you should be able to have Infinity do it for you auto.

It is very important to always reset focus to the left, it takes to long to let the motor do it using Infinity, I have it go back a for 500ms just to make sure its all the way, so you will see Soft Focus Reached at the start.

Oh also, if you hear 3 beeps, that means your Lens Zoom range does not match the Range you set in the Infinity module, and 1 beep at the end means it is Done so you can switch Lens back to MF so you don't ruin your focus.

https://bitbucket.org/mk11174/magic-lantern/downloads/foc_inf.mo

Just in case anyone wants the src code or has better way of writing it cause it is very basic since I am not a programmer at all, any tips would be welcome!

#define CONFIG_CONSOLE

#include <module.h>
#include <dryos.h>
#include <property.h>
#include <bmp.h>
#include <menu.h>
#include <config.h>
#include "edmac.h"
#include "lens.h"


/*  focus data  */
static int inf_focus = 0;
unsigned CONFIG_INT("inf_delay", inf_delay, 200);
unsigned CONFIG_INT("inf_speed", inf_speed, 2);
unsigned CONFIG_INT("inf_steps", inf_steps, 1);
unsigned CONFIG_INT("inf_range", inf_range, 18);
unsigned CONFIG_INT("inf_custom", inf_custom, 2);

/*   Focus Infinity  */

static MENU_SELECT_FUNC(inf_focus_toggle)
{
if (inf_custom == 1 && lens_info.focal_len == 55)
{
lens_focus_start(-3);
msleep(200);
lens_focus_stop();
msleep(200);
lens_focus(4, 2, 1, 20);
msleep(200);
beep();
}
else
{
if (inf_custom == 2 && lens_info.focal_len == 300)
{
lens_focus_start(-3);
msleep(200);
lens_focus_stop();
msleep(200);
lens_focus(9, 2, 1, 20);
msleep(200);
beep();
}
else
{
if (inf_custom == 0 && lens_info.focal_len == inf_range)
{
lens_focus_start(-3);
msleep(200);
lens_focus_stop();
msleep(200);
lens_focus(inf_steps, inf_speed, 1, inf_delay);
msleep(200);
beep();
}
else
{
msleep(200);
beep();
msleep(200);
beep();
msleep(200);
beep();
msleep(200);
return;
}
}
}
}

static MENU_UPDATE_FUNC(custom_display)
{
if (inf_custom == 0)
{
   MENU_SET_ENABLED(1);
}
else
{
   MENU_SET_ENABLED(0);
}
}

static struct menu_entry step_menu[] = {
            {
                .name = "Infinity",
                .priv = &inf_focus,
        .select = inf_focus_toggle,
.choices = CHOICES("Press SET"),
        .select_Q     = menu_open_submenu,
                .min = 0,
                .max = 1,
        .children =  (struct menu_entry[]) {
    {
                .name = "Custom Range",
                .priv = &inf_custom,
.choices = CHOICES("Custom", "55mm", "300mm"),
                .min = 0,
                .max = 2,
    },
            {
                .name = "Steps Right",
                .priv = &inf_steps,
.update = custom_display,
                .min = 1,
                .max = 1000,
            },
            {
                .name = "Speed",
                .priv = &inf_speed,
.update = custom_display,
                .min = 1,
                .max = 3,
            },
            {
                .name = "Delay",
                .priv = &inf_delay,
.update = custom_display,
                .min = 0,
                .max = 1000,
            },
            {
                .name = "Range mm",
                .priv = &inf_range,
.update = custom_display,
                .min = 10,
                .max = 900,
            },
            MENU_EOL
},

},

};

static unsigned int foc_inf_init()
{
    menu_add( "Focus", step_menu, COUNT(step_menu) );

    return 0;
}

static unsigned int foc_inf_deinit()
{
    return 0;
}

MODULE_INFO_START()
    MODULE_INIT(foc_inf_init)
    MODULE_DEINIT(foc_inf_deinit)
MODULE_INFO_END()

MODULE_CONFIGS_START()
    MODULE_CONFIG(inf_delay)
    MODULE_CONFIG(inf_steps)
    MODULE_CONFIG(inf_speed)
    MODULE_CONFIG(inf_range)
    MODULE_CONFIG(inf_custom)
MODULE_CONFIGS_END()
#5
Reverse Engineering / Focus Code Help
July 13, 2013, 11:17:10 PM
I am trying to add a code to bolt trigger module.

I figured out how to control the focus, and added some lines for full wide and full zoom of my 18-55mm kit lens.

I would just set lens to MF the turn focus to INF all the way, then I would switch on AF and run the code for whatever zoom I am at, Full or Wide. It always focuses right where I want it just fine.

But the question is, can anyone tell me how to make the code know if it is full wide or full zoom so it knows which code to run when I run the code?

An maybe anyone willing to help has a simplier solution then my basic code? LOL

Update: Sorry was in rush cause of a storm, here is the line of code I am using right now.

  /*  Full Zoom  */
/*        msleep(100);
        lens_focus_start(80 * get_follow_focus_dir_h());
        msleep(100);
        lens_focus_start(1 * get_follow_focus_dir_h());
        msleep(100); */

    /* Full Wide  */
        msleep(100);
        lens_focus_start(2 * get_follow_focus_dir_h());
        msleep(100);
        lens_focus_start(1 * get_follow_focus_dir_h());
        msleep(100);
        lens_focus_start(1 * get_follow_focus_dir_h());
        msleep(100);

        lens_focus_stop();
        msleep(100);
#6

http://youtu.be/LcHJdsl5Dxw

Hope the Devs don't mind, but I went ahead and made a tutorial to help guys like me that really want to compile by themselves. I don't mention anything about changing code so no worries Devs!  ;)

Hope someone can make use of it.