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.

Topics - ewinemiller

Pages: [1]
General Help Q&A / is there way to not show crop marks when zoomed?
« on: January 15, 2017, 06:05:57 PM »
So I have a handy custom crop mark bmp so I can see the framing when not zoomed. Using the new crop recording module, it already frames it correctly when I zoom 5x so I don't want to see it there, and at 10x, I'm checking focus so I don't want to see it there. Is there a way to only show the custom crop marks when not zoomed?


Modules Development / Tilt Calculator module (
« on: September 11, 2016, 07:17:27 PM »
Hi folks,

Posted here for feedback and suggestions; a module to calculate the appropriate tilt for tilt-shift lenses. Modeled after an android app I did a while back. Much quicker just to bring it up on the camera.

It puts a menu on the Debug tab.


Code: [Select]
Tilt Calculator

Tilt-shift lenses give amazing control of the depth of field by rotating the focus plane, but without knowing how much tilt to dial in, focusing can be frustrating and time consuming.
Tilt Calculator finds the tilt given your focal length and distance to the hinge point. No more trial and error focusing with your tilt-shift. Focus where you want it.

:Author: Eric Winemiller
:License: GPL
:Summary: Tilt Calculator


Code: [Select]
#include <module.h>
#include <dryos.h>
#include <menu.h>
#include <config.h>
#include <math.h>

static uint32_t focal_lengths[] = { 17, 24, 45, 90 };
#define FOCAL_LENGTH_TEXT "17mm", "24mm", "45mm", "90mm"

static float units[] = {10, 25.4, 304.8};
#define UNITS_TEXT "cm", "inch", "feet"

static CONFIG_INT("tilt.calculator.focallength", focal_length_sel, 1);
static CONFIG_INT("tilt.calculator.unit", unit_sel, 1);
static CONFIG_INT("tilt.calculator.distance", distance_sel, 60);

static MENU_UPDATE_FUNC(degrees_update)
double height = distance_sel * units[unit_sel];
int degrees = roundf(1800.0f / M_PI * asinf(focal_lengths[focal_length_sel]/height));
MENU_SET_VALUE("%d.%d degrees", degrees/10, degrees%10);

static struct menu_entry tilt_calc_menu[] =
        .name = "Tilt Calculator",
        .select = menu_open_submenu,
        .submenu_width = 710,
        .children =  (struct menu_entry[])
                .name = "Focal Length",
                .priv = &focal_length_sel,
                .min = 0,
                .max = COUNT(focal_lengths)-1,
                .choices = CHOICES(FOCAL_LENGTH_TEXT),
                .help = "Select the lens focal length.",
                .name = "Unit",
                .priv = &unit_sel,
                .min = 0,
                .max = COUNT(units)-1,
                .choices = CHOICES(UNITS_TEXT),
                .help = "Select the unit for distance to hinge point.",
                .name = "Distance",
                .priv = &distance_sel,
                .min = 1,
                .max = 500,
                .help = "Select the distance to hinge point.",
                .name = "Tilt degrees",
                .update = degrees_update,
                .icon_type = IT_ALWAYS_ON,
                .help  = "[READ-ONLY] Set your tilt to this value.",

static unsigned int tilt_calc_init()
    menu_add("Debug", tilt_calc_menu, COUNT(tilt_calc_menu));
return 0;

static unsigned int tilt_calc_deinit()
menu_remove("Debug", tilt_calc_menu, COUNT(tilt_calc_menu));
return 0;




Pages: [1]