[libcamera-devel] [PATCH 10/10] test: af: Introduce a capture script test file
Jean-Michel Hautbois
jeanmichel.hautbois at ideasonboard.com
Mon Jun 13 16:28:53 CEST 2022
When testing the autofocus state machine, it is useful to know which
state is expected for a given frame. Introduce a yaml file to set the AF
controls at given points in time to ease debugging the state machine
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois at ideasonboard.com>
---
test/af/af-state-machine.yaml | 46 +++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 test/af/af-state-machine.yaml
diff --git a/test/af/af-state-machine.yaml b/test/af/af-state-machine.yaml
new file mode 100644
index 00000000..54da3fe2
--- /dev/null
+++ b/test/af/af-state-machine.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: CC0-1.0
+
+# AF controls test script
+#
+# A capture script allows to associate a list of AF controls and their values
+# to frame numbers.
+
+# Manual mode
+# State should be AfStateIdle
+# We can still change LensPosition
+frames:
+ - 1:
+ AfMode: 0
+ LensPosition: 0.0
+
+ - 5:
+ LensPosition: 100.0
+
+ - 10:
+ LensPosition: 500.0
+
+ - 15:
+ LensPosition: 0.0
+
+ - 50:
+# Change to continuous mode
+# State should immediately be AfStateScanning
+# The algorithm should start a scan
+# It will settle on AfStateFocused or AfStateFailed
+ AfMode: 2
+
+ - 80:
+# Change to auto mode
+# The Lens or state should not change until AfTrigger is received
+# Entering this mode will report AfStateIdle
+ AfMode: 1
+ - 90:
+# Start the scan
+ AfTrigger: 0
+ # - 110:
+#Cancel the scan
+ AfTrigger: 1
+
+ - 100:
+# Switch back to continuous
+ AfMode: 2
--
2.34.1
More information about the libcamera-devel
mailing list