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 45e816ac authored by alex@thinkpad's avatar alex@thinkpad
Browse files

focus.h: added is_continuous_af()

--HG--
branch : lua_fix
parent a8e74ec156b7
......@@ -897,6 +897,13 @@ int is_manual_focus()
return (af_mode & 0xF) == AF_MODE_MANUAL_FOCUS;
}
int is_continuous_af()
{
if (!lv) return 0;
if (is_manual_focus()) return 0;
return is_movie_mode() ? continuous_af_movie : continuous_af_photo;
}
static int trap_focus_autoscaling = 1;
#ifdef FEATURE_TRAP_FOCUS
......
......@@ -6,6 +6,10 @@
/* returns true if the AF/MF switch is in the MF position, or you have a manual lens */
int is_manual_focus();
/* returns true in LiveView, if AF is enabled and
* Continuous AF (photo mode) or Movie Servo AF (movie mode) is selected in Canon menu */
int is_continuous_af();
/* enqueue some focus steps in the focus task */
void lens_focus_enqueue_step(int dir);
......
......@@ -111,6 +111,8 @@ volatile PROP_INT(PROP_AUTO_POWEROFF_TIME, auto_power_off_time)
volatile PROP_INT(PROP_VIDEO_SYSTEM, video_system_pal);
volatile PROP_INT(PROP_LV_FOCUS_STATUS, lv_focus_status);
volatile PROP_INT(PROP_ICU_UILOCK, icu_uilock);
volatile PROP_INT(PROP_CONTINUOUS_AF, continuous_af_photo);
volatile PROP_INT(PROP_MOVIE_SERVO_AF, continuous_af_movie);
#ifdef CONFIG_NO_DEDICATED_MOVIE_MODE
int ae_mode_movie = 1;
......
......@@ -108,6 +108,8 @@ extern int auto_power_off_time;
extern int video_system_pal;
extern int lv_focus_status;
extern int icu_uilock;
extern int continuous_af_photo;
extern int continuous_af_movie;
#endif
#define EXT_MONITOR_CONNECTED (ext_monitor_hdmi || _ext_monitor_rca)
......
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