This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Commit 1f014144 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

Menu: dependency flags for continuous AF

(used for rack/stack/follow focus, as these requires it turned off in Canon menu)

--HG--
branch : lua_fix
parent c523bab77c68
......@@ -1118,7 +1118,7 @@ static struct menu_entry focus_menu[] = {
.priv = &follow_focus,
.update = follow_focus_print,
.max = 1,
.depends_on = DEP_LIVEVIEW | DEP_AUTOFOCUS,
.depends_on = DEP_LIVEVIEW | DEP_AUTOFOCUS | DEP_NOT_CONTINUOUS_AF,
.works_best_in = DEP_CFN_AF_BACK_BUTTON,
.help = "Focus with arrow keys. MENU while REC = save focus point.",
......@@ -1145,7 +1145,7 @@ static struct menu_entry focus_menu[] = {
.icon_type = IT_BOOL,
.edit_mode = EM_SHOW_LIVEVIEW,
.help = "[Q]: fix here rack end point. SET+L/R: start point.",
.depends_on = DEP_LIVEVIEW | DEP_AUTOFOCUS,
.depends_on = DEP_LIVEVIEW | DEP_AUTOFOCUS | DEP_NOT_CONTINUOUS_AF,
},
{
.name = "Rack Focus",
......@@ -1153,7 +1153,7 @@ static struct menu_entry focus_menu[] = {
.select = rack_focus_start_delayed,
.icon_type = IT_ACTION,
.help = "Press SET for rack focus, or PLAY to also start recording.",
.depends_on = DEP_LIVEVIEW | DEP_AUTOFOCUS,
.depends_on = DEP_LIVEVIEW | DEP_AUTOFOCUS | DEP_NOT_CONTINUOUS_AF,
.works_best_in = DEP_MOVIE_MODE,
},
#endif
......@@ -1162,7 +1162,7 @@ static struct menu_entry focus_menu[] = {
.name = "Focus Stacking",
.select = menu_open_submenu,
.help = "Takes pictures at different focus points.",
.depends_on = DEP_LIVEVIEW | DEP_AUTOFOCUS | DEP_PHOTO_MODE,
.depends_on = DEP_LIVEVIEW | DEP_AUTOFOCUS | DEP_PHOTO_MODE | DEP_NOT_CONTINUOUS_AF,
.children = (struct menu_entry[]) {
{
.name = "Run focus stack",
......@@ -1231,7 +1231,7 @@ static struct menu_entry focus_menu[] = {
.name = "Focus Settings",
.select = menu_open_submenu,
.help = "Tuning parameters and prefs for rack/stack/follow focus.",
.depends_on = DEP_LIVEVIEW,
.depends_on = DEP_LIVEVIEW | DEP_AUTOFOCUS | DEP_NOT_CONTINUOUS_AF,
.children = (struct menu_entry[]) {
{
.name = "Step Size",
......
......@@ -2373,6 +2373,10 @@ static int check_default_warnings(struct menu_entry * entry, char* warning)
);
else if (DEPENDS_ON(DEP_NOT_SOUND_RECORDING) && sound_recording_enabled())
snprintf(warning, MENU_MAX_WARNING_LEN, "Disable sound recording from Canon menu!");
else if (DEPENDS_ON(DEP_CONTINUOUS_AF) && !is_continuous_af())
snprintf(warning, MENU_MAX_WARNING_LEN, "This feature requires %s AF enabled.", is_movie_mode() ? "movie servo" : "continuous");
else if (DEPENDS_ON(DEP_NOT_CONTINUOUS_AF) && is_continuous_af())
snprintf(warning, MENU_MAX_WARNING_LEN, "This feature requires %s AF disabled.", is_movie_mode() ? "movie servo" : "continuous");
if (warning[0])
return MENU_WARN_NOT_WORKING;
......@@ -2413,7 +2417,11 @@ static int check_default_warnings(struct menu_entry * entry, char* warning)
//~ snprintf(warning, MENU_MAX_WARNING_LEN, "This feature works best with sound recording enabled.");
//~ else if (WORKS_BEST_IN(DEP_NOT_SOUND_RECORDING) && sound_recording_enabled())
//~ snprintf(warning, MENU_MAX_WARNING_LEN, "This feature works best with sound recording disabled.");
//~ else if (WORKS_BEST_IN(DEP_CONTINUOUS_AF) && !is_continuous_af())
//~ snprintf(warning, MENU_MAX_WARNING_LEN, "This feature works best with %s AF enabled.", is_movie_mode() ? "movie servo" : "continuous");
//~ else if (WORKS_BEST_IN(DEP_NOT_CONTINUOUS_AF) && is_continuous_af())
//~ snprintf(warning, MENU_MAX_WARNING_LEN, "This feature works best with %s AF disabled.", is_movie_mode() ? "movie servo" : "continuous");
if (warning[0])
return MENU_WARN_ADVICE;
}
......
......@@ -264,6 +264,9 @@ struct menu_entry
#define DEP_SOUND_RECORDING (1<<14)
#define DEP_NOT_SOUND_RECORDING (1<<15)
#define DEP_CONTINUOUS_AF (1<<16)
#define DEP_NOT_CONTINUOUS_AF (1<<17)
struct menu
{
struct menu * next; /* [auto-set] linked list pointers */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment