summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/af_status.h
blob: 92c088126733038752698878a371937dafc698a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* SPDX-License-Identifier: BSD-2-Clause */
/*
 * Copyright (C) 2022, Raspberry Pi Ltd
 *
 * af_status.h - AF control algorithm status
 */
#pragma once

#include <optional>

/*
 * The AF algorithm should post the following structure into the image's
 * "af.status" metadata. lensSetting should control the lens.
 */

enum class AfState {
	Idle = 0,
	Scanning,
	Focused,
	Failed
};

enum class AfPauseState {
	Running = 0,
	Pausing,
	Paused
};

struct AfStatus {
	/* state for reporting */
	AfState state;
	AfPauseState pauseState;
	/* lensSetting should be sent to the lens driver, when valid */
	std::optional<int> lensSetting;
};