new file mode 100644
@@ -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
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@ideasonboard.com> --- test/af/af-state-machine.yaml | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 test/af/af-state-machine.yaml