diff --git a/Opencv/.cxx/Debug/p1g6s634/arm64-v8a/configure_fingerprint.bin b/Opencv/.cxx/Debug/p1g6s634/arm64-v8a/configure_fingerprint.bin
index b114844d..fc191021 100644
--- a/Opencv/.cxx/Debug/p1g6s634/arm64-v8a/configure_fingerprint.bin
+++ b/Opencv/.cxx/Debug/p1g6s634/arm64-v8a/configure_fingerprint.bin
@@ -2,28 +2,28 @@ C/C++ Structured Logx
 v
 tC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\additional_project_files.txtC
 A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint	����3 ����3u
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint	�����3 ����3u
 s
-qC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\android_gradle_build.json	����3�
+qC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\android_gradle_build.json	�����3�
  ����3z
 x
-vC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\android_gradle_build_mini.json	����3� ����3g
+vC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\android_gradle_build_mini.json	�����3� ����3g
 e
-cC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\build.ninja	����3�� ����3k
+cC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\build.ninja	�����3�� ����3k
 i
-gC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\build.ninja.txt	����3p
+gC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\build.ninja.txt	�����3p
 n
-lC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\build_file_index.txt	����3
V ����3q
+lC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\build_file_index.txt	�����3
V ����3q
 o
-mC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\compile_commands.json	����3� ����3u
+mC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\compile_commands.json	�����3� ����3u
 s
-qC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\compile_commands.json.bin	����3	� ����3{
+qC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\compile_commands.json.bin	�����3	� ����3{
 y
-wC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\metadata_generation_command.txt	����3
+wC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\metadata_generation_command.txt	�����3
 � ����3n
 l
-jC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\prefab_config.json	����3
( ����3s
+jC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\prefab_config.json	�����3
( ����3s
 q
-oC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\symbol_folder_index.txt	����3
n ����3Z
+oC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\arm64-v8a\symbol_folder_index.txt	�����3
n ����3Z
 X
-VC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\libcxx_helper\CMakeLists.txt	����3
� �֝��3
\ No newline at end of file
+VC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\libcxx_helper\CMakeLists.txt	�����3
� �֝��3
\ No newline at end of file
diff --git a/Opencv/.cxx/Debug/p1g6s634/armeabi-v7a/configure_fingerprint.bin b/Opencv/.cxx/Debug/p1g6s634/armeabi-v7a/configure_fingerprint.bin
index 11cd9f78..d980cd9c 100644
--- a/Opencv/.cxx/Debug/p1g6s634/armeabi-v7a/configure_fingerprint.bin
+++ b/Opencv/.cxx/Debug/p1g6s634/armeabi-v7a/configure_fingerprint.bin
@@ -2,28 +2,28 @@ C/C++ Structured Logz
 x
 vC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\additional_project_files.txtC
 A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint	ċ���3 �ש��3w
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint	����3 �ש��3w
 u
-sC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\android_gradle_build.json	ċ���3�
+sC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\android_gradle_build.json	����3�
  �ש��3|
 z
-xC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\android_gradle_build_mini.json	ċ���3� �ש��3i
+xC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\android_gradle_build_mini.json	����3� �ש��3i
 g
-eC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\build.ninja	ċ���3�� �֩��3m
+eC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\build.ninja	����3�� �֩��3m
 k
-iC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\build.ninja.txt	ċ���3r
+iC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\build.ninja.txt	����3r
 p
-nC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\build_file_index.txt	ċ���3
V �ש��3s
+nC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\build_file_index.txt	����3
V �ש��3s
 q
-oC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\compile_commands.json	ċ���3� �֩��3w
+oC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\compile_commands.json	����3� �֩��3w
 u
-sC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\compile_commands.json.bin	ċ���3	� �֩��3}
+sC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\compile_commands.json.bin	����3	� �֩��3}
 {
-yC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\metadata_generation_command.txt	ċ���3
+yC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\metadata_generation_command.txt	����3
 � �ש��3p
 n
-lC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\prefab_config.json	ċ���3
( �ש��3u
+lC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\prefab_config.json	����3
( �ש��3u
 s
-qC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\symbol_folder_index.txt	ċ���3
p �ש��3Z
+qC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\armeabi-v7a\symbol_folder_index.txt	����3
p �ש��3Z
 X
-VC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\libcxx_helper\CMakeLists.txt	ċ���3
� �֝��3
\ No newline at end of file
+VC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\libcxx_helper\CMakeLists.txt	����3
� �֝��3
\ No newline at end of file
diff --git a/Opencv/.cxx/Debug/p1g6s634/x86/configure_fingerprint.bin b/Opencv/.cxx/Debug/p1g6s634/x86/configure_fingerprint.bin
index fcfc5aed..681f294b 100644
--- a/Opencv/.cxx/Debug/p1g6s634/x86/configure_fingerprint.bin
+++ b/Opencv/.cxx/Debug/p1g6s634/x86/configure_fingerprint.bin
@@ -2,28 +2,28 @@ C/C++ Structured Logr
 p
 nC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\additional_project_files.txtC
 A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint	����3 ��ʛ�3o
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint	����3 ��ʛ�3o
 m
-kC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\android_gradle_build.json	����3�
+kC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\android_gradle_build.json	����3�
  ��ʛ�3t
 r
-pC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\android_gradle_build_mini.json	����3� ��ʛ�3a
+pC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\android_gradle_build_mini.json	����3� ��ʛ�3a
 _
-]C:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\build.ninja	����3�� ��ʛ�3e
+]C:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\build.ninja	����3�� ��ʛ�3e
 c
-aC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\build.ninja.txt	����3j
+aC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\build.ninja.txt	����3j
 h
-fC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\build_file_index.txt	����3
V ��ʛ�3k
+fC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\build_file_index.txt	����3
V ��ʛ�3k
 i
-gC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\compile_commands.json	����3� ��ʛ�3o
+gC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\compile_commands.json	����3� ��ʛ�3o
 m
-kC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\compile_commands.json.bin	����3	� ��ʛ�3u
+kC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\compile_commands.json.bin	����3	� ��ʛ�3u
 s
-qC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\metadata_generation_command.txt	����3
+qC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\metadata_generation_command.txt	����3
 � ��ʛ�3h
 f
-dC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\prefab_config.json	����3
( ��ʛ�3m
+dC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\prefab_config.json	����3
( ��ʛ�3m
 k
-iC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\symbol_folder_index.txt	����3
h ��ʛ�3Z
+iC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86\symbol_folder_index.txt	����3
h ��ʛ�3Z
 X
-VC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\libcxx_helper\CMakeLists.txt	����3
� �֝��3
\ No newline at end of file
+VC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\libcxx_helper\CMakeLists.txt	����3
� �֝��3
\ No newline at end of file
diff --git a/Opencv/.cxx/Debug/p1g6s634/x86_64/configure_fingerprint.bin b/Opencv/.cxx/Debug/p1g6s634/x86_64/configure_fingerprint.bin
index 545bdf64..7022580e 100644
--- a/Opencv/.cxx/Debug/p1g6s634/x86_64/configure_fingerprint.bin
+++ b/Opencv/.cxx/Debug/p1g6s634/x86_64/configure_fingerprint.bin
@@ -2,28 +2,28 @@ C/C++ Structured Logu
 s
 qC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\additional_project_files.txtC
 A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint	⎯��3 �婜�3r
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint	����3 �婜�3r
 p
-nC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\android_gradle_build.json	⎯��3�
+nC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\android_gradle_build.json	����3�
  �婜�3w
 u
-sC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\android_gradle_build_mini.json	⎯��3� �婜�3d
+sC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\android_gradle_build_mini.json	����3� �婜�3d
 b
-`C:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\build.ninja	⎯��3�� �䩜�3h
+`C:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\build.ninja	����3�� �䩜�3h
 f
-dC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\build.ninja.txt	⎯��3m
+dC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\build.ninja.txt	����3m
 k
-iC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\build_file_index.txt	⎯��3
V �婜�3n
+iC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\build_file_index.txt	����3
V �婜�3n
 l
-jC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\compile_commands.json	⎯��3� �䩜�3r
+jC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\compile_commands.json	����3� �䩜�3r
 p
-nC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\compile_commands.json.bin	⎯��3	� �䩜�3x
+nC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\compile_commands.json.bin	����3	� �䩜�3x
 v
-tC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\metadata_generation_command.txt	⎯��3
+tC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\metadata_generation_command.txt	����3
 � �婜�3k
 i
-gC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\prefab_config.json	⎯��3
( �婜�3p
+gC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\prefab_config.json	����3
( �婜�3p
 n
-lC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\symbol_folder_index.txt	⎯��3
k �婜�3Z
+lC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\.cxx\Debug\p1g6s634\x86_64\symbol_folder_index.txt	����3
k �婜�3Z
 X
-VC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\libcxx_helper\CMakeLists.txt	⎯��3
� �֝��3
\ No newline at end of file
+VC:\Users\24171\OneDrive\Desktop\msdk\400apiqwq\ams\Opencv\libcxx_helper\CMakeLists.txt	����3
� �֝��3
\ No newline at end of file
diff --git a/Opencv/.cxx/tools/release/x86/compile_commands.json b/Opencv/.cxx/tools/release/x86/compile_commands.json
index e77dce5f..668baca2 100644
--- a/Opencv/.cxx/tools/release/x86/compile_commands.json
+++ b/Opencv/.cxx/tools/release/x86/compile_commands.json
@@ -1,7 +1,7 @@
 [
 {
-  "directory": "C:/Users/24171/OneDrive/Desktop/msdk/400apiqwq/ams/Opencv/.cxx/RelWithDebInfo/193z4w1c/x86",
-  "command": "D:\\androidstudio\\sdk\\ndk\\23.1.7779620\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang++.exe --target=i686-none-linux-android24 --sysroot=D:/androidstudio/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fexceptions -frtti -stdlib=libc++ -O2 -g -DNDEBUG -fPIC -o CMakeFiles\\opencv_jni_shared.dir\\dummy.cpp.o -c C:\\Users\\24171\\OneDrive\\Desktop\\msdk\\400apiqwq\\ams\\Opencv\\libcxx_helper\\dummy.cpp",
+  "directory": "C:/Users/24171/OneDrive/Desktop/msdk/400apiqwq/ams/Opencv/.cxx/RelWithDebInfo/3o382i2a/x86",
+  "command": "D:\\androidstudio\\sdk\\ndk\\29.0.14206865\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang++.exe --target=i686-none-linux-android24 --sysroot=D:/androidstudio/sdk/ndk/29.0.14206865/toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -O2 -g -DNDEBUG -fPIC -o CMakeFiles\\opencv_jni_shared.dir\\dummy.cpp.o -c C:\\Users\\24171\\OneDrive\\Desktop\\msdk\\400apiqwq\\ams\\Opencv\\libcxx_helper\\dummy.cpp",
   "file": "C:\\Users\\24171\\OneDrive\\Desktop\\msdk\\400apiqwq\\ams\\Opencv\\libcxx_helper\\dummy.cpp"
 }
 ]
\ No newline at end of file
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_1236_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_1236_timing.txt
index 918c8e9f..24073817 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_1236_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_1236_timing.txt
@@ -1,3 +1,9 @@
 # C/C++ build system timings
 generate_cxx_metadata 22ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 16ms
+  [gap of 16ms]
+generate_cxx_metadata completed in 36ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_219_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_219_timing.txt
index 53b29857..8fb6bb4a 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_219_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_219_timing.txt
@@ -13,3 +13,26 @@ generate_cxx_metadata
   write-metadata-json-to-file 15ms
 generate_cxx_metadata completed in 164ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 18ms]
+  create-invalidation-state 65ms
+  [gap of 41ms]
+generate_cxx_metadata completed in 124ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 17ms]
+  create-invalidation-state 53ms
+  [gap of 24ms]
+  write-metadata-json-to-file 10ms
+generate_cxx_metadata completed in 106ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 18ms]
+  create-invalidation-state 50ms
+  [gap of 29ms]
+  write-metadata-json-to-file 10ms
+generate_cxx_metadata completed in 108ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_220_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_220_timing.txt
index 4ecf4c2c..4c07c13f 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_220_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_220_timing.txt
@@ -26,3 +26,26 @@ generate_cxx_metadata
   [gap of 36ms]
 generate_cxx_metadata completed in 102ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 19ms]
+  create-invalidation-state 51ms
+  [gap of 23ms]
+  write-metadata-json-to-file 10ms
+generate_cxx_metadata completed in 104ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 16ms]
+  create-invalidation-state 53ms
+  [gap of 37ms]
+generate_cxx_metadata completed in 106ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 14ms]
+  create-invalidation-state 67ms
+  [gap of 33ms]
+  write-metadata-json-to-file 10ms
+generate_cxx_metadata completed in 125ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_222_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_222_timing.txt
index 528b0e11..5d17c846 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_222_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_222_timing.txt
@@ -34,3 +34,25 @@ generate_cxx_metadata
   [gap of 39ms]
 generate_cxx_metadata completed in 114ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 18ms]
+  create-invalidation-state 57ms
+  [gap of 29ms]
+  write-metadata-json-to-file 11ms
+generate_cxx_metadata completed in 117ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 17ms]
+  create-invalidation-state 53ms
+  [gap of 44ms]
+generate_cxx_metadata completed in 114ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 14ms]
+  create-invalidation-state 35ms
+  [gap of 34ms]
+generate_cxx_metadata completed in 83ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_223_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_223_timing.txt
index 8e5662e3..965073ff 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_223_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_223_timing.txt
@@ -34,3 +34,18 @@ generate_cxx_metadata
   [gap of 37ms]
 generate_cxx_metadata completed in 119ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 19ms]
+  create-invalidation-state 67ms
+  [gap of 45ms]
+  write-metadata-json-to-file 16ms
+generate_cxx_metadata completed in 150ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 14ms]
+  create-invalidation-state 37ms
+  [gap of 30ms]
+generate_cxx_metadata completed in 81ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_224_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_224_timing.txt
index 69796eb9..8f8095f0 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_224_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_224_timing.txt
@@ -41,3 +41,39 @@ generate_cxx_metadata
   write-metadata-json-to-file 12ms
 generate_cxx_metadata completed in 125ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 22ms]
+  create-invalidation-state 91ms
+  [gap of 38ms]
+generate_cxx_metadata completed in 151ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 16ms]
+  create-invalidation-state 64ms
+  [gap of 32ms]
+  write-metadata-json-to-file 11ms
+generate_cxx_metadata completed in 124ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 17ms]
+  create-invalidation-state 57ms
+  [gap of 48ms]
+generate_cxx_metadata completed in 122ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 12ms]
+  create-invalidation-state 38ms
+  [gap of 23ms]
+generate_cxx_metadata completed in 73ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 18ms]
+  create-invalidation-state 49ms
+  [gap of 29ms]
+generate_cxx_metadata completed in 96ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_225_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_225_timing.txt
index 81769851..6e9c20b0 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_225_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_225_timing.txt
@@ -19,3 +19,17 @@ generate_cxx_metadata
   [gap of 38ms]
 generate_cxx_metadata completed in 108ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 26ms]
+  create-invalidation-state 76ms
+  [gap of 36ms]
+generate_cxx_metadata completed in 138ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 17ms]
+  create-invalidation-state 59ms
+  [gap of 38ms]
+generate_cxx_metadata completed in 114ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_226_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_226_timing.txt
index b66f90e4..ad457be4 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_226_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_226_timing.txt
@@ -26,3 +26,41 @@ generate_cxx_metadata
   [gap of 27ms]
 generate_cxx_metadata completed in 82ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 18ms]
+  create-invalidation-state 56ms
+  [gap of 38ms]
+  write-metadata-json-to-file 10ms
+generate_cxx_metadata completed in 123ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 15ms]
+  create-invalidation-state 51ms
+  [gap of 35ms]
+generate_cxx_metadata completed in 101ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 20ms]
+  create-invalidation-state 49ms
+  [gap of 39ms]
+generate_cxx_metadata completed in 108ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 22ms]
+  create-invalidation-state 73ms
+  [gap of 39ms]
+  write-metadata-json-to-file 12ms
+generate_cxx_metadata completed in 147ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 16ms]
+  create-invalidation-state 50ms
+  [gap of 26ms]
+  write-metadata-json-to-file 10ms
+generate_cxx_metadata completed in 103ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_228_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_228_timing.txt
index 9b399324..6387c64a 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_228_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_228_timing.txt
@@ -26,3 +26,25 @@ generate_cxx_metadata
   [gap of 31ms]
 generate_cxx_metadata completed in 92ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 18ms]
+  create-invalidation-state 54ms
+  [gap of 29ms]
+generate_cxx_metadata completed in 101ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 18ms]
+  create-invalidation-state 56ms
+  [gap of 28ms]
+  write-metadata-json-to-file 14ms
+generate_cxx_metadata completed in 118ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 22ms]
+  create-invalidation-state 41ms
+  [gap of 29ms]
+generate_cxx_metadata completed in 92ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_232_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_232_timing.txt
index 1da33d54..3101e677 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_232_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_232_timing.txt
@@ -42,3 +42,10 @@ generate_cxx_metadata
   [gap of 37ms]
 generate_cxx_metadata completed in 101ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 15ms]
+  create-invalidation-state 44ms
+  [gap of 30ms]
+generate_cxx_metadata completed in 89ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_233_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_233_timing.txt
index d27fea17..de96743a 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_233_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_233_timing.txt
@@ -27,3 +27,40 @@ generate_cxx_metadata
   [gap of 44ms]
 generate_cxx_metadata completed in 111ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 23ms]
+  create-invalidation-state 68ms
+  [gap of 34ms]
+  write-metadata-json-to-file 13ms
+generate_cxx_metadata completed in 140ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 19ms]
+  create-invalidation-state 51ms
+  [gap of 37ms]
+generate_cxx_metadata completed in 107ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 19ms]
+  create-invalidation-state 48ms
+  [gap of 29ms]
+generate_cxx_metadata completed in 96ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 16ms]
+  create-invalidation-state 42ms
+  [gap of 41ms]
+generate_cxx_metadata completed in 99ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 23ms]
+  create-invalidation-state 68ms
+  [gap of 33ms]
+  write-metadata-json-to-file 13ms
+generate_cxx_metadata completed in 139ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_234_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_234_timing.txt
index 023ae1f5..dd3d4075 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_234_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_234_timing.txt
@@ -43,3 +43,18 @@ generate_cxx_metadata
   write-metadata-json-to-file 13ms
 generate_cxx_metadata completed in 173ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 22ms]
+  create-invalidation-state 56ms
+  [gap of 31ms]
+  write-metadata-json-to-file 10ms
+generate_cxx_metadata completed in 121ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 12ms]
+  create-invalidation-state 32ms
+  [gap of 26ms]
+generate_cxx_metadata completed in 70ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_427_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_427_timing.txt
index 84f9748c..23f025cd 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_427_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_427_timing.txt
@@ -4,3 +4,9 @@ generate_cxx_metadata 29ms
 # C/C++ build system timings
 generate_cxx_metadata 27ms
 
+# C/C++ build system timings
+generate_cxx_metadata 22ms
+
+# C/C++ build system timings
+generate_cxx_metadata 20ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_463_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_463_timing.txt
index 9268e38b..bb4463e8 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_463_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_463_timing.txt
@@ -6,3 +6,6 @@ generate_cxx_metadata
   write-metadata-json-to-file 10ms
 generate_cxx_metadata completed in 164ms
 
+# C/C++ build system timings
+generate_cxx_metadata 23ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_479_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_479_timing.txt
index 1b4437f6..0c3c6ce2 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_479_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_479_timing.txt
@@ -4,3 +4,9 @@ generate_cxx_metadata
   [gap of 20ms]
 generate_cxx_metadata completed in 43ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 11ms
+  [gap of 17ms]
+generate_cxx_metadata completed in 32ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_480_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_480_timing.txt
index 038908f8..18c69ff3 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_480_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_480_timing.txt
@@ -10,3 +10,9 @@ generate_cxx_metadata 25ms
 # C/C++ build system timings
 generate_cxx_metadata 22ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 17ms
+  [gap of 15ms]
+generate_cxx_metadata completed in 38ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_482_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_482_timing.txt
index 6c6ff07b..15d04dc5 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_482_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_482_timing.txt
@@ -4,3 +4,15 @@ generate_cxx_metadata
   [gap of 24ms]
 generate_cxx_metadata completed in 71ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 23ms
+  [gap of 22ms]
+generate_cxx_metadata completed in 52ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 11ms
+  [gap of 14ms]
+generate_cxx_metadata completed in 29ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_486_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_486_timing.txt
index 2bd5ec39..a1df64f3 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_486_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_486_timing.txt
@@ -5,3 +5,15 @@ generate_cxx_metadata
   [gap of 40ms]
 generate_cxx_metadata completed in 141ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 10ms
+  [gap of 14ms]
+generate_cxx_metadata completed in 27ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 15ms
+  [gap of 13ms]
+generate_cxx_metadata completed in 33ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_497_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_497_timing.txt
index dde1eab0..8677c03f 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_497_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_497_timing.txt
@@ -16,3 +16,9 @@ generate_cxx_metadata
   [gap of 17ms]
 generate_cxx_metadata completed in 30ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 10ms
+  [gap of 18ms]
+generate_cxx_metadata completed in 32ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_499_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_499_timing.txt
index 754775d1..7d04ed6f 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_499_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_499_timing.txt
@@ -4,3 +4,9 @@ generate_cxx_metadata
   [gap of 19ms]
 generate_cxx_metadata completed in 36ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 12ms
+  [gap of 17ms]
+generate_cxx_metadata completed in 35ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_670_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_670_timing.txt
index 70673fd4..fc612ff0 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_670_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_670_timing.txt
@@ -7,3 +7,6 @@ generate_cxx_metadata completed in 28ms
 # C/C++ build system timings
 generate_cxx_metadata 23ms
 
+# C/C++ build system timings
+generate_cxx_metadata 16ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_700_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_700_timing.txt
index 0deb7247..7297d960 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_700_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/generate_cxx_metadata_700_timing.txt
@@ -4,3 +4,9 @@ generate_cxx_metadata
   [gap of 16ms]
 generate_cxx_metadata completed in 32ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 15ms
+  [gap of 16ms]
+generate_cxx_metadata completed in 34ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/metadata_generation_record.json b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/metadata_generation_record.json
index 27363b98..cb4f3345 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/metadata_generation_record.json
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/arm64-v8a/metadata_generation_record.json
@@ -11,7 +11,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": 376961765
+    "memoizedHashCode": 1793695528
   },
   {
     "level_": 0,
@@ -25,7 +25,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -191520207
+    "memoizedHashCode": 1225213556
   },
   {
     "level_": 0,
@@ -39,6 +39,6 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -1576149053
+    "memoizedHashCode": -159415290
   }
 ]
\ No newline at end of file
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_1236_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_1236_timing.txt
index 5e2a36b0..ed1b7eed 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_1236_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_1236_timing.txt
@@ -1,3 +1,6 @@
 # C/C++ build system timings
 generate_cxx_metadata 18ms
 
+# C/C++ build system timings
+generate_cxx_metadata 22ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_221_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_221_timing.txt
index 11ba681f..bda9f05e 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_221_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_221_timing.txt
@@ -10,3 +10,9 @@ generate_cxx_metadata
   [gap of 13ms]
 generate_cxx_metadata completed in 28ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 11ms
+  [gap of 13ms]
+generate_cxx_metadata completed in 28ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_222_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_222_timing.txt
index dc8cb3ae..2d14bd79 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_222_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_222_timing.txt
@@ -4,3 +4,9 @@ generate_cxx_metadata 19ms
 # C/C++ build system timings
 generate_cxx_metadata 21ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 12ms
+  [gap of 14ms]
+generate_cxx_metadata completed in 30ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_225_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_225_timing.txt
index 6ee942cd..3aec75c2 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_225_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_225_timing.txt
@@ -7,3 +7,6 @@ generate_cxx_metadata completed in 40ms
 # C/C++ build system timings
 generate_cxx_metadata 25ms
 
+# C/C++ build system timings
+generate_cxx_metadata 22ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_234_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_234_timing.txt
index b18d7877..4b7db91a 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_234_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_234_timing.txt
@@ -16,3 +16,12 @@ generate_cxx_metadata
   [gap of 18ms]
 generate_cxx_metadata completed in 33ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 11ms
+  [gap of 13ms]
+generate_cxx_metadata completed in 27ms
+
+# C/C++ build system timings
+generate_cxx_metadata 17ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_427_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_427_timing.txt
index 7aff7801..6960a7d0 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_427_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_427_timing.txt
@@ -4,3 +4,9 @@ generate_cxx_metadata
   [gap of 16ms]
 generate_cxx_metadata completed in 27ms
 
+# C/C++ build system timings
+generate_cxx_metadata 18ms
+
+# C/C++ build system timings
+generate_cxx_metadata 20ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_499_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_499_timing.txt
index dfb5d799..935749c0 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_499_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_499_timing.txt
@@ -4,3 +4,9 @@ generate_cxx_metadata
   [gap of 16ms]
 generate_cxx_metadata completed in 31ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 10ms
+  [gap of 13ms]
+generate_cxx_metadata completed in 25ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_670_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_670_timing.txt
index 6443fc50..97cf92c8 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_670_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/generate_cxx_metadata_670_timing.txt
@@ -1,3 +1,6 @@
 # C/C++ build system timings
 generate_cxx_metadata 14ms
 
+# C/C++ build system timings
+generate_cxx_metadata 17ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/metadata_generation_record.json b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/metadata_generation_record.json
index b18e8c4f..334c139c 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/metadata_generation_record.json
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/armeabi-v7a/metadata_generation_record.json
@@ -11,7 +11,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -1605359535
+    "memoizedHashCode": -659995836
   },
   {
     "level_": 0,
@@ -25,7 +25,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": 1362017693
+    "memoizedHashCode": -1987585904
   },
   {
     "level_": 0,
@@ -39,6 +39,6 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": 7840945
+    "memoizedHashCode": 953204644
   }
 ]
\ No newline at end of file
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_1490_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_1490_timing.txt
index 42bf85ec..20fe19f2 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_1490_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_1490_timing.txt
@@ -1,3 +1,9 @@
 # C/C++ build system timings
 generate_cxx_metadata 12ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 11ms
+  [gap of 15ms]
+generate_cxx_metadata completed in 29ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_222_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_222_timing.txt
index 42b09bb9..bfe03d77 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_222_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_222_timing.txt
@@ -4,3 +4,6 @@ generate_cxx_metadata 19ms
 # C/C++ build system timings
 generate_cxx_metadata 18ms
 
+# C/C++ build system timings
+generate_cxx_metadata 20ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_225_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_225_timing.txt
index 794a816d..ea08fdc8 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_225_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_225_timing.txt
@@ -10,3 +10,6 @@ generate_cxx_metadata 24ms
 # C/C++ build system timings
 generate_cxx_metadata 14ms
 
+# C/C++ build system timings
+generate_cxx_metadata 15ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_227_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_227_timing.txt
index 949d11ab..743f4e97 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_227_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_227_timing.txt
@@ -7,3 +7,9 @@ generate_cxx_metadata 19ms
 # C/C++ build system timings
 generate_cxx_metadata 22ms
 
+# C/C++ build system timings
+generate_cxx_metadata 17ms
+
+# C/C++ build system timings
+generate_cxx_metadata 15ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_230_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_230_timing.txt
index da104fd9..2b810802 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_230_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_230_timing.txt
@@ -3,3 +3,9 @@ generate_cxx_metadata
   create-invalidation-state 10ms
 generate_cxx_metadata completed in 21ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 10ms
+  [gap of 15ms]
+generate_cxx_metadata completed in 29ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_231_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_231_timing.txt
index 9a997150..ebbfeb14 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_231_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_231_timing.txt
@@ -7,3 +7,12 @@ generate_cxx_metadata 20ms
 # C/C++ build system timings
 generate_cxx_metadata 18ms
 
+# C/C++ build system timings
+generate_cxx_metadata 19ms
+
+# C/C++ build system timings
+generate_cxx_metadata 16ms
+
+# C/C++ build system timings
+generate_cxx_metadata 21ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_234_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_234_timing.txt
index d1e131f3..21bf25e5 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_234_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_234_timing.txt
@@ -4,3 +4,6 @@ generate_cxx_metadata 18ms
 # C/C++ build system timings
 generate_cxx_metadata 24ms
 
+# C/C++ build system timings
+generate_cxx_metadata 21ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_32_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_32_timing.txt
index 617c98f3..672afcde 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_32_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_32_timing.txt
@@ -54,3 +54,186 @@ generate_cxx_metadata
   write-metadata-json-to-file 20ms
 generate_cxx_metadata completed in 233ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 240ms]
+  create-invalidation-state 153ms
+  [gap of 139ms]
+  write-metadata-json-to-file 29ms
+  [gap of 16ms]
+generate_cxx_metadata completed in 577ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 52ms]
+  create-invalidation-state 162ms
+  [gap of 51ms]
+  write-metadata-json-to-file 23ms
+generate_cxx_metadata completed in 290ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 31ms]
+  create-invalidation-state 105ms
+  [gap of 102ms]
+  write-metadata-json-to-file 13ms
+generate_cxx_metadata completed in 253ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 29ms]
+  create-invalidation-state 75ms
+  [gap of 43ms]
+  write-metadata-json-to-file 18ms
+generate_cxx_metadata completed in 168ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 57ms]
+  create-invalidation-state 102ms
+  [gap of 52ms]
+  write-metadata-json-to-file 21ms
+generate_cxx_metadata completed in 235ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 27ms]
+  create-invalidation-state 71ms
+  [gap of 38ms]
+  write-metadata-json-to-file 15ms
+generate_cxx_metadata completed in 153ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 80ms]
+  create-invalidation-state 376ms
+  [gap of 106ms]
+  write-metadata-json-to-file 30ms
+generate_cxx_metadata completed in 593ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 34ms]
+  create-invalidation-state 85ms
+  [gap of 47ms]
+  write-metadata-json-to-file 27ms
+generate_cxx_metadata completed in 195ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 32ms]
+  create-invalidation-state 86ms
+  [gap of 57ms]
+  write-metadata-json-to-file 24ms
+generate_cxx_metadata completed in 201ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 74ms]
+  create-invalidation-state 146ms
+  [gap of 51ms]
+  write-metadata-json-to-file 46ms
+generate_cxx_metadata completed in 319ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 12ms
+  [gap of 24ms]
+generate_cxx_metadata completed in 41ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 234ms]
+  create-invalidation-state 521ms
+  [gap of 650ms]
+  write-metadata-json-to-file 95ms
+  [gap of 22ms]
+generate_cxx_metadata completed in 1522ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 29ms]
+  create-invalidation-state 1140ms
+  [gap of 116ms]
+  write-metadata-json-to-file 434ms
+generate_cxx_metadata completed in 1720ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 52ms]
+  create-invalidation-state 124ms
+  [gap of 66ms]
+  write-metadata-json-to-file 56ms
+generate_cxx_metadata completed in 299ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 81ms]
+  create-invalidation-state 287ms
+  [gap of 316ms]
+  write-metadata-json-to-file 49ms
+generate_cxx_metadata completed in 737ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 130ms]
+  create-invalidation-state 768ms
+  [gap of 633ms]
+  write-metadata-json-to-file 165ms
+generate_cxx_metadata completed in 1701ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 25ms]
+  create-invalidation-state 68ms
+  [gap of 34ms]
+  write-metadata-json-to-file 11ms
+generate_cxx_metadata completed in 139ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 301ms]
+  create-invalidation-state 237ms
+  [gap of 78ms]
+  write-metadata-json-to-file 55ms
+generate_cxx_metadata completed in 676ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 28ms]
+  create-invalidation-state 67ms
+  [gap of 39ms]
+generate_cxx_metadata completed in 134ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 26ms]
+  create-invalidation-state 59ms
+  [gap of 33ms]
+  write-metadata-json-to-file 12ms
+generate_cxx_metadata completed in 132ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 58ms]
+  create-invalidation-state 106ms
+  [gap of 75ms]
+  write-metadata-json-to-file 57ms
+generate_cxx_metadata completed in 297ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 23ms]
+  create-invalidation-state 61ms
+  [gap of 30ms]
+  write-metadata-json-to-file 13ms
+generate_cxx_metadata completed in 128ms
+
+# C/C++ build system timings
+generate_cxx_metadata
+  [gap of 23ms]
+  create-invalidation-state 66ms
+  [gap of 33ms]
+  write-metadata-json-to-file 14ms
+generate_cxx_metadata completed in 139ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_427_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_427_timing.txt
index 67c0b7be..784e6608 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_427_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_427_timing.txt
@@ -1,3 +1,9 @@
 # C/C++ build system timings
 generate_cxx_metadata 30ms
 
+# C/C++ build system timings
+generate_cxx_metadata 14ms
+
+# C/C++ build system timings
+generate_cxx_metadata 14ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_492_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_492_timing.txt
index 3ca97fe6..8ff06d46 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_492_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_492_timing.txt
@@ -4,3 +4,9 @@ generate_cxx_metadata 18ms
 # C/C++ build system timings
 generate_cxx_metadata 18ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 10ms
+  [gap of 14ms]
+generate_cxx_metadata completed in 28ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_499_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_499_timing.txt
index f655d5c2..a38a1798 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_499_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_499_timing.txt
@@ -4,3 +4,9 @@ generate_cxx_metadata
   [gap of 14ms]
 generate_cxx_metadata completed in 27ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 12ms
+  [gap of 13ms]
+generate_cxx_metadata completed in 27ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_670_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_670_timing.txt
index 6443fc50..e7aa883f 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_670_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/generate_cxx_metadata_670_timing.txt
@@ -1,3 +1,6 @@
 # C/C++ build system timings
 generate_cxx_metadata 14ms
 
+# C/C++ build system timings
+generate_cxx_metadata 14ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/metadata_generation_record.json b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/metadata_generation_record.json
index b55c6ba4..a380c2f6 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/metadata_generation_record.json
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86/metadata_generation_record.json
@@ -11,7 +11,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": 1583171257
+    "memoizedHashCode": -1766432340
   },
   {
     "level_": 0,
@@ -25,7 +25,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": 1113662725
+    "memoizedHashCode": 2059026424
   },
   {
     "level_": 0,
@@ -39,6 +39,6 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -297153467
+    "memoizedHashCode": 648210232
   }
 ]
\ No newline at end of file
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_222_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_222_timing.txt
index 5e2a36b0..2c8aebe5 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_222_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_222_timing.txt
@@ -1,3 +1,9 @@
 # C/C++ build system timings
 generate_cxx_metadata 18ms
 
+# C/C++ build system timings
+generate_cxx_metadata
+  create-invalidation-state 10ms
+  [gap of 11ms]
+generate_cxx_metadata completed in 26ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_224_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_224_timing.txt
index baaff49d..4758f8f7 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_224_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_224_timing.txt
@@ -4,3 +4,6 @@ generate_cxx_metadata 18ms
 # C/C++ build system timings
 generate_cxx_metadata 20ms
 
+# C/C++ build system timings
+generate_cxx_metadata 19ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_225_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_225_timing.txt
index e4c7f6ad..626618c6 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_225_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_225_timing.txt
@@ -16,3 +16,18 @@ generate_cxx_metadata 15ms
 # C/C++ build system timings
 generate_cxx_metadata 18ms
 
+# C/C++ build system timings
+generate_cxx_metadata 21ms
+
+# C/C++ build system timings
+generate_cxx_metadata 16ms
+
+# C/C++ build system timings
+generate_cxx_metadata 24ms
+
+# C/C++ build system timings
+generate_cxx_metadata 13ms
+
+# C/C++ build system timings
+generate_cxx_metadata 16ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_226_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_226_timing.txt
index eb75d795..87228448 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_226_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_226_timing.txt
@@ -16,3 +16,12 @@ generate_cxx_metadata 14ms
 # C/C++ build system timings
 generate_cxx_metadata 15ms
 
+# C/C++ build system timings
+generate_cxx_metadata 19ms
+
+# C/C++ build system timings
+generate_cxx_metadata 20ms
+
+# C/C++ build system timings
+generate_cxx_metadata 14ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_492_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_492_timing.txt
index cb4cc7da..f4cba0b9 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_492_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_492_timing.txt
@@ -7,3 +7,9 @@ generate_cxx_metadata completed in 38ms
 # C/C++ build system timings
 generate_cxx_metadata 16ms
 
+# C/C++ build system timings
+generate_cxx_metadata 18ms
+
+# C/C++ build system timings
+generate_cxx_metadata 23ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_499_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_499_timing.txt
index e8a232bb..add86c46 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_499_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_499_timing.txt
@@ -4,3 +4,6 @@ generate_cxx_metadata
   [gap of 18ms]
 generate_cxx_metadata completed in 35ms
 
+# C/C++ build system timings
+generate_cxx_metadata 18ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_670_timing.txt b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_670_timing.txt
index c3ae8b1e..b2d0e04e 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_670_timing.txt
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/generate_cxx_metadata_670_timing.txt
@@ -1,3 +1,6 @@
 # C/C++ build system timings
 generate_cxx_metadata 13ms
 
+# C/C++ build system timings
+generate_cxx_metadata 14ms
+
diff --git a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/metadata_generation_record.json b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/metadata_generation_record.json
index 38b0f6a0..4161ea40 100644
--- a/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/metadata_generation_record.json
+++ b/Opencv/build/intermediates/cxx/Debug/p1g6s634/logs/x86_64/metadata_generation_record.json
@@ -11,7 +11,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": 24305719
+    "memoizedHashCode": 969669418
   },
   {
     "level_": 0,
@@ -25,7 +25,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -1873235809
+    "memoizedHashCode": -927872110
   },
   {
     "level_": 0,
@@ -39,6 +39,6 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": 851221716
+    "memoizedHashCode": 1796585415
   }
 ]
\ No newline at end of file
diff --git a/Opencv/build/intermediates/cxx/abi_configuration_4s4k1647.log b/Opencv/build/intermediates/cxx/abi_configuration_4s4k1647.log
index 3e4a1d89..8cae43f6 100644
--- a/Opencv/build/intermediates/cxx/abi_configuration_4s4k1647.log
+++ b/Opencv/build/intermediates/cxx/abi_configuration_4s4k1647.log
@@ -11,6 +11,6 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -1522622624
+    "memoizedHashCode": -105888861
   }
 ]
\ No newline at end of file
diff --git a/Opencv/build/intermediates/cxx/create_cxx_tasks_1835_timing.txt b/Opencv/build/intermediates/cxx/create_cxx_tasks_1835_timing.txt
index 841dfd40..fd80a3b5 100644
--- a/Opencv/build/intermediates/cxx/create_cxx_tasks_1835_timing.txt
+++ b/Opencv/build/intermediates/cxx/create_cxx_tasks_1835_timing.txt
@@ -8,3 +8,8 @@ create_cxx_tasks
   [gap of 10ms]
 create_cxx_tasks completed in 82ms
 
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model 52ms
+create_cxx_tasks completed in 58ms
+
diff --git a/Opencv/build/intermediates/cxx/create_cxx_tasks_302_timing.txt b/Opencv/build/intermediates/cxx/create_cxx_tasks_302_timing.txt
index 75be5b5d..8e3a9ead 100644
--- a/Opencv/build/intermediates/cxx/create_cxx_tasks_302_timing.txt
+++ b/Opencv/build/intermediates/cxx/create_cxx_tasks_302_timing.txt
@@ -66,3 +66,77 @@ create_cxx_tasks
   create-initial-cxx-model completed in 88ms
 create_cxx_tasks completed in 95ms
 
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 17ms
+    create-variant-model 12ms
+    create-ARMEABI_V7A-model 24ms
+    [gap of 13ms]
+    create-ARM64_V8A-model 13ms
+    create-X86-model 22ms
+    create-X86_64-model 19ms
+    create-module-model 13ms
+    [gap of 45ms]
+  create-initial-cxx-model completed in 187ms
+  [gap of 13ms]
+create_cxx_tasks completed in 200ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 15ms
+    create-variant-model 12ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 25ms]
+    create-module-model 10ms
+    [gap of 42ms]
+  create-initial-cxx-model completed in 121ms
+  [gap of 12ms]
+create_cxx_tasks completed in 133ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 19ms]
+    create-ARM64_V8A-model 12ms
+    create-X86-model 11ms
+    [gap of 10ms]
+    create-module-model 13ms
+    [gap of 17ms]
+    create-ARM64_V8A-model 10ms
+    create-X86_64-model 12ms
+  create-initial-cxx-model completed in 126ms
+  [gap of 16ms]
+create_cxx_tasks completed in 142ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 12ms]
+    create-ARMEABI_V7A-model 10ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 11ms
+    create-X86_64-model 11ms
+    create-module-model 13ms
+    [gap of 27ms]
+    create-X86-model 11ms
+    create-X86_64-model 11ms
+  create-initial-cxx-model completed in 135ms
+  [gap of 17ms]
+create_cxx_tasks completed in 152ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 15ms
+    [gap of 36ms]
+    create-X86_64-model 10ms
+    create-module-model 12ms
+    [gap of 37ms]
+  create-initial-cxx-model completed in 111ms
+  [gap of 12ms]
+create_cxx_tasks completed in 123ms
+
diff --git a/Opencv/build/intermediates/cxx/create_cxx_tasks_304_timing.txt b/Opencv/build/intermediates/cxx/create_cxx_tasks_304_timing.txt
index e677bfa1..34432939 100644
--- a/Opencv/build/intermediates/cxx/create_cxx_tasks_304_timing.txt
+++ b/Opencv/build/intermediates/cxx/create_cxx_tasks_304_timing.txt
@@ -25,3 +25,21 @@ create_cxx_tasks
   create-initial-cxx-model completed in 101ms
 create_cxx_tasks completed in 110ms
 
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 16ms
+    create-variant-model 10ms
+    create-ARMEABI_V7A-model 13ms
+    create-ARM64_V8A-model 12ms
+    create-X86-model 11ms
+    create-X86_64-model 12ms
+    create-module-model 15ms
+    create-ARMEABI_V7A-model 13ms
+    create-ARM64_V8A-model 13ms
+    create-X86-model 11ms
+    create-X86_64-model 13ms
+  create-initial-cxx-model completed in 155ms
+  [gap of 19ms]
+create_cxx_tasks completed in 174ms
+
diff --git a/Opencv/build/intermediates/cxx/create_cxx_tasks_308_timing.txt b/Opencv/build/intermediates/cxx/create_cxx_tasks_308_timing.txt
index a43bc5d1..b6b11476 100644
--- a/Opencv/build/intermediates/cxx/create_cxx_tasks_308_timing.txt
+++ b/Opencv/build/intermediates/cxx/create_cxx_tasks_308_timing.txt
@@ -26,3 +26,25 @@ create_cxx_tasks
   [gap of 48ms]
 create_cxx_tasks completed in 158ms
 
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 11ms]
+    create-ARMEABI_V7A-model 10ms
+    [gap of 20ms]
+    create-X86_64-model 10ms
+    create-module-model 11ms
+    [gap of 17ms]
+    create-ARM64_V8A-model 10ms
+    create-X86-model 10ms
+    [gap of 10ms]
+  create-initial-cxx-model completed in 125ms
+  [gap of 13ms]
+create_cxx_tasks completed in 138ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model 61ms
+create_cxx_tasks completed in 69ms
+
diff --git a/Opencv/build/intermediates/cxx/create_cxx_tasks_321_timing.txt b/Opencv/build/intermediates/cxx/create_cxx_tasks_321_timing.txt
index e6477da3..4cdcf356 100644
--- a/Opencv/build/intermediates/cxx/create_cxx_tasks_321_timing.txt
+++ b/Opencv/build/intermediates/cxx/create_cxx_tasks_321_timing.txt
@@ -53,3 +53,32 @@ create_cxx_tasks
   [gap of 11ms]
 create_cxx_tasks completed in 128ms
 
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 15ms
+    [gap of 11ms]
+    create-ARMEABI_V7A-model 12ms
+    create-ARM64_V8A-model 12ms
+    create-X86-model 16ms
+    create-X86_64-model 12ms
+    create-module-model 16ms
+    create-variant-model 10ms
+    create-ARMEABI_V7A-model 12ms
+    create-ARM64_V8A-model 13ms
+    create-X86-model 12ms
+    create-X86_64-model 12ms
+  create-initial-cxx-model completed in 162ms
+  [gap of 19ms]
+create_cxx_tasks completed in 181ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    [gap of 44ms]
+    create-module-model 10ms
+    [gap of 37ms]
+  create-initial-cxx-model completed in 91ms
+  [gap of 10ms]
+create_cxx_tasks completed in 101ms
+
diff --git a/Opencv/build/intermediates/cxx/create_cxx_tasks_32_timing.txt b/Opencv/build/intermediates/cxx/create_cxx_tasks_32_timing.txt
index 605c7bfa..81822c83 100644
--- a/Opencv/build/intermediates/cxx/create_cxx_tasks_32_timing.txt
+++ b/Opencv/build/intermediates/cxx/create_cxx_tasks_32_timing.txt
@@ -1703,3 +1703,1511 @@ create_cxx_tasks
   create-initial-cxx-model completed in 90ms
 create_cxx_tasks completed in 99ms
 
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 16ms
+    [gap of 14ms]
+    create-ARMEABI_V7A-model 11ms
+    create-ARM64_V8A-model 12ms
+    create-X86-model 12ms
+    create-X86_64-model 11ms
+    create-module-model 15ms
+    create-ARMEABI_V7A-model 10ms
+    create-X86-model 10ms
+    [gap of 10ms]
+  create-initial-cxx-model completed in 144ms
+  [gap of 49ms]
+create_cxx_tasks completed in 193ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 40ms]
+    create-module-model 11ms
+    [gap of 39ms]
+  create-initial-cxx-model completed in 101ms
+create_cxx_tasks completed in 110ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 45ms]
+    create-module-model 13ms
+    [gap of 35ms]
+  create-initial-cxx-model completed in 104ms
+  [gap of 44ms]
+create_cxx_tasks completed in 149ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 14ms]
+    create-ARMEABI_V7A-model 10ms
+    [gap of 26ms]
+    create-module-model 12ms
+    [gap of 36ms]
+  create-initial-cxx-model completed in 110ms
+  [gap of 49ms]
+create_cxx_tasks completed in 159ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model
+      [gap of 19ms]
+      create-cmake-model 25ms
+      [gap of 35ms]
+    create-module-model completed in 79ms
+    create-variant-model 52ms
+    create-ARMEABI_V7A-model 48ms
+    create-ARM64_V8A-model 21ms
+    create-X86-model 11ms
+    create-X86_64-model 17ms
+    create-module-model 39ms
+    [gap of 10ms]
+    create-ARMEABI_V7A-model 17ms
+    create-ARM64_V8A-model 17ms
+    create-X86-model 12ms
+    create-X86_64-model 14ms
+  create-initial-cxx-model completed in 352ms
+  [gap of 82ms]
+create_cxx_tasks completed in 435ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model
+      [gap of 21ms]
+      create-cmake-model 12ms
+      [gap of 24ms]
+    create-module-model completed in 57ms
+    create-variant-model 18ms
+    create-ARMEABI_V7A-model 18ms
+    create-ARM64_V8A-model 20ms
+    create-X86-model 21ms
+    create-X86_64-model 48ms
+    create-module-model
+      [gap of 26ms]
+      create-ndk-meta-abi-list 10ms
+      [gap of 10ms]
+    create-module-model completed in 46ms
+    [gap of 11ms]
+    create-ARMEABI_V7A-model 10ms
+    [gap of 10ms]
+    create-X86-model 30ms
+    create-X86_64-model 34ms
+  create-initial-cxx-model completed in 335ms
+  [gap of 119ms]
+create_cxx_tasks completed in 455ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 44ms
+    [gap of 16ms]
+    create-variant-model 24ms
+    create-ARMEABI_V7A-model 11ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 13ms
+    create-X86_64-model 78ms
+    create-module-model
+      [gap of 10ms]
+      create-cmake-model 31ms
+    create-module-model completed in 44ms
+    create-variant-model 11ms
+    create-ARMEABI_V7A-model 40ms
+    create-ARM64_V8A-model 32ms
+    create-X86-model 10ms
+    create-X86_64-model 20ms
+  create-initial-cxx-model completed in 370ms
+  [gap of 85ms]
+create_cxx_tasks completed in 456ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 21ms
+    [gap of 10ms]
+    create-variant-model 10ms
+    create-ARMEABI_V7A-model 17ms
+    create-ARM64_V8A-model 15ms
+    create-X86-model 14ms
+    create-X86_64-model 15ms
+    create-module-model 22ms
+    create-variant-model 15ms
+    create-ARMEABI_V7A-model 17ms
+    create-ARM64_V8A-model 17ms
+    create-X86-model 19ms
+    create-X86_64-model 15ms
+  create-initial-cxx-model completed in 223ms
+  [gap of 87ms]
+create_cxx_tasks completed in 311ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 23ms
+    [gap of 22ms]
+    create-ARMEABI_V7A-model 13ms
+    create-ARM64_V8A-model 13ms
+    create-X86-model 19ms
+    create-X86_64-model 12ms
+    create-module-model 20ms
+    create-variant-model 10ms
+    create-ARMEABI_V7A-model 14ms
+    create-ARM64_V8A-model 12ms
+    create-X86-model 11ms
+    create-X86_64-model 22ms
+  create-initial-cxx-model completed in 201ms
+  [gap of 165ms]
+create_cxx_tasks completed in 367ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 15ms
+    [gap of 50ms]
+    create-module-model 15ms
+    create-ARMEABI_V7A-model 10ms
+    create-X86-model 10ms
+    [gap of 10ms]
+  create-initial-cxx-model completed in 125ms
+  [gap of 56ms]
+create_cxx_tasks completed in 182ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    create-variant-model 10ms
+    [gap of 18ms]
+    create-X86-model 10ms
+    [gap of 11ms]
+    create-module-model 14ms
+    [gap of 27ms]
+    create-X86-model 10ms
+    [gap of 10ms]
+  create-initial-cxx-model completed in 131ms
+  [gap of 48ms]
+create_cxx_tasks completed in 179ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 43ms]
+    create-module-model 12ms
+    [gap of 37ms]
+  create-initial-cxx-model completed in 105ms
+  [gap of 43ms]
+create_cxx_tasks completed in 149ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 40ms]
+    create-module-model 10ms
+    [gap of 14ms]
+    create-ARM64_V8A-model 10ms
+    [gap of 17ms]
+  create-initial-cxx-model completed in 102ms
+  [gap of 94ms]
+create_cxx_tasks completed in 197ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 10ms
+    [gap of 39ms]
+    create-module-model 12ms
+    [gap of 38ms]
+  create-initial-cxx-model completed in 100ms
+  [gap of 10ms]
+create_cxx_tasks completed in 110ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 26ms
+    [gap of 21ms]
+    create-ARMEABI_V7A-model 11ms
+    [gap of 10ms]
+    create-ARM64_V8A-model 19ms
+    create-X86-model 19ms
+    create-X86_64-model 20ms
+    create-module-model 22ms
+    create-variant-model 24ms
+    create-ARMEABI_V7A-model 54ms
+    create-ARM64_V8A-model 47ms
+    create-X86-model 33ms
+    create-X86_64-model 39ms
+  create-initial-cxx-model completed in 358ms
+  [gap of 93ms]
+create_cxx_tasks completed in 452ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 23ms
+    [gap of 27ms]
+    create-variant-model 39ms
+    create-ARMEABI_V7A-model 18ms
+    create-ARM64_V8A-model 28ms
+    create-X86-model 99ms
+    create-X86_64-model 36ms
+    create-module-model
+      [gap of 19ms]
+      create-cmake-model 11ms
+    create-module-model completed in 33ms
+    create-variant-model 13ms
+    create-ARMEABI_V7A-model 14ms
+    create-ARM64_V8A-model 17ms
+    create-X86-model 26ms
+    create-X86_64-model 17ms
+  create-initial-cxx-model completed in 410ms
+  [gap of 229ms]
+create_cxx_tasks completed in 690ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 17ms
+    [gap of 17ms]
+    create-ARMEABI_V7A-model 13ms
+    create-ARM64_V8A-model 12ms
+    create-X86-model 13ms
+    create-X86_64-model 12ms
+    create-module-model 20ms
+    create-variant-model 10ms
+    create-ARMEABI_V7A-model 21ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 12ms
+    create-X86_64-model 11ms
+  create-initial-cxx-model completed in 181ms
+  [gap of 99ms]
+create_cxx_tasks completed in 281ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 15ms
+    [gap of 17ms]
+    create-ARMEABI_V7A-model 10ms
+    [gap of 11ms]
+    create-X86-model 11ms
+    create-X86_64-model 10ms
+    create-module-model 16ms
+    [gap of 10ms]
+    create-ARMEABI_V7A-model 10ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 10ms
+    create-X86_64-model 11ms
+  create-initial-cxx-model completed in 147ms
+  [gap of 69ms]
+create_cxx_tasks completed in 217ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 38ms]
+    create-X86_64-model 10ms
+    create-module-model 13ms
+    [gap of 18ms]
+    create-ARM64_V8A-model 10ms
+    [gap of 18ms]
+  create-initial-cxx-model completed in 121ms
+  [gap of 55ms]
+create_cxx_tasks completed in 177ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 43ms]
+    create-module-model 13ms
+    [gap of 36ms]
+  create-initial-cxx-model completed in 106ms
+create_cxx_tasks completed in 113ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 37ms]
+    create-module-model 14ms
+    [gap of 12ms]
+    create-ARM64_V8A-model 12ms
+    [gap of 14ms]
+  create-initial-cxx-model completed in 103ms
+create_cxx_tasks completed in 109ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 17ms
+    [gap of 16ms]
+    create-ARMEABI_V7A-model 10ms
+    create-ARM64_V8A-model 12ms
+    create-X86-model 11ms
+    create-X86_64-model 10ms
+    create-module-model 17ms
+    create-variant-model 10ms
+    create-ARMEABI_V7A-model 11ms
+    [gap of 10ms]
+    create-X86-model 10ms
+    create-X86_64-model 12ms
+  create-initial-cxx-model completed in 152ms
+  [gap of 69ms]
+create_cxx_tasks completed in 223ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 28ms]
+    create-X86-model 12ms
+    [gap of 10ms]
+    create-module-model 14ms
+    [gap of 19ms]
+    create-ARM64_V8A-model 18ms
+    create-X86-model 10ms
+    create-X86_64-model 10ms
+  create-initial-cxx-model completed in 140ms
+  [gap of 12ms]
+create_cxx_tasks completed in 152ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 18ms
+    [gap of 11ms]
+    create-variant-model 18ms
+    create-ARMEABI_V7A-model 203ms
+    create-ARM64_V8A-model 35ms
+    create-X86-model 96ms
+    create-X86_64-model 164ms
+    create-module-model
+      [gap of 23ms]
+      create-cmake-model 104ms
+    create-module-model completed in 131ms
+    create-variant-model 18ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 17ms
+    create-X86_64-model 16ms
+  create-initial-cxx-model completed in 776ms
+  [gap of 442ms]
+create_cxx_tasks completed in 1219ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 22ms
+    [gap of 13ms]
+    create-variant-model 16ms
+    create-ARMEABI_V7A-model 16ms
+    create-ARM64_V8A-model 33ms
+    create-X86-model 16ms
+    create-X86_64-model 21ms
+    create-module-model
+      [gap of 21ms]
+      create-cmake-model 10ms
+    create-module-model completed in 36ms
+    create-variant-model 12ms
+    create-ARMEABI_V7A-model 23ms
+    create-ARM64_V8A-model 29ms
+    create-X86-model 15ms
+    create-X86_64-model 29ms
+  create-initial-cxx-model completed in 292ms
+  [gap of 122ms]
+create_cxx_tasks completed in 415ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 32ms]
+    create-X86-model 11ms
+    [gap of 11ms]
+    create-module-model 14ms
+    [gap of 26ms]
+    create-X86-model 12ms
+  create-initial-cxx-model completed in 127ms
+  [gap of 47ms]
+create_cxx_tasks completed in 174ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 16ms
+    [gap of 16ms]
+    create-ARMEABI_V7A-model 13ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 12ms
+    create-X86_64-model 10ms
+    create-module-model 16ms
+    create-variant-model 10ms
+    [gap of 10ms]
+    create-ARM64_V8A-model 11ms
+    create-X86-model 12ms
+    create-X86_64-model 12ms
+  create-initial-cxx-model completed in 156ms
+  [gap of 138ms]
+create_cxx_tasks completed in 295ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 31ms]
+    create-X86_64-model 14ms
+    create-module-model 11ms
+    [gap of 40ms]
+  create-initial-cxx-model completed in 110ms
+  [gap of 14ms]
+create_cxx_tasks completed in 124ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 20ms
+    [gap of 13ms]
+    create-variant-model 13ms
+    create-ARMEABI_V7A-model 39ms
+    create-ARM64_V8A-model 21ms
+    create-X86-model 47ms
+    create-X86_64-model 19ms
+    create-module-model 26ms
+    create-variant-model 17ms
+    create-ARMEABI_V7A-model 14ms
+    create-ARM64_V8A-model 14ms
+    create-X86-model 17ms
+    create-X86_64-model 16ms
+  create-initial-cxx-model completed in 287ms
+  [gap of 84ms]
+create_cxx_tasks completed in 371ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model
+      [gap of 36ms]
+      create-cmake-model 20ms
+      [gap of 34ms]
+    create-module-model completed in 90ms
+    create-variant-model 35ms
+    create-ARMEABI_V7A-model 20ms
+    create-ARM64_V8A-model 44ms
+    create-X86-model 81ms
+    create-X86_64-model 150ms
+    create-module-model 36ms
+    create-variant-model 58ms
+    [gap of 11ms]
+    create-ARMEABI_V7A-model 58ms
+    create-ARM64_V8A-model 77ms
+    create-X86-model 40ms
+    create-X86_64-model 39ms
+  create-initial-cxx-model completed in 783ms
+  [gap of 164ms]
+create_cxx_tasks completed in 949ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 18ms
+    [gap of 17ms]
+    create-ARMEABI_V7A-model 10ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 10ms
+    [gap of 10ms]
+    create-module-model 15ms
+    create-variant-model 11ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 11ms]
+    create-X86-model 10ms
+    create-X86_64-model 10ms
+  create-initial-cxx-model completed in 146ms
+  [gap of 68ms]
+create_cxx_tasks completed in 215ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model
+      [gap of 25ms]
+      create-cmake-model 13ms
+      [gap of 569ms]
+    create-module-model completed in 607ms
+    create-variant-model 18ms
+    create-ARMEABI_V7A-model 47ms
+    create-ARM64_V8A-model 28ms
+    create-X86-model 26ms
+    create-X86_64-model 125ms
+    create-module-model
+      [gap of 14ms]
+      create-cmake-model 120ms
+      [gap of 10ms]
+    create-module-model completed in 144ms
+    create-variant-model 43ms
+    create-ARMEABI_V7A-model 20ms
+    create-ARM64_V8A-model 94ms
+    create-X86-model 15ms
+    create-X86_64-model 13ms
+  create-initial-cxx-model completed in 1202ms
+  [gap of 144ms]
+create_cxx_tasks completed in 1349ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 43ms]
+    create-module-model 12ms
+    [gap of 39ms]
+  create-initial-cxx-model completed in 105ms
+  [gap of 46ms]
+create_cxx_tasks completed in 152ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 41ms]
+    create-module-model 15ms
+    [gap of 16ms]
+    create-ARM64_V8A-model 10ms
+    [gap of 18ms]
+  create-initial-cxx-model completed in 112ms
+  [gap of 13ms]
+create_cxx_tasks completed in 125ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 18ms
+    [gap of 47ms]
+    create-module-model 24ms
+    create-variant-model 12ms
+    create-ARMEABI_V7A-model 13ms
+    create-ARM64_V8A-model 14ms
+    create-X86-model 14ms
+    create-X86_64-model 10ms
+  create-initial-cxx-model completed in 159ms
+  [gap of 104ms]
+create_cxx_tasks completed in 263ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 27ms
+    [gap of 16ms]
+    create-ARMEABI_V7A-model 22ms
+    [gap of 11ms]
+    create-X86-model 203ms
+    create-X86_64-model 13ms
+    create-module-model
+      create-cmake-model 277ms
+    create-module-model completed in 290ms
+    create-variant-model 10ms
+    [gap of 50ms]
+    create-ARMEABI_V7A-model 36ms
+    create-ARM64_V8A-model 36ms
+    [gap of 11ms]
+    create-X86-model 42ms
+    create-X86_64-model 38ms
+  create-initial-cxx-model completed in 812ms
+  [gap of 183ms]
+create_cxx_tasks completed in 995ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 19ms
+    [gap of 11ms]
+    create-variant-model 12ms
+    create-ARMEABI_V7A-model 14ms
+    create-ARM64_V8A-model 17ms
+    create-X86-model 14ms
+    create-X86_64-model 19ms
+    create-module-model 25ms
+    create-variant-model 11ms
+    create-ARMEABI_V7A-model 11ms
+    create-ARM64_V8A-model 16ms
+    create-X86-model 13ms
+    create-X86_64-model 15ms
+  create-initial-cxx-model completed in 210ms
+  [gap of 84ms]
+create_cxx_tasks completed in 295ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model
+      [gap of 18ms]
+      create-cmake-model 11ms
+      [gap of 14ms]
+    create-module-model completed in 43ms
+    create-variant-model 13ms
+    create-ARMEABI_V7A-model 11ms
+    create-ARM64_V8A-model 16ms
+    [gap of 12ms]
+    create-X86_64-model 10ms
+    create-module-model 14ms
+    create-variant-model 12ms
+    [gap of 18ms]
+    create-X86-model 11ms
+    create-X86_64-model 10ms
+  create-initial-cxx-model completed in 175ms
+  [gap of 11ms]
+create_cxx_tasks completed in 186ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    create-variant-model 11ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 25ms]
+    create-module-model 13ms
+    [gap of 34ms]
+  create-initial-cxx-model completed in 115ms
+  [gap of 45ms]
+create_cxx_tasks completed in 160ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 16ms]
+    create-ARMEABI_V7A-model 10ms
+    [gap of 10ms]
+    create-X86-model 10ms
+    [gap of 10ms]
+    create-module-model 13ms
+    [gap of 35ms]
+    create-X86_64-model 10ms
+  create-initial-cxx-model completed in 127ms
+  [gap of 40ms]
+create_cxx_tasks completed in 167ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 10ms
+    [gap of 45ms]
+    create-module-model 12ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 20ms]
+  create-initial-cxx-model completed in 104ms
+  [gap of 40ms]
+create_cxx_tasks completed in 144ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    [gap of 40ms]
+    create-module-model 10ms
+    [gap of 36ms]
+  create-initial-cxx-model completed in 86ms
+create_cxx_tasks completed in 94ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 15ms
+    [gap of 14ms]
+    create-ARMEABI_V7A-model 10ms
+    [gap of 28ms]
+    create-module-model 11ms
+    [gap of 22ms]
+    create-X86-model 10ms
+    [gap of 10ms]
+  create-initial-cxx-model completed in 120ms
+  [gap of 47ms]
+create_cxx_tasks completed in 167ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 14ms]
+    create-ARMEABI_V7A-model 10ms
+    create-X86-model 10ms
+    create-module-model 10ms
+    [gap of 37ms]
+  create-initial-cxx-model completed in 109ms
+  [gap of 35ms]
+create_cxx_tasks completed in 144ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 37ms]
+    create-module-model 10ms
+    [gap of 34ms]
+  create-initial-cxx-model completed in 92ms
+  [gap of 34ms]
+create_cxx_tasks completed in 126ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 39ms]
+    create-module-model 11ms
+    [gap of 35ms]
+  create-initial-cxx-model completed in 98ms
+  [gap of 38ms]
+create_cxx_tasks completed in 136ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 16ms]
+    create-ARMEABI_V7A-model 15ms
+    create-ARM64_V8A-model 11ms
+    create-X86-model 10ms
+    create-X86_64-model 11ms
+    create-module-model
+      create-cmake-model 10ms
+    create-module-model completed in 22ms
+    create-variant-model 11ms
+    create-ARMEABI_V7A-model 12ms
+    create-X86-model 12ms
+    create-X86_64-model 11ms
+  create-initial-cxx-model completed in 164ms
+  [gap of 60ms]
+create_cxx_tasks completed in 224ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 18ms]
+    create-ARMEABI_V7A-model 12ms
+    [gap of 11ms]
+    create-X86-model 13ms
+    create-X86_64-model 10ms
+    create-module-model 17ms
+    [gap of 28ms]
+    create-X86-model 13ms
+    create-X86_64-model 11ms
+  create-initial-cxx-model completed in 152ms
+  [gap of 89ms]
+create_cxx_tasks completed in 241ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 25ms]
+    create-X86-model 16ms
+    [gap of 11ms]
+    create-module-model 12ms
+    [gap of 18ms]
+    create-ARM64_V8A-model 17ms
+    [gap of 11ms]
+    create-X86_64-model 12ms
+  create-initial-cxx-model completed in 135ms
+  [gap of 12ms]
+create_cxx_tasks completed in 147ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 48ms]
+    create-module-model 11ms
+    [gap of 39ms]
+  create-initial-cxx-model completed in 111ms
+  [gap of 44ms]
+create_cxx_tasks completed in 155ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 14ms]
+    create-ARMEABI_V7A-model 10ms
+    [gap of 21ms]
+    create-X86_64-model 10ms
+    create-module-model 14ms
+    [gap of 43ms]
+  create-initial-cxx-model completed in 125ms
+  [gap of 111ms]
+create_cxx_tasks completed in 236ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 19ms]
+    create-ARM64_V8A-model 10ms
+    [gap of 18ms]
+    create-module-model 12ms
+    [gap of 42ms]
+  create-initial-cxx-model completed in 113ms
+  [gap of 13ms]
+create_cxx_tasks completed in 126ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 39ms]
+    create-X86_64-model 11ms
+    create-module-model 16ms
+    [gap of 41ms]
+  create-initial-cxx-model completed in 120ms
+  [gap of 53ms]
+create_cxx_tasks completed in 174ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 96ms]
+  create-initial-cxx-model completed in 109ms
+  [gap of 44ms]
+create_cxx_tasks completed in 153ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 15ms
+    [gap of 16ms]
+    create-ARMEABI_V7A-model 11ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 10ms
+    create-X86_64-model 11ms
+    create-module-model 12ms
+    create-variant-model 11ms
+    create-ARMEABI_V7A-model 10ms
+    create-X86-model 10ms
+  create-initial-cxx-model completed in 138ms
+  [gap of 47ms]
+create_cxx_tasks completed in 185ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 16ms
+    [gap of 11ms]
+    create-variant-model 11ms
+    create-ARMEABI_V7A-model 11ms
+    create-X86-model 10ms
+    create-X86_64-model 10ms
+    create-module-model 12ms
+    create-variant-model 10ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 10ms
+    create-X86_64-model 10ms
+  create-initial-cxx-model completed in 146ms
+  [gap of 45ms]
+create_cxx_tasks completed in 191ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 43ms]
+    create-module-model 14ms
+    create-variant-model 11ms
+    create-ARM64_V8A-model 10ms
+    [gap of 18ms]
+  create-initial-cxx-model completed in 116ms
+create_cxx_tasks completed in 124ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 43ms]
+    create-module-model 11ms
+    [gap of 36ms]
+  create-initial-cxx-model completed in 103ms
+  [gap of 34ms]
+create_cxx_tasks completed in 137ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 41ms]
+    create-module-model 12ms
+    create-ARMEABI_V7A-model 13ms
+    [gap of 24ms]
+  create-initial-cxx-model completed in 107ms
+  [gap of 50ms]
+create_cxx_tasks completed in 158ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 10ms
+    [gap of 36ms]
+    create-module-model 10ms
+    [gap of 33ms]
+  create-initial-cxx-model completed in 89ms
+  [gap of 38ms]
+create_cxx_tasks completed in 128ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    [gap of 44ms]
+    create-module-model 10ms
+    [gap of 30ms]
+  create-initial-cxx-model completed in 84ms
+create_cxx_tasks completed in 91ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 19ms]
+    create-ARM64_V8A-model 10ms
+    [gap of 14ms]
+    create-module-model 13ms
+    [gap of 36ms]
+  create-initial-cxx-model completed in 106ms
+  [gap of 38ms]
+create_cxx_tasks completed in 144ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 40ms]
+    create-module-model 13ms
+    [gap of 36ms]
+  create-initial-cxx-model completed in 101ms
+  [gap of 38ms]
+create_cxx_tasks completed in 140ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 90ms]
+  create-initial-cxx-model completed in 101ms
+  [gap of 41ms]
+create_cxx_tasks completed in 142ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 10ms
+    [gap of 41ms]
+    create-module-model 11ms
+    [gap of 38ms]
+  create-initial-cxx-model completed in 100ms
+create_cxx_tasks completed in 109ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    create-variant-model 10ms
+    create-ARMEABI_V7A-model 11ms
+    [gap of 24ms]
+    create-module-model 13ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 25ms]
+  create-initial-cxx-model completed in 124ms
+  [gap of 43ms]
+create_cxx_tasks completed in 168ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 12ms]
+    create-ARMEABI_V7A-model 10ms
+    create-X86-model 10ms
+    create-module-model 12ms
+    [gap of 22ms]
+    create-X86-model 10ms
+  create-initial-cxx-model completed in 114ms
+  [gap of 35ms]
+create_cxx_tasks completed in 149ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 16ms
+    create-variant-model 11ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 19ms]
+    create-X86_64-model 11ms
+    create-module-model 13ms
+    [gap of 34ms]
+    create-X86_64-model 10ms
+  create-initial-cxx-model completed in 134ms
+  [gap of 57ms]
+create_cxx_tasks completed in 192ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 30ms]
+    create-X86-model 10ms
+    create-X86_64-model 11ms
+    create-module-model 13ms
+    [gap of 18ms]
+    create-ARM64_V8A-model 13ms
+    create-X86-model 12ms
+  create-initial-cxx-model completed in 135ms
+  [gap of 43ms]
+create_cxx_tasks completed in 178ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 15ms
+    [gap of 47ms]
+    create-module-model 19ms
+    create-variant-model 13ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 13ms
+  create-initial-cxx-model completed in 135ms
+  [gap of 44ms]
+create_cxx_tasks completed in 179ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 10ms]
+    create-variant-model 10ms
+    [gap of 10ms]
+    create-ARM64_V8A-model 11ms
+    create-X86-model 11ms
+    create-module-model 17ms
+    [gap of 11ms]
+    create-ARMEABI_V7A-model 12ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 10ms
+    create-X86_64-model 12ms
+  create-initial-cxx-model completed in 149ms
+  [gap of 52ms]
+create_cxx_tasks completed in 201ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 42ms]
+    create-module-model 11ms
+    [gap of 43ms]
+  create-initial-cxx-model completed in 107ms
+  [gap of 45ms]
+create_cxx_tasks completed in 153ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 41ms]
+    create-module-model 10ms
+    create-variant-model 10ms
+    [gap of 31ms]
+  create-initial-cxx-model completed in 108ms
+  [gap of 39ms]
+create_cxx_tasks completed in 148ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 23ms]
+    create-ARM64_V8A-model 10ms
+    create-X86-model 10ms
+    create-module-model 14ms
+    create-variant-model 10ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 28ms]
+  create-initial-cxx-model completed in 129ms
+  [gap of 52ms]
+create_cxx_tasks completed in 182ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    [gap of 43ms]
+    create-module-model 11ms
+    [gap of 39ms]
+  create-initial-cxx-model completed in 93ms
+  [gap of 36ms]
+create_cxx_tasks completed in 130ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 46ms]
+    create-module-model 13ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 26ms]
+  create-initial-cxx-model completed in 116ms
+  [gap of 36ms]
+create_cxx_tasks completed in 154ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 14ms]
+    create-variant-model 11ms
+    create-ARMEABI_V7A-model 11ms
+    create-ARM64_V8A-model 11ms
+    create-X86-model 11ms
+    create-X86_64-model 11ms
+    create-module-model 12ms
+    [gap of 28ms]
+    create-X86-model 11ms
+    [gap of 14ms]
+  create-initial-cxx-model completed in 153ms
+  [gap of 55ms]
+create_cxx_tasks completed in 209ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    create-variant-model 10ms
+    [gap of 30ms]
+    create-module-model 10ms
+    [gap of 38ms]
+  create-initial-cxx-model completed in 106ms
+  [gap of 49ms]
+create_cxx_tasks completed in 157ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 39ms]
+    create-module-model 11ms
+    [gap of 31ms]
+  create-initial-cxx-model completed in 92ms
+  [gap of 39ms]
+create_cxx_tasks completed in 132ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 10ms
+    [gap of 32ms]
+    create-module-model 10ms
+    [gap of 32ms]
+  create-initial-cxx-model completed in 84ms
+  [gap of 25ms]
+create_cxx_tasks completed in 110ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model 76ms
+  [gap of 40ms]
+create_cxx_tasks completed in 116ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 32ms]
+    create-module-model 10ms
+    [gap of 27ms]
+  create-initial-cxx-model completed in 83ms
+  [gap of 25ms]
+create_cxx_tasks completed in 108ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 77ms]
+  create-initial-cxx-model completed in 88ms
+  [gap of 30ms]
+create_cxx_tasks completed in 118ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model 66ms
+create_cxx_tasks completed in 71ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 10ms
+    [gap of 73ms]
+  create-initial-cxx-model completed in 83ms
+  [gap of 31ms]
+create_cxx_tasks completed in 114ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model 69ms
+  [gap of 37ms]
+create_cxx_tasks completed in 106ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 42ms]
+    create-module-model 12ms
+    [gap of 38ms]
+  create-initial-cxx-model completed in 104ms
+  [gap of 57ms]
+create_cxx_tasks completed in 161ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 40ms]
+    create-module-model 16ms
+    [gap of 35ms]
+  create-initial-cxx-model completed in 104ms
+  [gap of 15ms]
+create_cxx_tasks completed in 119ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 39ms]
+    create-module-model 11ms
+    [gap of 19ms]
+    create-X86-model 10ms
+  create-initial-cxx-model completed in 96ms
+  [gap of 43ms]
+create_cxx_tasks completed in 139ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 44ms]
+    create-module-model 12ms
+    [gap of 42ms]
+  create-initial-cxx-model completed in 112ms
+  [gap of 55ms]
+create_cxx_tasks completed in 167ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 22ms
+    [gap of 19ms]
+    create-variant-model 33ms
+    create-ARMEABI_V7A-model 36ms
+    [gap of 14ms]
+    create-ARM64_V8A-model 10ms
+    create-X86-model 11ms
+    create-X86_64-model 10ms
+    create-module-model 19ms
+    create-variant-model 22ms
+    create-ARMEABI_V7A-model 15ms
+    create-ARM64_V8A-model 11ms
+    create-X86-model 10ms
+    create-X86_64-model 15ms
+  create-initial-cxx-model completed in 262ms
+  [gap of 117ms]
+create_cxx_tasks completed in 380ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 18ms
+    [gap of 17ms]
+    create-ARMEABI_V7A-model 10ms
+    create-ARM64_V8A-model 29ms
+    create-X86-model 13ms
+    create-X86_64-model 15ms
+    create-module-model 22ms
+    create-variant-model 11ms
+    create-ARMEABI_V7A-model 10ms
+    create-ARM64_V8A-model 14ms
+    [gap of 10ms]
+    create-X86_64-model 11ms
+  create-initial-cxx-model completed in 188ms
+  [gap of 75ms]
+create_cxx_tasks completed in 264ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-variant-model 10ms
+    create-ARMEABI_V7A-model 10ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 11ms
+    [gap of 10ms]
+    create-module-model 18ms
+    [gap of 28ms]
+    create-X86-model 11ms
+  create-initial-cxx-model completed in 131ms
+create_cxx_tasks completed in 140ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 16ms
+    create-variant-model 10ms
+    create-ARMEABI_V7A-model 12ms
+    create-X86-model 11ms
+    create-X86_64-model 10ms
+    create-module-model 13ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 25ms]
+  create-initial-cxx-model completed in 135ms
+  [gap of 51ms]
+create_cxx_tasks completed in 186ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 16ms
+    [gap of 25ms]
+    create-X86-model 12ms
+    create-X86_64-model 11ms
+    create-module-model 21ms
+    create-ARMEABI_V7A-model 16ms
+    create-ARM64_V8A-model 11ms
+    create-X86-model 12ms
+    create-X86_64-model 11ms
+  create-initial-cxx-model completed in 151ms
+  [gap of 49ms]
+create_cxx_tasks completed in 200ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 16ms
+    [gap of 23ms]
+    create-ARM64_V8A-model 13ms
+    create-X86-model 11ms
+    create-X86_64-model 10ms
+    create-module-model
+      [gap of 15ms]
+      create-cmake-model 10ms
+    create-module-model completed in 29ms
+    create-variant-model 11ms
+    create-ARMEABI_V7A-model 11ms
+    create-ARM64_V8A-model 13ms
+    create-X86-model 51ms
+    create-X86_64-model 12ms
+  create-initial-cxx-model completed in 214ms
+  [gap of 113ms]
+create_cxx_tasks completed in 327ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 36ms]
+    create-module-model 10ms
+    [gap of 37ms]
+  create-initial-cxx-model completed in 94ms
+  [gap of 10ms]
+create_cxx_tasks completed in 104ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 10ms
+    [gap of 42ms]
+    create-module-model 11ms
+    [gap of 32ms]
+  create-initial-cxx-model completed in 95ms
+  [gap of 45ms]
+create_cxx_tasks completed in 140ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 15ms
+    [gap of 15ms]
+    create-ARMEABI_V7A-model 19ms
+    [gap of 26ms]
+    create-module-model 13ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 26ms]
+  create-initial-cxx-model completed in 133ms
+  [gap of 53ms]
+create_cxx_tasks completed in 186ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 22ms
+    [gap of 40ms]
+    create-module-model 11ms
+    [gap of 37ms]
+  create-initial-cxx-model completed in 110ms
+  [gap of 74ms]
+create_cxx_tasks completed in 184ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    [gap of 25ms]
+    create-X86-model 10ms
+    [gap of 10ms]
+    create-module-model 13ms
+    [gap of 41ms]
+  create-initial-cxx-model completed in 112ms
+  [gap of 13ms]
+create_cxx_tasks completed in 125ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 14ms
+    [gap of 18ms]
+    create-ARMEABI_V7A-model 11ms
+    create-ARM64_V8A-model 11ms
+    create-X86-model 10ms
+    create-X86_64-model 11ms
+    create-module-model 16ms
+    create-ARMEABI_V7A-model 11ms
+    create-ARM64_V8A-model 10ms
+    create-X86-model 10ms
+    [gap of 10ms]
+  create-initial-cxx-model completed in 145ms
+  [gap of 60ms]
+create_cxx_tasks completed in 205ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    [gap of 40ms]
+    create-module-model 12ms
+    [gap of 38ms]
+  create-initial-cxx-model completed in 102ms
+  [gap of 45ms]
+create_cxx_tasks completed in 149ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 13ms
+    create-variant-model 11ms
+    [gap of 37ms]
+    create-module-model 13ms
+    [gap of 43ms]
+  create-initial-cxx-model completed in 121ms
+  [gap of 12ms]
+create_cxx_tasks completed in 133ms
+
diff --git a/Opencv/build/intermediates/cxx/create_cxx_tasks_751_timing.txt b/Opencv/build/intermediates/cxx/create_cxx_tasks_751_timing.txt
index d1f2c381..92064b12 100644
--- a/Opencv/build/intermediates/cxx/create_cxx_tasks_751_timing.txt
+++ b/Opencv/build/intermediates/cxx/create_cxx_tasks_751_timing.txt
@@ -13,3 +13,12 @@ create_cxx_tasks
   create-initial-cxx-model 57ms
 create_cxx_tasks completed in 62ms
 
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    [gap of 34ms]
+    create-module-model 11ms
+    [gap of 32ms]
+  create-initial-cxx-model completed in 77ms
+create_cxx_tasks completed in 85ms
+
diff --git a/Opencv/build/intermediates/cxx/create_cxx_tasks_782_timing.txt b/Opencv/build/intermediates/cxx/create_cxx_tasks_782_timing.txt
index 812d9ba3..b3cf4ca5 100644
--- a/Opencv/build/intermediates/cxx/create_cxx_tasks_782_timing.txt
+++ b/Opencv/build/intermediates/cxx/create_cxx_tasks_782_timing.txt
@@ -15,3 +15,44 @@ create_cxx_tasks
   create-initial-cxx-model 66ms
 create_cxx_tasks completed in 74ms
 
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 10ms
+    [gap of 34ms]
+    create-module-model 10ms
+    [gap of 32ms]
+  create-initial-cxx-model completed in 86ms
+  [gap of 13ms]
+create_cxx_tasks completed in 99ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 12ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 23ms]
+    create-module-model 12ms
+    [gap of 28ms]
+    create-X86_64-model 11ms
+  create-initial-cxx-model completed in 105ms
+  [gap of 15ms]
+create_cxx_tasks completed in 120ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model
+    create-module-model 11ms
+    [gap of 40ms]
+    create-module-model 11ms
+    create-variant-model 10ms
+    create-ARMEABI_V7A-model 10ms
+    [gap of 21ms]
+  create-initial-cxx-model completed in 104ms
+create_cxx_tasks completed in 113ms
+
+# C/C++ build system timings
+create_cxx_tasks
+  create-initial-cxx-model 53ms
+create_cxx_tasks completed in 59ms
+
diff --git a/Opencv/build/intermediates/cxx/ndk_locator_record_463t1h4l.log b/Opencv/build/intermediates/cxx/ndk_locator_record_463t1h4l.log
index d0444e71..43700b36 100644
--- a/Opencv/build/intermediates/cxx/ndk_locator_record_463t1h4l.log
+++ b/Opencv/build/intermediates/cxx/ndk_locator_record_463t1h4l.log
@@ -11,7 +11,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -1730642888
+    "memoizedHashCode": 736145757
   },
   {
     "level_": 0,
@@ -25,7 +25,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -938454785
+    "memoizedHashCode": 1528333860
   },
   {
     "level_": 0,
@@ -39,7 +39,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -1398198830
+    "memoizedHashCode": 1068589815
   },
   {
     "level_": 0,
@@ -53,7 +53,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": 1628820478
+    "memoizedHashCode": -199358173
   },
   {
     "level_": 0,
@@ -67,7 +67,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -2097434787
+    "memoizedHashCode": 369353858
   },
   {
     "level_": 0,
@@ -81,7 +81,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -1732524529
+    "memoizedHashCode": 734264116
   },
   {
     "level_": 0,
@@ -95,7 +95,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -1425383295
+    "memoizedHashCode": 1041405350
   },
   {
     "level_": 0,
@@ -109,7 +109,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -1983531015
+    "memoizedHashCode": 483257630
   },
   {
     "level_": 0,
@@ -123,7 +123,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -1314728262
+    "memoizedHashCode": 1152060383
   },
   {
     "level_": 0,
@@ -137,7 +137,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -610267069
+    "memoizedHashCode": 1856521576
   },
   {
     "level_": 0,
@@ -151,7 +151,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": 1252547001
+    "memoizedHashCode": -575631650
   },
   {
     "level_": 0,
@@ -165,7 +165,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": 1821259032
+    "memoizedHashCode": -6919619
   },
   {
     "level_": 0,
@@ -179,7 +179,7 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": -1567958201
+    "memoizedHashCode": 898830444
   },
   {
     "level_": 2,
@@ -193,6 +193,6 @@
       "fieldsDescending": {}
     },
     "memoizedSize": -1,
-    "memoizedHashCode": 883457243
+    "memoizedHashCode": -944721408
   }
 ]
\ No newline at end of file
diff --git a/app/src/main/java/com/aros/apron/activity/ConfigActivity.kt b/app/src/main/java/com/aros/apron/activity/ConfigActivity.kt
index fd05ed82..fd829095 100644
--- a/app/src/main/java/com/aros/apron/activity/ConfigActivity.kt
+++ b/app/src/main/java/com/aros/apron/activity/ConfigActivity.kt
@@ -55,6 +55,7 @@ class ConfigActivity : BaseActivity() {
         configBinding.rbRtsp.isChecked = PreferenceUtils.getInstance().customStreamType==1
         configBinding.rbRtmp.isChecked = PreferenceUtils.getInstance().customStreamType==2
         configBinding.rbNo.isChecked = PreferenceUtils.getInstance().customStreamType==3
+
         configBinding.layoutStreamRtsp.visibility =
             if (PreferenceUtils.getInstance().customStreamType==1) VISIBLE else {
                 GONE
@@ -127,7 +128,10 @@ class ConfigActivity : BaseActivity() {
         configBinding.rbBeidou.isChecked = PreferenceUtils.getInstance().satelliteSystem == 2
         configBinding.rbCameraCenter.isChecked = PreferenceUtils.getInstance().cameraLocationType ==1//中间
         configBinding.rbCameraRight.isChecked = PreferenceUtils.getInstance().cameraLocationType ==2//右边
-        configBinding.rbCameraNull.isChecked = PreferenceUtils.getInstance().cameraLocationType ==0//右边
+        configBinding.rbCameraNull.isChecked = PreferenceUtils.getInstance().cameraLocationType ==3//下视
+        configBinding.rbCameraMix.isChecked = PreferenceUtils.getInstance().cameraLocationType ==4//融合
+
+
         configBinding.btnConfig.setOnClickListener { config() }
 
 
@@ -234,7 +238,7 @@ class ConfigActivity : BaseActivity() {
             }
         }
 
-        if (!configBinding.rbCameraRight.isChecked && !configBinding.rbCameraCenter.isChecked && !configBinding.rbCameraNull.isChecked) {
+        if (!configBinding.rbCameraRight.isChecked && !configBinding.rbCameraCenter.isChecked && !configBinding.rbCameraNull.isChecked && !configBinding.rbCameraMix.isChecked) {
             ToastUtil.showToast("未配置主相机位置")
             return
         }
@@ -375,7 +379,9 @@ class ConfigActivity : BaseActivity() {
         } else if (configBinding.rbCameraRight.isChecked) {
             PreferenceUtils.getInstance().cameraLocationType = 2
         } else if (configBinding.rbCameraNull.isChecked) {
-            PreferenceUtils.getInstance().cameraLocationType = 0
+            PreferenceUtils.getInstance().cameraLocationType = 3
+        } else if(configBinding.rbCameraMix.isChecked){
+            PreferenceUtils.getInstance().cameraLocationType = 4
         }
 
         ToastUtil.showToast("配置已保存")
diff --git a/app/src/main/java/com/aros/apron/activity/ConnectionActivity.kt b/app/src/main/java/com/aros/apron/activity/ConnectionActivity.kt
index ee3def7d..6fea816c 100644
--- a/app/src/main/java/com/aros/apron/activity/ConnectionActivity.kt
+++ b/app/src/main/java/com/aros/apron/activity/ConnectionActivity.kt
@@ -90,8 +90,8 @@ open class ConnectionActivity : BaseActivity() {
         }
         if (TextUtils.isEmpty(PreferenceUtils.getInstance().mqttServerUri)){
             PreferenceUtils.getInstance().mqttServerUri =
-               //"tcp://192.168.20.90:2883"
-                "tcp://broker.emqx.io"
+               "tcp://192.168.20.90:2883"
+               // "tcp://broker.emqx.io"
         }
 
         if (TextUtils.isEmpty(PreferenceUtils.getInstance().mqttUserName)){
@@ -146,7 +146,6 @@ open class ConnectionActivity : BaseActivity() {
                 ): Map<String, String> {
                     return mapOf()
                 }
-
                 override fun onCrashHandleStart2GetExtraDatas(
                     crashType: Int, errorType: String,
                     errorMessage: String, errorStack: String
@@ -308,8 +307,6 @@ open class ConnectionActivity : BaseActivity() {
     }
     private fun toMain(){
 
-
-
         val cameraType = KeyManager.getInstance().getValue(
             KeyTools.createKey(
                 CameraKey.KeyCameraType,
diff --git a/app/src/main/java/com/aros/apron/activity/MainActivity.kt b/app/src/main/java/com/aros/apron/activity/MainActivity.kt
index 87d8c752..31ab94e8 100644
--- a/app/src/main/java/com/aros/apron/activity/MainActivity.kt
+++ b/app/src/main/java/com/aros/apron/activity/MainActivity.kt
@@ -7,7 +7,6 @@ import android.os.Build
 import android.os.Bundle
 import android.os.Handler
 import android.os.Looper
-import android.util.Log
 import android.view.View
 import android.view.Window
 import android.view.WindowManager
@@ -21,6 +20,7 @@ import com.aros.apron.R
 import com.aros.apron.base.BaseActivity
 import com.aros.apron.callback.MqttCallBack
 import com.aros.apron.entity.Movement
+import com.aros.apron.entity.Synchronizedstatus
 import com.aros.apron.manager.AlternateLandingManager
 import com.aros.apron.manager.BatteryManager
 import com.aros.apron.manager.CameraManager
@@ -35,15 +35,17 @@ import com.aros.apron.manager.LEDsSettingsManager
 import com.aros.apron.manager.LTEManager
 import com.aros.apron.manager.MediaManager
 import com.aros.apron.manager.MissionV3Manager
+import com.aros.apron.manager.NavigationSatelliteSystemManager
 import com.aros.apron.manager.OSDManager
+import com.aros.apron.manager.PerceptionManager
+import com.aros.apron.manager.RTKManager
 import com.aros.apron.manager.StickManager
 import com.aros.apron.manager.StreamManager
-import com.aros.apron.manager.VlcRtspManager
-import com.aros.apron.manager.VlcRtspManager.OnRtspCheckListener
+import com.aros.apron.manager.UdpStreamManager
 import com.aros.apron.manager.WirelessLinkManager
 import com.aros.apron.tools.AlternateArucoDetect
 import com.aros.apron.tools.ApronArucoDetect
-import com.aros.apron.tools.ApronArucoStatus
+import com.aros.apron.tools.ApronArucoDetectPort
 import com.aros.apron.tools.DroneHelper
 import com.aros.apron.tools.DualCaptureHelper
 import com.aros.apron.tools.LogUtil
@@ -52,6 +54,7 @@ import com.aros.apron.tools.PreferenceUtils
 import com.aros.apron.tools.SimplePortScanner
 import com.dji.wpmzsdk.manager.WPMZManager
 import com.google.gson.Gson
+import dji.sdk.keyvalue.key.CameraKey
 import dji.sdk.keyvalue.key.DJIKey
 import dji.sdk.keyvalue.key.FlightControllerKey
 import dji.sdk.keyvalue.key.KeyTools
@@ -65,9 +68,11 @@ import dji.v5.common.callback.CommonCallbacks.CompletionCallback
 import dji.v5.common.error.IDJIError
 import dji.v5.common.utils.GeoidManager
 import dji.v5.manager.KeyManager
+import dji.v5.manager.aircraft.perception.radar.RadarManager
 import dji.v5.manager.datacenter.MediaDataCenter
 import dji.v5.manager.interfaces.ICameraStreamManager
 import dji.v5.manager.interfaces.ICameraStreamManager.AvailableCameraUpdatedListener
+import dji.v5.manager.interfaces.IRadarManager
 import dji.v5.network.DJINetworkManager
 import dji.v5.network.IDJINetworkStatusListener
 import dji.v5.utils.common.JsonUtil
@@ -122,7 +127,50 @@ open class MainActivity : BaseActivity() {
         // 如果不需要改变 isAppStarted 的值，可以直接这样声明
         var isAppStarted: Boolean = false
         var streamReceive: Boolean = false
+        private var instance: MainActivity? = null
 
+        fun getInstance(): MainActivity? {
+            return instance
+        }
+
+        private var vtxHeartbeatHandler: Handler? = null
+        private var lastVtxFrameTime: Long = 0
+        private const val VTX_HEARTBEAT_TIMEOUT = 2000L // 3秒没有收到帧就认为图传异常
+        private var isVtxHeartbeatRunning = false
+
+        fun startVtxHeartbeat() {
+            if (isVtxHeartbeatRunning) return
+
+            isVtxHeartbeatRunning = true
+            lastVtxFrameTime = System.currentTimeMillis()
+
+            vtxHeartbeatHandler = Handler(Looper.getMainLooper())
+            vtxHeartbeatHandler?.post(object : Runnable {
+                override fun run() {
+                    val currentTime = System.currentTimeMillis()
+                    val timeSinceLastFrame = currentTime - lastVtxFrameTime
+
+                    if (timeSinceLastFrame > VTX_HEARTBEAT_TIMEOUT) {
+                        //LogUtil.log("MainActivity", "图传心跳超时，设置图传状态为false")
+                        Movement.getInstance().isVtx = false
+                    }
+
+                    if (isVtxHeartbeatRunning) {
+                        vtxHeartbeatHandler?.postDelayed(this, 1000) // 每秒检查一次
+                    }
+                }
+            })
+        }
+
+        fun stopVtxHeartbeat() {
+            isVtxHeartbeatRunning = false
+            vtxHeartbeatHandler?.removeCallbacksAndMessages(null)
+            vtxHeartbeatHandler = null
+        }
+
+        fun updateVtxHeartbeat() {
+            lastVtxFrameTime = System.currentTimeMillis()
+        }
     }
 
     protected var primaryFpvWidget: FPVWidget? = null
@@ -143,6 +191,8 @@ open class MainActivity : BaseActivity() {
     protected var settingWidget: SettingWidget? = null
     protected var topBarPanel: TopBarPanelWidget? = null
     protected var fpvParentView: ConstraintLayout? = null
+
+
     private var mDrawerLayout: DrawerLayout? = null
     private var gimbalAdjustDone: TextView? = null
     private var btn_test: Button? = null
@@ -172,7 +222,9 @@ open class MainActivity : BaseActivity() {
     private val availableCameraUpdatedListener: AvailableCameraUpdatedListener =
         object : AvailableCameraUpdatedListener {
             override fun onAvailableCameraUpdated(availableCameraList: List<ComponentIndexType>) {
-                runOnUiThread { updateFPVWidgetSource(availableCameraList) }
+                runOnUiThread {
+                    updateFPVWidgetSource(availableCameraList)
+                }
             }
 
             override fun onCameraStreamEnableUpdate(cameraStreamEnableMap: Map<ComponentIndexType, Boolean>) {
@@ -287,8 +339,8 @@ open class MainActivity : BaseActivity() {
             return
         }
 
-        //大于两路数据
-        val primarySource = getSuitableSource(cameraList, ComponentIndexType.LEFT_OR_MAIN)
+        //大于两路数据ort1
+        val primarySource = getSuitableSource(cameraList, ComponentIndexType.PORT_1)
         primaryFpvWidget!!.updateVideoSource(primarySource!!)
         cameraList.remove(primarySource)
 
@@ -408,7 +460,8 @@ open class MainActivity : BaseActivity() {
     /**
      * Swap the video sources of the FPV and secondary FPV widgets.
      */
-    private fun swapVideoSource() {
+    fun swapVideoSource() {
+
         val primarySource = primaryFpvWidget!!.widgetModel.getCameraIndex()
         val secondarySource = secondaryFPVWidget!!.widgetModel.getCameraIndex()
         //两个source都存在的情况下才进行切换
@@ -448,20 +501,27 @@ open class MainActivity : BaseActivity() {
         )
         setContentView(R.layout.activity_main)
         isAppStarted = true
+        instance = this
 
 
 //        mapWidget = findViewById<MapWidget>(R.id.widget_map)
 //        mapWidget?.initMapLibreMap(applicationContext, OnMapReadyListener { map: DJIMap ->
 //            val uiSetting = map.uiSettings
 //            uiSetting?.setZoomControlsEnabled(false)
-//        })
+//
 //        mapWidget?.onCreate(savedInstanceState)
         GeoidManager.getInstance().init(this)
         WPMZManager.getInstance().init(this)
         MqttManager.getInstance().needConnect()
 
         initDJIManager()
-        initCameraStream()
+//        //开启相机图传
+//        enableStream()
+//        if(PreferenceUtils.getInstance().cameraLocationType==3){
+//            initFpvStream()
+//        }else{
+//            initCameraStream()
+//        }
         initView()
 
 
@@ -516,6 +576,7 @@ open class MainActivity : BaseActivity() {
         MediaDataCenter.getInstance().cameraStreamManager.addAvailableCameraUpdatedListener(
             availableCameraUpdatedListener
         )
+
         primaryFpvWidget?.setOnFPVStreamSourceListener(object : FPVStreamSourceListener {
             override fun onStreamSourceUpdated(
                 devicePosition: ComponentIndexType,
@@ -578,6 +639,7 @@ open class MainActivity : BaseActivity() {
 
         super.onDestroy()
         isAppStarted = false
+        stopVtxHeartbeat()
         try {
             if (MqttManager.getInstance().mqttAndroidClient != null && MqttManager.getInstance().mqttAndroidClient.isConnected) {
                 MqttManager.getInstance().mqttAndroidClient.unregisterResources()
@@ -598,158 +660,409 @@ open class MainActivity : BaseActivity() {
     private fun initDJIManager() {
         val isFlightControllerConnect =
             KeyManager.getInstance().getValue(DJIKey.create(FlightControllerKey.KeyConnection))
-//        val isCameraConnect =
-//            KeyManager.getInstance().getValue(KeyTools.createKey(CameraKey.KeyConnection, ComponentIndexType.PORT_1))
+        val isCameraConnect =
+            KeyManager.getInstance()
+                .getValue(KeyTools.createKey(CameraKey.KeyConnection, ComponentIndexType.PORT_1))
         //  LogUtil.log(TAG,isCameraConnect.toString())
-        if (isFlightControllerConnect == null || !isFlightControllerConnect) {
-            handler.postDelayed({
-                initDJIManager()
-            }, 8000)
+        if (PreferenceUtils.getInstance().cameraLocationType == 3) {
+            if (isFlightControllerConnect == null || isFlightControllerConnect != true) {
+                handler.postDelayed({
+                    initDJIManager()
+                }, 1000)
+            } else {
+
+                initTimes++
+                LogUtil.log(TAG, "下视觉初始化$initTimes")
+                cameraManager.setKeepAliveDecoding(true);
+                FlightManager.getInstance().initFlightInfo()
+                BatteryManager.getInstance().initBatteryInfo()
+                StickManager.getInstance().initStickInfo()
+                GimbalManager.getInstance().initGimbalInfo()
+                AlternateLandingManager.getInstance().initAlterLandingInfo()
+                OSDManager.getInstance().initOsd()
+                FlightTaskProgressManager.getInstance().initFlightTaskProgress()
+                MediaManager.getInstance().init()
+                StreamManager.getInstance().initStreamManager()
+                LEDsSettingsManager.getInstance().initLEDsInfo()
+                RTKManager.getInstance().initRTKInfo()
+                //负载
+                //PayloadWidgetManager.getInstance().initPayloadInfo()
+                //初始化上报
+                NavigationSatelliteSystemManager.getInstance().initNavigationSatelliteSystem()
+                NavigationSatelliteSystemManager.getInstance().setNavigationSatelliteSystem()
+
+
+                LTEManager.getInstance().initLTEInfo()
+                WirelessLinkManager.getInstance().initWirelessLink()
+                CameraManager.getInstance().initCameraInfo()
+                //ApronArucoDetect.getInstance().init()
+                GeoidManager.getInstance().init(this);
+
+                MissionV3Manager.getInstance().initMissionManager()
+                enableStream()
+                initFpvStream()
+                startVtxHeartbeat()
+
+
+                MediaDataCenter.getInstance().cameraStreamManager.setVisionAssistViewDirection(
+                    VisionAssistDirection.DOWN, object : CommonCallbacks.CompletionCallback {
+                        override fun onSuccess() {
+                            LogUtil.log(TAG, "开启成功")
+                        }
+
+                        override fun onFailure(p0: IDJIError) {
+                            LogUtil.log(TAG, "开启失败" + p0)
+                        }
+                    })
+
+                val leDsSettings = LEDsSettings()
+                leDsSettings.setNavigationLEDsOn(false)
+                leDsSettings.setStatusIndicatorLEDsOn(true)
+                leDsSettings.setFrontLEDsOn(true)
+                KeyManager.getInstance().setValue<LEDsSettings?>(
+                    KeyTools.createKey<LEDsSettings?>(FlightControllerKey.KeyLEDsSettings),
+                    leDsSettings,
+                    object : CompletionCallback {
+                        override fun onSuccess() {
+                            LogUtil.log(TAG, "夜航灯关闭成功")
+                        }
+
+                        override fun onFailure(idjiError: IDJIError) {
+                            LogUtil.log(TAG, "夜航灯关闭失败")
+                        }
+                    })
+                LogUtil.log(TAG, "自定义推流方式:" + PreferenceUtils.getInstance().customStreamType)
+
+
+
+
+                Handler(Looper.getMainLooper()).postDelayed({
+                    when (PreferenceUtils.getInstance().customStreamType) {
+                        1 -> StreamManager.getInstance().startLiveWithRTSP()
+                        2 -> StreamManager.getInstance().startLiveWithCustom()
+                        else -> StreamManager.getInstance().startLiveWithCustom()
+                    }
+                    val scanner = SimplePortScanner.getInstance()
+                    scanner.setOnPortCheckListener(object : SimplePortScanner.OnPortCheckListener {
+                        override fun onPortOpen() {
+                            //LogUtil.log("qwq","✅ 本地8554端口已开启（每3秒扫描）")
+                        }
+
+                        override fun onPortClosed() {
+                            LogUtil.log("qwq", "❌ 本地8554端口已关闭（每3秒扫描）")
+                            //重新开启这个rtp
+                            StreamManager.getInstance().startLiveWithRTSP();
+                        }
+                    })
+
+                }, 5000)  // 参数别改：5秒延迟确保相机就绪
+
+                LogUtil.log(TAG, "推流类型:" + PreferenceUtils.getInstance().customStreamType)
+            }
+
+        } else if (PreferenceUtils.getInstance().cameraLocationType == 4) {
+            if ((isFlightControllerConnect == null || isFlightControllerConnect != true) && (isCameraConnect == null || isCameraConnect != true)) {
+                handler.postDelayed({
+                    initDJIManager()
+                }, 1000)
+            } else {
+                initTimes++
+                cameraManager.setKeepAliveDecoding(true);
+                LogUtil.log(TAG, "云台初始化$initTimes")
+                FlightManager.getInstance().initFlightInfo()
+                BatteryManager.getInstance().initBatteryInfo()
+                StickManager.getInstance().initStickInfo()
+                GimbalManager.getInstance().initGimbalInfo()
+                AlternateLandingManager.getInstance().initAlterLandingInfo()
+                OSDManager.getInstance().initOsd()
+                FlightTaskProgressManager.getInstance().initFlightTaskProgress()
+                MediaManager.getInstance().init()
+                StreamManager.getInstance().initStreamManager()
+                LEDsSettingsManager.getInstance().initLEDsInfo()
+                RTKManager.getInstance().initRTKInfo()
+                //负载
+                //PayloadWidgetManager.getInstance().initPayloadInfo()
+                //初始化上报
+                LTEManager.getInstance().initLTEInfo()
+                WirelessLinkManager.getInstance().initWirelessLink()
+                CameraManager.getInstance().initCameraInfo()
+                //
+
+
+                NavigationSatelliteSystemManager.getInstance().initNavigationSatelliteSystem()
+                NavigationSatelliteSystemManager.getInstance().setNavigationSatelliteSystem()
+
+                //ApronArucoDetect.getInstance().init()
+                MissionV3Manager.getInstance().initMissionManager()
+                enableStream()
+                startVtxHeartbeat()
+
+                GeoidManager.getInstance().init(this);
+
+                //开启雷达监听器
+                //PerceptionManager.getInstance().isladraopeninti()
+
+
+                MediaDataCenter.getInstance().cameraStreamManager.setVisionAssistViewDirection(
+                    VisionAssistDirection.DOWN, object : CommonCallbacks.CompletionCallback {
+                        override fun onSuccess() {
+                            LogUtil.log(TAG, "开启成功")
+                        }
+
+                        override fun onFailure(p0: IDJIError) {
+                            LogUtil.log(TAG, "开启失败" + p0)
+                        }
+                    })
+
+                val leDsSettings = LEDsSettings()
+                leDsSettings.setNavigationLEDsOn(false)
+                leDsSettings.setStatusIndicatorLEDsOn(true)
+                leDsSettings.setFrontLEDsOn(true)
+                KeyManager.getInstance().setValue<LEDsSettings?>(
+                    KeyTools.createKey<LEDsSettings?>(FlightControllerKey.KeyLEDsSettings),
+                    leDsSettings,
+                    object : CompletionCallback {
+                        override fun onSuccess() {
+                            LogUtil.log(TAG, "夜航灯关闭成功")
+                        }
+
+                        override fun onFailure(idjiError: IDJIError) {
+                            LogUtil.log(TAG, "夜航灯关闭失败")
+                        }
+                    })
+
+                LogUtil.log(TAG, "自定义推流方式:" + PreferenceUtils.getInstance().customStreamType)
+
+
+
+                Handler(Looper.getMainLooper()).postDelayed({
+                    when (PreferenceUtils.getInstance().customStreamType) {
+                        1 -> StreamManager.getInstance().startLiveWithRTSP()
+                        2 -> StreamManager.getInstance().startLiveWithCustom()
+                        else -> StreamManager.getInstance().startLiveWithCustom()
+                    }
+                    val scanner = SimplePortScanner.getInstance()
+                    scanner.setOnPortCheckListener(object : SimplePortScanner.OnPortCheckListener {
+                        override fun onPortOpen() {
+                            //LogUtil.log("qwq","✅ 本地8554端口已开启（每3秒扫描）")
+                        }
+
+                        override fun onPortClosed() {
+                            LogUtil.log("qwq", "❌ 本地8554端口已关闭（每3秒扫描）")
+                            //重新开启这个rtp
+                            StreamManager.getInstance().startLiveWithRTSP();
+                        }
+                    })
+
+                }, 5000)  // 参数别改：5秒延迟确保相机就绪
+
+
+                LogUtil.log(TAG, "推流类型:" + PreferenceUtils.getInstance().customStreamType)
+            }
+
+
         } else {
-            initTimes++
-            LogUtil.log(TAG, "初始化$initTimes")
-            FlightManager.getInstance().initFlightInfo()
-            BatteryManager.getInstance().initBatteryInfo()
-            StickManager.getInstance().initStickInfo()
-            GimbalManager.getInstance().initGimbalInfo()
-            AlternateLandingManager.getInstance().initAlterLandingInfo()
-            OSDManager.getInstance().initOsd()
-            FlightTaskProgressManager.getInstance().initFlightTaskProgress()
-            MediaManager.getInstance().init()
-            StreamManager.getInstance().initStreamManager()
-            LEDsSettingsManager.getInstance().initLEDsInfo()
-            //负载
-            //PayloadWidgetManager.getInstance().initPayloadInfo()
-            //初始化上报
-            LTEManager.getInstance().initLTEInfo()
-            WirelessLinkManager.getInstance().initWirelessLink()
-            CameraManager.getInstance().initCameraInfo()
+            if ((isFlightControllerConnect == null || isFlightControllerConnect != true) && (isCameraConnect == null || isCameraConnect != true)) {
+                handler.postDelayed({
+                    initDJIManager()
+                }, 1000)
+            } else {
+                initTimes++
+                cameraManager.setKeepAliveDecoding(true);
+                LogUtil.log(TAG, "云台初始化$initTimes")
+                FlightManager.getInstance().initFlightInfo()
+                BatteryManager.getInstance().initBatteryInfo()
+                StickManager.getInstance().initStickInfo()
+                GimbalManager.getInstance().initGimbalInfo()
+                AlternateLandingManager.getInstance().initAlterLandingInfo()
+                OSDManager.getInstance().initOsd()
+                FlightTaskProgressManager.getInstance().initFlightTaskProgress()
+                MediaManager.getInstance().init()
+                StreamManager.getInstance().initStreamManager()
+                LEDsSettingsManager.getInstance().initLEDsInfo()
+                RTKManager.getInstance().initRTKInfo()
+                //负载
+                //PayloadWidgetManager.getInstance().initPayloadInfo()
+                //初始化上报
+                LTEManager.getInstance().initLTEInfo()
+                WirelessLinkManager.getInstance().initWirelessLink()
+                CameraManager.getInstance().initCameraInfo()
+                //
 
-            MissionV3Manager.getInstance().initMissionManager()
 
-            MediaDataCenter.getInstance().cameraStreamManager.setVisionAssistViewDirection(
-                VisionAssistDirection.DOWN, object : CommonCallbacks.CompletionCallback {
-                    override fun onSuccess() {
-                        LogUtil.log(TAG, "开启成功")
+                NavigationSatelliteSystemManager.getInstance().initNavigationSatelliteSystem()
+                NavigationSatelliteSystemManager.getInstance().setNavigationSatelliteSystem()
+
+                //ApronArucoDetect.getInstance().init()
+                MissionV3Manager.getInstance().initMissionManager()
+                enableStream()
+                initCameraStream()
+                startVtxHeartbeat()
+                //
+
+                GeoidManager.getInstance().init(this);
+
+                //开启雷达监听器
+                //PerceptionManager.getInstance().isladraopeninti()
+
+
+                MediaDataCenter.getInstance().cameraStreamManager.setVisionAssistViewDirection(
+                    VisionAssistDirection.DOWN, object : CommonCallbacks.CompletionCallback {
+                        override fun onSuccess() {
+                            LogUtil.log(TAG, "开启成功")
+                        }
+
+                        override fun onFailure(p0: IDJIError) {
+                            LogUtil.log(TAG, "开启失败" + p0)
+                        }
+                    })
+
+                val leDsSettings = LEDsSettings()
+                leDsSettings.setNavigationLEDsOn(false)
+                leDsSettings.setStatusIndicatorLEDsOn(true)
+                leDsSettings.setFrontLEDsOn(true)
+                KeyManager.getInstance().setValue<LEDsSettings?>(
+                    KeyTools.createKey<LEDsSettings?>(FlightControllerKey.KeyLEDsSettings),
+                    leDsSettings,
+                    object : CompletionCallback {
+                        override fun onSuccess() {
+                            LogUtil.log(TAG, "夜航灯关闭成功")
+                        }
+
+                        override fun onFailure(idjiError: IDJIError) {
+                            LogUtil.log(TAG, "夜航灯关闭失败")
+                        }
+                    })
+
+                LogUtil.log(TAG, "自定义推流方式:" + PreferenceUtils.getInstance().customStreamType)
+
+
+
+                Handler(Looper.getMainLooper()).postDelayed({
+                    when (PreferenceUtils.getInstance().customStreamType) {
+                        1 -> StreamManager.getInstance().startLiveWithRTSP()
+                        2 -> StreamManager.getInstance().startLiveWithCustom()
+                        else -> StreamManager.getInstance().startLiveWithCustom()
                     }
+                    val scanner = SimplePortScanner.getInstance()
+                    scanner.setOnPortCheckListener(object : SimplePortScanner.OnPortCheckListener {
+                        override fun onPortOpen() {
+                            //LogUtil.log("qwq","✅ 本地8554端口已开启（每3秒扫描）")
+                        }
 
-                    override fun onFailure(p0: IDJIError) {
-                        LogUtil.log(TAG, "开启失败" + p0)
-                    }
-                })
+                        override fun onPortClosed() {
+                            LogUtil.log("qwq", "❌ 本地8554端口已关闭（每3秒扫描）")
+                            //重新开启这个rtp
+                            StreamManager.getInstance().startLiveWithRTSP();
+                        }
+                    })
 
-            val leDsSettings = LEDsSettings()
-            leDsSettings.setNavigationLEDsOn(false)
-            leDsSettings.setStatusIndicatorLEDsOn(true)
-            leDsSettings.setFrontLEDsOn(true)
-            KeyManager.getInstance().setValue<LEDsSettings?>(
-                KeyTools.createKey<LEDsSettings?>(FlightControllerKey.KeyLEDsSettings),
-                leDsSettings,
-                object : CompletionCallback {
-                    override fun onSuccess() {
-                        LogUtil.log(TAG, "夜航灯关闭成功")
-                    }
-
-                    override fun onFailure(idjiError: IDJIError) {
-                        LogUtil.log(TAG, "夜航灯关闭失败")
-                    }
-                })
-
-            LogUtil.log(TAG, "自定义推流方式:" + PreferenceUtils.getInstance().customStreamType)
+                }, 5000)  // 参数别改：5秒延迟确保相机就绪
 
 
-            val scanner = SimplePortScanner.getInstance()
-
-
-            scanner.setOnPortCheckListener(object : SimplePortScanner.OnPortCheckListener {
-                override fun onPortOpen() {
-                    //LogUtil.log("qwq","✅ 本地8554端口已开启（每3秒扫描）")
-                }
-                override fun onPortClosed() {
-                    LogUtil.log("qwq","❌ 本地8554端口已关闭（每3秒扫描）")
-                    //重新开启这个rtp
-                    StreamManager.getInstance().startLiveWithRTSP();
-                }
-            })
-
-
-
-            Handler(Looper.getMainLooper()).postDelayed({
-                when (PreferenceUtils.getInstance().customStreamType) {
-                    1 -> StreamManager.getInstance().startLiveWithRTSP()
-                    2 -> StreamManager.getInstance().startLiveWithCustom()
-                    else -> StreamManager.getInstance().startLiveWithCustom()
-                }
-            }, 5000)  // 参数别改：5秒延迟确保相机就绪
-
-
-
-
-            LogUtil.log(TAG, "推流类型:" + PreferenceUtils.getInstance().customStreamType)
+                LogUtil.log(TAG, "推流类型:" + PreferenceUtils.getInstance().customStreamType)
+            }
         }
     }
 
+    private fun enableStream() {
+        cameraManager.enableStream(ComponentIndexType.PORT_1, true);
+        cameraManager.enableStream(ComponentIndexType.FPV, true);
+    }
+
+    @SuppressLint("SuspiciousIndentation")
+    private fun initmixStream() {
+
+    }
+
 
     @SuppressLint("SuspiciousIndentation")
-    private fun initCameraStream() {
+    private fun initFpvStream() {
         cameraManager.addFrameListener(
             ComponentIndexType.FPV,
             ICameraStreamManager.FrameFormat.YUV420_888
         ) { frameData, _, _, width, height, _ ->
             Movement.getInstance().isVtx = true
-            //检测到图传
+            updateVtxHeartbeat()
             streamReceive = true
-            DualCaptureHelper.getInstance().onFrame(height, width, frameData)
+            // DualCaptureHelper.getInstance().onFrame(height, width, frameData)
 //            if (shouldExecute) {
-            if (startArucoType == 1&& ApronArucoStatus.getInstance().canProcess(ApronArucoStatus.CameraSource.DOWNWARD)) {
-                ApronArucoDetect.getInstance()?.detectArucoTags(
-                    height,
-                    width,
-                    frameData,
-                    dictionary
-                )
-            } else if (startArucoType == 2) {
-                AlternateArucoDetect.getInstance()?.detectArucoTags(
-                    height,
-                    width,
-                    frameData,
-                    dictionary
-                )
+//            if (startArucoType == 1&& ApronArucoStatus.getInstance().canProcess(ApronArucoStatus.CameraSource.DOWNWARD)) {
+            synchronized(Synchronizedstatus.LOCK_OBJ) {
+                if (!Synchronizedstatus.isIsruningframe()) {
+                    try {
+                        Synchronizedstatus.setIsruningframe(true)
+                        if (startArucoType == 1) {
+                            ApronArucoDetect.getInstance()?.detectArucoTags(
+                                height,
+                                width,
+                                frameData,
+                                dictionary
+                            )
+                        } else if (startArucoType == 2) {
+                            AlternateArucoDetect.getInstance()?.detectArucoTags(
+                                height,
+                                width,
+                                frameData,
+                                dictionary
+                            )
+                        }
+                    } finally {
+                        Synchronizedstatus.setIsruningframe(false)
+                    }
+
+                }
             }
         }
+    }
 
-        //云台
+    @SuppressLint("SuspiciousIndentation")
+    private fun initCameraStream() {
         cameraManager.addFrameListener(
             ComponentIndexType.PORT_1,
             ICameraStreamManager.FrameFormat.YUV420_888
         ) { frameData, _, _, width, height, _ ->
             Movement.getInstance().isVtx = true
-            //检测到图传
+            updateVtxHeartbeat()
             streamReceive = true
-            DualCaptureHelper.getInstance().onFrame(height, width, frameData)
+            // DualCaptureHelper.getInstance().onFrame(height, width, frameData)
 //            if (shouldExecute) {
-            if (startArucoType == 1&&ApronArucoStatus.getInstance().canProcess(ApronArucoStatus.CameraSource.GIMBAL)) {
-                ApronArucoDetect.getInstance()?.detectArucoTags(
-                    height,
-                    width,
-                    frameData,
-                    dictionary
-                )
-            } else if (startArucoType == 2) {
-                AlternateArucoDetect.getInstance()?.detectArucoTags(
-                    height,
-                    width,
-                    frameData,
-                    dictionary
-                )
+//            if (startArucoType == 1&& ApronArucoStatus.getInstance().canProcess(ApronArucoStatus.CameraSource.DOWNWARD)) {
+            synchronized(Synchronizedstatus.LOCK_OBJ) {
+                if (!Synchronizedstatus.isIsruningframe()) {
+                    try {
+                        Synchronizedstatus.setIsruningframe(true)
+                        if (startArucoType == 1) {
+                            ApronArucoDetectPort.getInstance()?.detectArucoTags(
+                                height,
+                                width,
+                                frameData,
+                                dictionary
+                            )
+                        } else if (startArucoType == 2) {
+                            AlternateArucoDetect.getInstance()?.detectArucoTags(
+                                height,
+                                width,
+                                frameData,
+                                dictionary
+                            )
+                        }
+                    } finally {
+                        Synchronizedstatus.setIsruningframe(false)
+                    }
+                }
             }
         }
-
-
-
-
     }
 
+
+
+
+
+
+
+    
+
 //    private val mLoaderCallback: BaseLoaderCallback = object : BaseLoaderCallback(this) {
 //        override fun onManagerConnected(status: Int) {
 //            if (status == SUCCESS) {
@@ -771,18 +1084,30 @@ open class MainActivity : BaseActivity() {
                     object : CommonCallbacks.CompletionCallbackWithParam<EmptyMsg?> {
                         override fun onSuccess(emptyMsg: EmptyMsg?) {
                             LogUtil.log(TAG, "取消降落,识别机库二维码")
-                            Handler().postDelayed(Runnable {
-                                if (!ApronArucoDetect.getInstance().isTriggerSuccess) {
-                                    LogUtil.log(TAG, "图传异常:飞往备降点")
-                                    //测试图传丢失
-                                    AlternateLandingManager.getInstance().startTaskProcess(null)
-                                }
-                            }, 6000)
+
+                            if (PreferenceUtils.getInstance().cameraLocationType == 3) {
+                                Handler().postDelayed(Runnable {
+                                    if (!ApronArucoDetect.getInstance().isTriggerSuccess) {
+                                        LogUtil.log(TAG, "图传异常:飞往备降点")
+                                        //测试图传丢失
+                                        AlternateLandingManager.getInstance().startTaskProcess(null)
+                                    }
+                                }, 6000)
+                            } else {
+                                Handler().postDelayed(Runnable {
+                                    if (!ApronArucoDetectPort.getInstance().isTriggerSuccess) {
+                                        LogUtil.log(TAG, "图传异常:飞往备降点")
+                                        //测试图传丢失
+                                        AlternateLandingManager.getInstance().startTaskProcess(null)
+                                    }
+                                }, 6000)
+                            }
                             if (startArucoType == 1) {
                                 return
                             }
                             startArucoType = 1
                             ApronArucoDetect.getInstance().setDetectedBigMarkers()
+                            ApronArucoDetectPort.getInstance().setDetectedBigMarkers()
                             DroneHelper.getInstance().setGimbalPitchDegree()
                             //每次触发识别二维码时，为避免获取控制权失败,使多次获取控制权
                             DroneHelper.getInstance().isVirtualStickEnable = false
@@ -796,6 +1121,7 @@ open class MainActivity : BaseActivity() {
                             startArucoType = 1
                             LogUtil.log(TAG, "取消降落,识别机库二维码失败:" + Gson().toJson(error))
                             ApronArucoDetect.getInstance().setDetectedBigMarkers()
+                            ApronArucoDetectPort.getInstance().setDetectedBigMarkers()
                             DroneHelper.getInstance().setGimbalPitchDegree()
                             //每次触发识别二维码时，为避免获取控制权失败,使多次获取控制权
                             DroneHelper.getInstance().isVirtualStickEnable = false
@@ -809,13 +1135,23 @@ open class MainActivity : BaseActivity() {
                     object : CommonCallbacks.CompletionCallbackWithParam<EmptyMsg?> {
                         override fun onSuccess(emptyMsg: EmptyMsg?) {
                             LogUtil.log(TAG, "取消降落,识别备降点二维码")
-                            Handler().postDelayed(Runnable {
-                                if (!AlternateArucoDetect.getInstance().isTriggerSuccess) {
-                                    LogUtil.log(TAG, "图传异常:备降点直接降落")
-                                    //测试图传丢失
-                                    FlightManager.getInstance().startAutoLanding(null)
-                                }
-                            }, 4000)
+                            if (PreferenceUtils.getInstance().cameraLocationType == 3) {
+                                Handler().postDelayed(Runnable {
+                                    if (!AlternateArucoDetect.getInstance().isTriggerSuccess) {
+                                        LogUtil.log(TAG, "图传异常:备降点直接降落")
+                                        //测试图传丢失
+                                        FlightManager.getInstance().startAutoLanding(null)
+                                    }
+                                }, 4000)
+                            } else {
+                                Handler().postDelayed(Runnable {
+                                    if (!AlternateArucoDetect.getInstance().isTriggerSuccess) {
+                                        LogUtil.log(TAG, "图传异常:备降点直接降落")
+                                        //测试图传丢失
+                                        FlightManager.getInstance().startAutoLanding(null)
+                                    }
+                                }, 4000)
+                            }
                             if (startArucoType == 2) {
                                 return
                             }
diff --git a/app/src/main/java/com/aros/apron/base/BaseManager.java b/app/src/main/java/com/aros/apron/base/BaseManager.java
index e3ed8ab2..264e511b 100644
--- a/app/src/main/java/com/aros/apron/base/BaseManager.java
+++ b/app/src/main/java/com/aros/apron/base/BaseManager.java
@@ -233,8 +233,6 @@ public abstract class BaseManager {
         }
     }
 
-
-
     /**
      * 上报航线任务进度
      */
@@ -252,17 +250,20 @@ public abstract class BaseManager {
                 ext.setWayline_mission_state(Movement.getInstance().getTask_wayline_mission_state());
 
                 final FlightTaskProgress.Data.Output.Progress progress = new FlightTaskProgress.Data.Output.Progress();
+
 //                LogUtil.log(TAG,"CurrentWayline"+CurrentWayline.getInstance().getWaypoints()+"size"+CurrentWayline.getInstance().getWaypoints().size()
-//                +"getTask_wayline_mission_state"+Movement.getInstance().getTask_wayline_mission_state());
+//                +"getTask_wayline_mission_state"+Movement.getInstance().getTask_wayline_mission_state()+"percent"+(100 * (Movement.getInstance().getTask_current_waypoint_index() + 1)
+//                        / CurrentWayline.getInstance().getWaypoints().size()));
+
+
                 if (CurrentWayline.getInstance().getWaypoints() != null
                         && CurrentWayline.getInstance().getWaypoints().size() > 0
-                        && Movement.getInstance().getTask_wayline_mission_state() == 6) {
+                ) {
                     //这个没执行到
-                    progress.setPercent((100 * (Movement.getInstance().getCurrentWaypointIndex() + 1)
+                    progress.setPercent((100 * (Movement.getInstance().getTask_current_waypoint_index() + 1)
                             / CurrentWayline.getInstance().getWaypoints().size()));
-
-
                 }
+
                 progress.setCurrent_step(Movement.getInstance().getTask_current_step());
 
                 if (Movement.getInstance().isMissionFinish1()) {
diff --git a/app/src/main/java/com/aros/apron/callback/MqttCallBack.java b/app/src/main/java/com/aros/apron/callback/MqttCallBack.java
index a9a2ace4..d703eefc 100644
--- a/app/src/main/java/com/aros/apron/callback/MqttCallBack.java
+++ b/app/src/main/java/com/aros/apron/callback/MqttCallBack.java
@@ -13,6 +13,7 @@ import com.aros.apron.constant.AMSConfig;
 import com.aros.apron.constant.Constant;
 import com.aros.apron.entity.ApronExecutionStatus;
 import com.aros.apron.entity.MessageDown;
+import com.aros.apron.entity.MissionDataBean;
 import com.aros.apron.entity.Movement;
 import com.aros.apron.entity.SpeakerAudioPlayProgress;
 import com.aros.apron.entity.Synchronizedstatus;
@@ -28,6 +29,9 @@ import com.aros.apron.manager.StickManager;
 import com.aros.apron.manager.StreamManager;
 import com.aros.apron.manager.SystemManager;
 import com.aros.apron.manager.TakeOffToPointManager;
+import com.aros.apron.tools.ApronArucoDetect;
+import com.aros.apron.tools.ApronArucoDetectPort;
+import com.aros.apron.tools.Generakmztools;
 import com.aros.apron.tools.LogUtil;
 import com.aros.apron.tools.MqttManager;
 import com.aros.apron.tools.PreferenceUtils;
@@ -53,6 +57,7 @@ public class MqttCallBack extends BaseManager implements MqttCallbackExtended  {
     private String TAG = "MqttCallBack";
     Object lock = Synchronizedstatus.LOCK_OBJ;
 
+
     @Override
     public void connectionLost(Throwable cause) {
         LogUtil.log(TAG, "MQtt connectionLost:"+cause.toString());
@@ -119,7 +124,6 @@ public class MqttCallBack extends BaseManager implements MqttCallbackExtended  {
 
         if(topic.equals(AMSConfig.DOWN_UAV_PSDK_EVENT)){
             //负载设置控件
-
         }else {
             switch (message.getMethod()) {
                 case Constant.PILOT_ON:
@@ -156,25 +160,27 @@ public class MqttCallBack extends BaseManager implements MqttCallbackExtended  {
                     break;
                 case Constant.FLIGHTTASK_EXECUTE:
                     synchronized(lock){
-                        if(!Synchronizedstatus.getFlighttaskExecuteStatus()){
-                            Synchronizedstatus.setFlighttaskExecuteStatus(true);
-
+                        // 检查是否是第一次收到航线指令
+                        if(Synchronizedstatus.isIsruning()){
+                            LogUtil.log(TAG, "自检正在运行");
+                            return;
+                        } else if(!Synchronizedstatus.getInitStatus()){
+                            Synchronizedstatus.setIsruning(true);
+                            //自检
+                            MissionV3Manager.getInstance().checkVtxWithDelay(()->{
+                                Synchronizedstatus.setIsruning(false);
+                                Synchronizedstatus.setInitStatus(true);
+                            });
+                        }else if(Synchronizedstatus.getInitStatus()){
                             LogUtil.log(TAG, "收到：航线" + jsonString);
-                            //关闭避障
-                            PerceptionManager.getInstance().setPerceptionEnable(false);
-                            LogUtil.log(TAG,"关闭避障");
-                            PerceptionManager.getInstance().setObstacleAvoidanceHorizontalEnabled(false);
                             //设置modecode
                             Movement.getInstance().setMode_code(1);
                             //设置标志为
                             Movement.getInstance().setFlightmode(1);
-                            //回复
-                            sendMsg2Server(message);
+
+                            //存储最新消息并开始自检
                             MissionV3Manager.getInstance().taskExecute(message);
-                        }else{
-                            //直接回复
-                            sendMsg2Server(message);
-                            return;
+                            Synchronizedstatus.setIsruning(true);
                         }
                     }
                     break;
@@ -191,8 +197,19 @@ public class MqttCallBack extends BaseManager implements MqttCallbackExtended  {
                     LogUtil.log(TAG, "收到：返航" + jsonString);
                     //自动返航 (如果调用方法失败了 这个设置就有一个问题但是为了方便看懂我就放这里了没放成功的回调里面)
                     Movement.getInstance().setMode_code(9);
-                    if(!Movement.getInstance().isAlternate()){
+                    if(!Movement.getInstance().isAlternate()&&!ApronArucoDetectPort.getInstance().isStartAruco()&&!ApronArucoDetect.getInstance().isStartAruco()){
+//                        if(Movement.getInstance().getElevation()<15){
+//
+//
+//
+//                        }else{
+//                            FlightManager.getInstance().startGoHome(message);
+//                        }
+
                         FlightManager.getInstance().startGoHome(message);
+                    }else{
+                        sendMsg2Server(message);
+                        sendEvent2Server("正在视觉或飞往备降不允许返航",1);
                     }
                     break;
                 case Constant.INBOUND:
@@ -216,15 +233,33 @@ public class MqttCallBack extends BaseManager implements MqttCallbackExtended  {
                     ApronExecutionStatus.getInstance().setServerReplyTaskFail(true);
                     break;
                 case Constant.TAKEOFF_TO_POINT:
-                    LogUtil.log(TAG, "收到：一键起飞" + jsonString);
-                    //设置modecode
-                    Movement.getInstance().setMode_code(1);
-                    //设置标志为指令飞行
-                    Movement.getInstance().setFlightmode(2);
+//                    //1.检查图传是否连接
+//                    MissionDataBean data = new Gson().fromJson(new Gson().toJson(message.getData()), MissionDataBean.class);
+//                    Boolean generateKmz = Generakmztools.getInstance().generateKmz(data);
 
 
-                    TakeoffProgressScheduler.getInstance().startReporting();
-                    TakeOffToPointManager.getInstance().taskExecute(message);
+                    synchronized(lock){
+                        if(Synchronizedstatus.isIsruning()){
+                            LogUtil.log(TAG, "自检正在运行");
+                            return;
+                        } else if(!Synchronizedstatus.getInitStatus()){
+                            Synchronizedstatus.setIsruning(true);
+                            //自检
+                            TakeOffToPointManager.getInstance().checkVtxWithDelay(()->{
+                                Synchronizedstatus.setIsruning(false);
+                                Synchronizedstatus.setInitStatus(true);
+                            });
+                        }else if(Synchronizedstatus.getInitStatus()){
+                            LogUtil.log(TAG, "收到：一键起飞" + jsonString);
+                            //设置modecode
+                            Movement.getInstance().setMode_code(1);
+                            //设置标志为指令飞行
+                            Movement.getInstance().setFlightmode(2);
+                            TakeoffProgressScheduler.getInstance().startReporting();
+                            TakeOffToPointManager.getInstance().taskExecute(message);
+                            Synchronizedstatus.setIsruning(true);
+                        }
+                    }
                     break;
                 case Constant.FLY_TO_POINT:
                     LogUtil.log(TAG, "收到：飞向目标点" + jsonString);
@@ -369,7 +404,6 @@ public class MqttCallBack extends BaseManager implements MqttCallbackExtended  {
                     break;
                 case Constant.SPEAKER_PLAY_STOP:
                     LogUtil.log(TAG, "收到：喊话器-停止播放" + jsonString);
-
                     SpeakerManager.getInstance().speakerStop(message);
                     break;
                 case Constant.SPEAKER_PLAY_MODE_SET:
diff --git a/app/src/main/java/com/aros/apron/entity/Movement.java b/app/src/main/java/com/aros/apron/entity/Movement.java
index af9124d5..47adfb0b 100644
--- a/app/src/main/java/com/aros/apron/entity/Movement.java
+++ b/app/src/main/java/com/aros/apron/entity/Movement.java
@@ -57,7 +57,7 @@ public class Movement {
     private int landingPower;//降落电量所需百分比
     private int lowBatteryRTHState;//智能低电量返航状态 0未触发智能低电量返航 1触发智能低电量返航，飞行器正在倒计时 2执行智能低电量返航 3智能低电量返航被取消
     private String missionName;//当前正在执行的航线名
-    private int currentWaypointIndex=-1;//当前航点下标
+    private int currentWaypointIndex=0;//当前航点下标
 
     private boolean planeWing;//飞机是否在飞
     private boolean isMotorsOn;//电机是否起转
@@ -103,7 +103,7 @@ public class Movement {
     private String remoteSecondBatteryPercent;//遥控器外接电池剩余电量百分比
     private List<PayloadInfo> payloadInfos;//当前飞机负载设备信息
     private boolean propellerRotation;//飞机是否正在低速慢转桨
-    private boolean vtx;//检查图传是否正常
+    private volatile boolean vtx;//检查图传是否正常
     private int missionType;//任务类型 一键起飞航线，定频推送只会推送3
     private boolean virtualStickStatus;//前端判断是否显示/隐藏手控按钮
     private boolean cancelVirtualStickStatus;//前端判断是否显示/隐藏取消手控按钮
@@ -132,8 +132,8 @@ public class Movement {
     private int thermal_isotherm_state;
     private int thermal_isotherm_upper_limit;
 
-    private int gimbal_pitch;
-    private int gimbal_roll;
+    private double gimbal_pitch;
+    private double gimbal_roll;
     private double gimbal_yaw;
 
     private int capacity_percent;
@@ -311,7 +311,7 @@ public class Movement {
 
     // ========== 一键起飞相关字段 ==========
     private boolean takeofftopointmission;
-    private String takeoff_status;           // task_ready/wayline_progress/wayline_ok/wayline_failed/wayline_cancel/task_finish
+    private volatile String takeoff_status="task_ready";           // task_ready/wayline_progress/wayline_ok/wayline_failed/wayline_cancel/task_finish
     private int takeoff_result;              // 0成功，非0错误
     private float takeoff_remaining_distance; // 剩余距离（米）
     private float takeoff_remaining_time;    // 剩余时间（秒）
@@ -530,7 +530,7 @@ public class Movement {
     }
 
     //用来判断是什么起飞type
-    private int flightmode=0; //0代表没有操作  1代表航线飞行 2一键代表指令飞行  3flyto（一键和flyto）
+    private volatile int flightmode=0; //0代表没有操作  1代表航线飞行 2一键代表指令飞行  3flyto（一键和flyto）
     private boolean takeofftopoint;
     private boolean opendrc=false; //true 是开启 false 是关闭
 
@@ -1698,19 +1698,19 @@ public class Movement {
         this.thermal_isotherm_upper_limit = thermal_isotherm_upper_limit;
     }
 
-    public int getGimbal_pitch() {
+    public double getGimbal_pitch() {
         return gimbal_pitch;
     }
 
-    public void setGimbal_pitch(int gimbal_pitch) {
+    public void setGimbal_pitch(double gimbal_pitch) {
         this.gimbal_pitch = gimbal_pitch;
     }
 
-    public int getGimbal_roll() {
+    public double getGimbal_roll() {
         return gimbal_roll;
     }
 
-    public void setGimbal_roll(int gimbal_roll) {
+    public void setGimbal_roll(double gimbal_roll) {
         this.gimbal_roll = gimbal_roll;
     }
 
diff --git a/app/src/main/java/com/aros/apron/entity/Osd.java b/app/src/main/java/com/aros/apron/entity/Osd.java
index 8869817d..cede74b8 100644
--- a/app/src/main/java/com/aros/apron/entity/Osd.java
+++ b/app/src/main/java/com/aros/apron/entity/Osd.java
@@ -431,8 +431,8 @@ public class Osd {
         }
 
         public static class _$5300 {
-            private int gimbal_pitch;
-            private int gimbal_roll;
+            private double gimbal_pitch;
+            private double gimbal_roll;
             private double gimbal_yaw;
             private double measure_target_altitude;
             private int measure_target_distance;
@@ -449,19 +449,19 @@ public class Osd {
             private int thermal_isotherm_upper_limit;
             private int version;
 
-            public int getGimbal_pitch() {
+            public double getGimbal_pitch() {
                 return gimbal_pitch;
             }
 
-            public void setGimbal_pitch(int gimbal_pitch) {
+            public void setGimbal_pitch(double gimbal_pitch) {
                 this.gimbal_pitch = gimbal_pitch;
             }
 
-            public int getGimbal_roll() {
+            public double getGimbal_roll() {
                 return gimbal_roll;
             }
 
-            public void setGimbal_roll(int gimbal_roll) {
+            public void setGimbal_roll(double gimbal_roll) {
                 this.gimbal_roll = gimbal_roll;
             }
 
diff --git a/app/src/main/java/com/aros/apron/entity/TakeoffToPointProgress.java b/app/src/main/java/com/aros/apron/entity/TakeoffToPointProgress.java
index f7765da1..1cbca7a6 100644
--- a/app/src/main/java/com/aros/apron/entity/TakeoffToPointProgress.java
+++ b/app/src/main/java/com/aros/apron/entity/TakeoffToPointProgress.java
@@ -1,5 +1,7 @@
 package com.aros.apron.entity;
 
+import com.google.gson.annotations.SerializedName;
+
 import java.util.List;
 
 public class TakeoffToPointProgress {
@@ -59,13 +61,19 @@ public class TakeoffToPointProgress {
     }
 
     public static class Data {
+        @SerializedName("flight_id")
         private String flightId;
+        @SerializedName("planned_path_points")
         private List<PlannedPathPoint> plannedPathPoints;
+        @SerializedName("remaining_distance")
         private Float remainingDistance;
+        @SerializedName("remaining_time")
         private Float remainingTime;
         private Integer result;
         private String status;
+        @SerializedName("track_id")
         private String trackId;
+        @SerializedName("way_point_index")
         private Integer wayPointIndex;
 
         public String getFlightId() {
diff --git a/app/src/main/java/com/aros/apron/manager/AlternateLandingManager.java b/app/src/main/java/com/aros/apron/manager/AlternateLandingManager.java
index 9c351e13..c901f369 100644
--- a/app/src/main/java/com/aros/apron/manager/AlternateLandingManager.java
+++ b/app/src/main/java/com/aros/apron/manager/AlternateLandingManager.java
@@ -19,6 +19,7 @@ import com.aros.apron.entity.MissionPoint;
 import com.aros.apron.entity.Movement;
 import com.aros.apron.tools.DomParserKML;
 import com.aros.apron.tools.DomParserWPML;
+import com.aros.apron.tools.Generakmzaltheratools;
 import com.aros.apron.tools.LogUtil;
 import com.aros.apron.tools.PreferenceUtils;
 import com.aros.apron.tools.ZipUtil;
@@ -273,83 +274,15 @@ public class AlternateLandingManager extends BaseManager {
     }
 
     public void creatMissionAndUpload() {
-        // 创建第一个 MissionPoint 对象
-        MissionPoint missionPoint = new MissionPoint();
-        missionPoint.setLat(String.valueOf(Movement.getInstance().getLatitude()));
-        missionPoint.setLng(String.valueOf(Movement.getInstance().getLongitude()));
-        missionPoint.setSpeed(8.0);
-        missionPoint.setExecuteHeight(Movement.getInstance().getElevation()
-                > Double.parseDouble(PreferenceUtils.getInstance().getAlternatePointSecurityHeight())
-                ? Movement.getInstance().getElevation() :
-                Double.parseDouble(PreferenceUtils.getInstance().getAlternatePointSecurityHeight()));
-
-        // 创建第二个 MissionPoint 对象
-        MissionPoint missionPoint1 = new MissionPoint();
-        missionPoint1.setLat(PreferenceUtils.getInstance().getAlternatePointLat());
-        missionPoint1.setLng(PreferenceUtils.getInstance().getAlternatePointLon());
-        LogUtil.log(TAG, "备降点经纬度:" + PreferenceUtils.getInstance().getAlternatePointLat() +
-                "/" + PreferenceUtils.getInstance().getAlternatePointLon());
-        missionPoint1.setSpeed(7.0);
-        missionPoint1.setExecuteHeight(Movement.getInstance().getElevation()
-                > Double.parseDouble(PreferenceUtils.getInstance().getAlternatePointSecurityHeight())
-                ? Movement.getInstance().getElevation() - 1 :
-                Double.parseDouble(PreferenceUtils.getInstance().getAlternatePointSecurityHeight()));
-
-        // 创建一个 MissionPoint 列表
-        List<MissionPoint> missionPoints = new ArrayList<>();
-        missionPoints.add(missionPoint);
-        missionPoints.add(missionPoint1);
-
-        // 创建 FlightMission 对象并设置其属性
-        FlightMission flightMission = new FlightMission();
-        flightMission.setPoints(missionPoints);
-        flightMission.setMissionId(2);
-        flightMission.setFinishAction("autoLand");
-        flightMission.setTakeOffSecurityHeight(Float.parseFloat(PreferenceUtils.getInstance().getAlternatePointSecurityHeight()));
-        flightMission.setSpeed(15.0);
-
-        LogUtil.log(TAG, "当前高度:" + Movement.getInstance().getElevation()
-                + "---飞往备降点高度:" + Double.parseDouble(PreferenceUtils.getInstance().getAlternatePointSecurityHeight())
-                + "---航线安全起飞高度:" + Float.parseFloat(PreferenceUtils.getInstance().getAlternatePointSecurityHeight()));
-
-        sendEvent2Server( "开始生成备降点航线",1);
-
-        // 生成xml文件
-        File file1 = new File(
-                getExternalStoragePublicDirectory("KMZ").getAbsolutePath() + File.separator + "wpmz");
-        if (!file1.exists()) {
-            if (file1.mkdirs()) {
-                LogUtil.log(TAG, "生成备降航线成功");
-                sendEvent2Server( "生成备降路线文件成功",1);
-
-            } else {
-                LogUtil.log(TAG, "生成备降航线失败");
-                sendEvent2Server( "生成备降航线失败",2);
-                    sendEvent2Server( "生成备降航线失败",2);
-
-            }
+        Boolean generatealtKmz = Generakmzaltheratools.getInstance().generateKmz();
+        if(generatealtKmz==true){
+            sendEvent2Server( "生成备降点航线成功",1);
         }
-        DomParserKML domParserKML = new DomParserKML(getExternalStoragePublicDirectory("KMZ").getAbsolutePath() + File.separator + "wpmz",
-                "/template.kml");
-        domParserKML.createKml(flightMission);
 
-        DomParserWPML domParserWPML = new DomParserWPML(getExternalStoragePublicDirectory("KMZ").getAbsolutePath() + File.separator + "wpmz",
-                "/waylines.wpml");
-        domParserWPML.createWpml(flightMission);
-
-        File kmzFile = new File(getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) + File.separator + "alternate.kmz");
-        kmzFile.getParentFile().mkdirs();
-
-        try {
-            ZipUtil.zip(getExternalStoragePublicDirectory("KMZ").getAbsolutePath() + "/wpmz", getExternalStoragePublicDirectory("KMZ").getAbsolutePath() + File.separator + "alternate.kmz");
-        } catch (IOException e) {
-            sendEvent2Server( "备降任务生成异常",2);
-
-            throw new RuntimeException(e);
-        }
+        String kmzPath = "/storage/self/primary/DJIDemo/cache/kmz/alternate.kmz";
 
         IWaypointMissionManager missionManager = WaypointMissionManager.getInstance();
-        missionManager.pushKMZFileToAircraft(getExternalStoragePublicDirectory("KMZ").getAbsolutePath() + File.separator + "alternate.kmz", new CommonCallbacks.CompletionCallbackWithProgress<Double>() {
+        missionManager.pushKMZFileToAircraft(kmzPath, new CommonCallbacks.CompletionCallbackWithProgress<Double>() {
             @Override
             public void onProgressUpdate(Double aDouble) {
                 LogUtil.log(TAG, "备降点航线上传进度:" + aDouble + "%");
diff --git a/app/src/main/java/com/aros/apron/manager/BatteryManager.java b/app/src/main/java/com/aros/apron/manager/BatteryManager.java
index 4a2a8b59..36ce3ff2 100644
--- a/app/src/main/java/com/aros/apron/manager/BatteryManager.java
+++ b/app/src/main/java/com/aros/apron/manager/BatteryManager.java
@@ -1,6 +1,8 @@
 package com.aros.apron.manager;
 
 
+import static dji.sdk.keyvalue.key.KeyTools.createKey;
+
 import androidx.annotation.Nullable;
 
 import com.aros.apron.base.BaseManager;
@@ -36,7 +38,7 @@ public class BatteryManager extends BaseManager {
 
 
     public void initBatteryInfo() {
-        Boolean isConnect = KeyManager.getInstance().getValue(KeyTools.createKey(BatteryKey.KeyConnection, 0));
+        Boolean isConnect = KeyManager.getInstance().getValue(createKey(FlightControllerKey.KeyConnection));
         if (isConnect != null && isConnect) {
 
             LowBatteryRTHInfo lowBatteryRTHInfo = KeyManager.getInstance().getValue(KeyTools.createKey(FlightControllerKey.
diff --git a/app/src/main/java/com/aros/apron/manager/CameraManager.java b/app/src/main/java/com/aros/apron/manager/CameraManager.java
index 3ad4d3da..5d2dd387 100644
--- a/app/src/main/java/com/aros/apron/manager/CameraManager.java
+++ b/app/src/main/java/com/aros/apron/manager/CameraManager.java
@@ -893,6 +893,7 @@ public void stopRecordVideo(MessageDown message) {
             @Override
             public void onSuccess(EmptyMsg emptyMsg) {
                 LogUtil.log(TAG, "停止录像成功");
+                sendMsg2Server(message);
             }
 
             @Override
diff --git a/app/src/main/java/com/aros/apron/manager/FlightManager.java b/app/src/main/java/com/aros/apron/manager/FlightManager.java
index 3727402e..6cb7590e 100644
--- a/app/src/main/java/com/aros/apron/manager/FlightManager.java
+++ b/app/src/main/java/com/aros/apron/manager/FlightManager.java
@@ -18,6 +18,7 @@ import com.aros.apron.entity.MessageDown;
 import com.aros.apron.entity.Movement;
 import com.aros.apron.tools.AlternateArucoDetect;
 import com.aros.apron.tools.ApronArucoDetect;
+import com.aros.apron.tools.ApronArucoDetectPort;
 import com.aros.apron.tools.DroneHelper;
 import com.aros.apron.tools.LocationUtils;
 import com.aros.apron.tools.LogUtil;
@@ -29,13 +30,20 @@ import com.google.gson.Gson;
 import org.greenrobot.eventbus.EventBus;
 
 import java.util.List;
+import java.util.Objects;
 
 import dji.sdk.keyvalue.key.AirLinkKey;
+import dji.sdk.keyvalue.key.CameraKey;
 import dji.sdk.keyvalue.key.FlightControllerKey;
 import dji.sdk.keyvalue.key.KeyTools;
 import dji.sdk.keyvalue.key.ProductKey;
 import dji.sdk.keyvalue.key.RtkMobileStationKey;
+import dji.sdk.keyvalue.value.camera.CameraExposureCompensation;
+import dji.sdk.keyvalue.value.camera.CameraExposureMode;
+import dji.sdk.keyvalue.value.camera.CameraShutterSpeed;
+import dji.sdk.keyvalue.value.camera.CameraVideoStreamSourceType;
 import dji.sdk.keyvalue.value.common.Attitude;
+import dji.sdk.keyvalue.value.common.ComponentIndexType;
 import dji.sdk.keyvalue.value.common.EmptyMsg;
 import dji.sdk.keyvalue.value.common.LocationCoordinate2D;
 import dji.sdk.keyvalue.value.common.LocationCoordinate3D;
@@ -79,6 +87,7 @@ public class FlightManager extends BaseManager {
     private IDeviceStatusManager iDeviceStatusManager;
     private boolean isFlying;
     private boolean isMotorsOn;
+    private int count = 0;
 
     private FlightManager() {
     }
@@ -93,7 +102,7 @@ public class FlightManager extends BaseManager {
 
     public void initFlightInfo() {
         Boolean isConnect = KeyManager.getInstance().getValue(createKey(FlightControllerKey.KeyConnection));
-        if (isConnect!=null&&isConnect){
+        if (isConnect != null && isConnect) {
             //添加飞机连接状态的mode
             KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyConnection), this, new CommonCallbacks.KeyListener<Boolean>() {
                 @Override
@@ -105,15 +114,21 @@ public class FlightManager extends BaseManager {
                             // 飞机未连接时设置未连接状态
                             Movement.getInstance().setMode_code(14);
                             OSDManager.getInstance().pushFlightAttitude();
-
                             Movement.getInstance().setMissionFinish(true);
 
-
                         } else {
 
                             PerceptionManager.getInstance().setPerceptionEnable(false);
-                            LogUtil.log(TAG,"关闭避障");
-                            PerceptionManager.getInstance().setObstacleAvoidanceHorizontalEnabled(false);
+                            PerceptionManager.getInstance().setObstacleAvoidanceupEnabled(false);
+                            PerceptionManager.getInstance().setObstacleAvoidancedownEnabled(false);
+                            PerceptionManager.getInstance().closeRadarManager(false);
+
+                            if (count == 0) {
+                                sendEvent2Server("开始上传日志文件", 1);
+                                //上传日志文件
+                                LogUploadManager.getInstance().uploadTodayLog();
+                                count++;
+                            }
                             //连上就待机
                             MediaDataCenter.getInstance().getCameraStreamManager().setVisionAssistViewDirection(VisionAssistDirection.DOWN, new CommonCallbacks.CompletionCallback() {
                                 @Override
@@ -134,600 +149,607 @@ public class FlightManager extends BaseManager {
                     }
                 }
             });
-        //重新复制一下如果一直断开这个回调会不执行
-        if (isConnect != null && isConnect) {
-            LogUtil.log(TAG, "setMode_code2(0)");
-            Movement.getInstance().setMode_code(0);
-        } else {
-            Movement.getInstance().setMode_code(14);
-        }
-
-        // 直接注册所有监听器，不依赖于FlightController的连接状态
-        if (!TextUtils.isEmpty(PreferenceUtils.getInstance().getAlternatePointLon())
-                && !TextUtils.isEmpty(PreferenceUtils.getInstance().getAlternatePointLat())) {
-            Movement.getInstance().setAlternatePointLon(PreferenceUtils.getInstance().getAlternatePointLon());
-            Movement.getInstance().setAlternatePointLat(PreferenceUtils.getInstance().getAlternatePointLat());
-        }
-
-        iDeviceStatusManager = dji.v5.manager.diagnostic.DeviceStatusManager.getInstance();
-        LogUtil.log(TAG, "iDeviceStatusManager" + "设置成功");
-        iDeviceStatusManager.addDJIDeviceStatusChangeListener(new DJIDeviceStatusChangeListener() {
-            @Override
-            public void onDeviceStatusUpdate(DJIDeviceStatus from, DJIDeviceStatus to) {
-                if (to != null && !TextUtils.isEmpty(to.description())) {
-                    LogUtil.log(TAG, "setPlaneMessage" + to.description());
-                    Movement.getInstance().setPlaneMessage(to.description());
-                    pushFlightAttitude();
-                }
+            //重新复制一下如果一直断开这个回调会不执行
+            if (isConnect != null && isConnect) {
+                LogUtil.log(TAG, "setMode_code2(0)");
+                Movement.getInstance().setMode_code(0);
+            } else {
+                Movement.getInstance().setMode_code(14);
             }
-        });
 
-        //避障状态
-        IPerceptionManager perceptionManager = dji.v5.manager.aircraft.perception.PerceptionManager.getInstance();
-        perceptionManager.addPerceptionInformationListener(new PerceptionInformationListener() {
-            @Override
-            public void onUpdate(@NonNull PerceptionInfo information) {
-                if (information != null) {
-                    if (information.getDownwardObstacleAvoidanceWorking() != null) {
-                        Movement.getInstance().setDownside(information.getDownwardObstacleAvoidanceWorking() ? 1 : 0);
-                    }
-                    Movement.getInstance().setHorizon(information.isHorizontalObstacleAvoidanceEnabled() ? 1 : 0);
-                    if (information.getUpwardObstacleAvoidanceWorking() != null) {
-                        Movement.getInstance().setUpside(information.getUpwardObstacleAvoidanceWorking() ? 1 : 0);
-                    }
-                    pushFlightAttitude();
-
-                }
+            // 直接注册所有监听器，不依赖于FlightController的连接状态
+            if (!TextUtils.isEmpty(PreferenceUtils.getInstance().getAlternatePointLon())
+                    && !TextUtils.isEmpty(PreferenceUtils.getInstance().getAlternatePointLat())) {
+                Movement.getInstance().setAlternatePointLon(PreferenceUtils.getInstance().getAlternatePointLon());
+                Movement.getInstance().setAlternatePointLat(PreferenceUtils.getInstance().getAlternatePointLat());
             }
-        });
 
-        iDeviceHealthManager = dji.v5.manager.diagnostic.DeviceHealthManager.getInstance();
-        iDeviceHealthManager.addDJIDeviceHealthInfoChangeListener(new DJIDeviceHealthInfoChangeListener() {
-            @Override
-            public void onDeviceHealthInfoUpdate(List<DJIDeviceHealthInfo> infos) {
-                if (infos != null && infos.size() > 0) {
-                    String warningMessage = infos.get(0).description();
-                    if (!TextUtils.isEmpty(warningMessage)) {
-                        Movement.getInstance().setWarningMessage(warningMessage);
+            iDeviceStatusManager = dji.v5.manager.diagnostic.DeviceStatusManager.getInstance();
+            LogUtil.log(TAG, "iDeviceStatusManager" + "设置成功");
+            iDeviceStatusManager.addDJIDeviceStatusChangeListener(new DJIDeviceStatusChangeListener() {
+                @Override
+                public void onDeviceStatusUpdate(DJIDeviceStatus from, DJIDeviceStatus to) {
+                    if (to != null && !TextUtils.isEmpty(to.description())) {
+                        LogUtil.log(TAG, "setPlaneMessage" + to.description());
+                        sendEvent2Server("PlaneMessage"+to.description(),1);
+                        Movement.getInstance().setPlaneMessage(to.description());
                         pushFlightAttitude();
                     }
-                } else {
-                    Log.e(TAG, "监听设备健康,无异常");
-                    Movement.getInstance().setWarningMessage("");
-                    pushFlightAttitude();
                 }
-            }
-        });
+            });
 
+            //避障状态
+            IPerceptionManager perceptionManager = dji.v5.manager.aircraft.perception.PerceptionManager.getInstance();
+            perceptionManager.addPerceptionInformationListener(new PerceptionInformationListener() {
+                @Override
+                public void onUpdate(@NonNull PerceptionInfo information) {
+                    if (information != null) {
+                        if (information.getDownwardObstacleAvoidanceWorking() != null) {
+                            Movement.getInstance().setDownside(information.getDownwardObstacleAvoidanceWorking() ? 1 : 0);
+                        }
+                        Movement.getInstance().setHorizon(information.isHorizontalObstacleAvoidanceEnabled() ? 1 : 0);
+                        if (information.getUpwardObstacleAvoidanceWorking() != null) {
+                            Movement.getInstance().setUpside(information.getUpwardObstacleAvoidanceWorking() ? 1 : 0);
+                        }
+                        pushFlightAttitude();
 
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyIsFlying), this, new CommonCallbacks.KeyListener<Boolean>() {
-            @Override
-            public void onValueChange(@Nullable Boolean oldValue, @Nullable Boolean newValue) {
-                if (newValue != null) {
-                    if (newValue) {
-                        ApronExecutionStatus.getInstance().setAircraftWaitShutDown(false);
-                        //起飞了这个状态就看这里
+                    }
+                }
+            });
 
-                        if (Movement.getInstance().getFlightmode() == 1) {
-                            Movement.getInstance().setMode_code(5);
-                        } else if (Movement.getInstance().getFlightmode() == 2) {
-                            Movement.getInstance().setMode_code(17);
+            iDeviceHealthManager = dji.v5.manager.diagnostic.DeviceHealthManager.getInstance();
+            iDeviceHealthManager.addDJIDeviceHealthInfoChangeListener(new DJIDeviceHealthInfoChangeListener() {
+                @Override
+                public void onDeviceHealthInfoUpdate(List<DJIDeviceHealthInfo> infos) {
+                    if (infos != null && infos.size() > 0) {
+                        String warningMessage = infos.get(0).description();
+                        if (!TextUtils.isEmpty(warningMessage)) {
+                            Movement.getInstance().setWarningMessage(warningMessage);
+                            pushFlightAttitude();
                         }
                     } else {
-                        LogUtil.log(TAG, "setMode_code3(0)");
-                        Movement.getInstance().setMode_code(0);
-                        OSDManager.getInstance().pushFlightAttitude();
-
+                        Log.e(TAG, "监听设备健康,无异常");
+                        Movement.getInstance().setWarningMessage("");
+                        pushFlightAttitude();
                     }
-
-                    isFlying = newValue;
-                    Movement.getInstance().setPlaneWing(newValue);
-                    pushFlightAttitude();
-
-
                 }
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAreMotorsOn), this, new CommonCallbacks.KeyListener<Boolean>() {
-            @Override
-            public void onValueChange(@Nullable Boolean oldValue, @Nullable Boolean newValue) {
-                if (newValue != null) {
-
-                    if (newValue == false) {
-                        //电机不转待机
-                        Movement.getInstance().setMode_code(0);
-                        OSDManager.getInstance().pushFlightAttitude();
-                    }
-
-                    isMotorsOn = newValue;
-                    pushFlightAttitude();
-                    Movement.getInstance().setMotorsOn(newValue);
-                }
-
-            }
-        });
-        //挡位
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyRemoteControllerFlightMode), this, new CommonCallbacks.KeyListener<RemoteControllerFlightMode>() {
-            @Override
-            public void onValueChange(@Nullable RemoteControllerFlightMode remoteControllerFlightMode, @Nullable RemoteControllerFlightMode t1) {
-                if (remoteControllerFlightMode != null) {
-                    Movement.getInstance().setGear(remoteControllerFlightMode.value());
-                    pushFlightAttitude();
-                }
-            }
-        });
-        KeyManager.getInstance().listen(KeyTools.createKey(ProductKey.KeyProductType), this, new CommonCallbacks.KeyListener<ProductType>() {
-            @Override
-            public void onValueChange(@Nullable ProductType productType, @Nullable ProductType t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setProductName(t1.name());
-                    pushFlightAttitude();
-                }
-            }
-        });
-        //飞机SN号
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeySerialNumber), this, new CommonCallbacks.KeyListener<String>() {
-            @Override
-            public void onValueChange(@Nullable String s, @Nullable String t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setFirmware_version(t1);
-                    pushFlightAttitude();
-                }
-            }
-        });
-        //RID状态
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyRidWorkingStatusPush), this, new CommonCallbacks.KeyListener<RidWorkingStatusPushMsg>() {
-            @Override
-            public void onValueChange(@Nullable RidWorkingStatusPushMsg ridWorkingStatusPushMsg, @Nullable RidWorkingStatusPushMsg t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setRid_state(t1.getIsRidSupport());
-                    pushFlightAttitude();
-
-                }
-            }
-        });
-        //rtk起飞高度(计算海拔高度使用)
-        KeyManager.getInstance().listen(createKey(RtkMobileStationKey.KeyRTKTakeoffAltitudeInfo), this, new CommonCallbacks.KeyListener<RTKTakeoffAltitudeInfo>() {
-            @Override
-            public void onValueChange(@Nullable RTKTakeoffAltitudeInfo rtkTakeoffAltitudeInfo, @Nullable RTKTakeoffAltitudeInfo t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setRtk_takeoff_altitude(t1.getAltitude());
-                    pushFlightAttitude();
-                }
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftLocation3D), this, new CommonCallbacks.KeyListener<LocationCoordinate3D>() {
-            @Override
-            public void onValueChange(@Nullable LocationCoordinate3D oldValue, @Nullable LocationCoordinate3D newValue) {
-                if (newValue != null) {
-                    if (newValue.getAltitude() != null) {
-                        Movement.getInstance().setElevation(newValue.getAltitude());
-                        Movement.getInstance().setTask_height(newValue.getAltitude());
-
-                    }
-
-                    double distance = LocationUtils.getDistance(String.valueOf(Movement.getInstance().getHomepoint_longitude()),
-                            String.valueOf(Movement.getInstance().getHomepoint_latitude()),
-                            String.valueOf(newValue.getLongitude()),
-                            String.valueOf(newValue.getLatitude()));
-                    Movement.getInstance().setHome_distance(distance);
-
-                    Movement.getInstance().setHeight(GpsUtils.egm96Altitude((Movement.getInstance().getRtk_takeoff_altitude() +
-                                    Movement.getInstance().getElevation()),
-                            newValue.getLatitude(), newValue.getLongitude()));
-
-                    Movement.getInstance().setLatitude(newValue.getLatitude());
-                    Movement.getInstance().setLongitude(newValue.getLongitude());
-                    pushFlightAttitude();
+            });
 
 
-                }
-            }
-        });
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyIsFlying), this, new CommonCallbacks.KeyListener<Boolean>() {
+                @Override
+                public void onValueChange(@Nullable Boolean oldValue, @Nullable Boolean newValue) {
+                    if (newValue != null) {
+                        if (newValue) {
+                            ApronExecutionStatus.getInstance().setAircraftWaitShutDown(false);
+                            //起飞了这个状态就看这里
 
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftVelocity), this, new CommonCallbacks.KeyListener<Velocity3D>() {
-            @Override
-            public void onValueChange(@Nullable Velocity3D velocity3D, @Nullable Velocity3D t1) {
+                            if (Movement.getInstance().getFlightmode() == 1) {
+                                Movement.getInstance().setMode_code(5);
+                            } else if (Movement.getInstance().getFlightmode() == 2) {
+                                Movement.getInstance().setMode_code(17);
+                            }
+                        } else {
+                            LogUtil.log(TAG, "setMode_code3(0)");
+                            Movement.getInstance().setMode_code(0);
+                            OSDManager.getInstance().pushFlightAttitude();
 
-            }
-        });
+                        }
 
-        //水平&垂直速度
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftVelocity), this, new CommonCallbacks.KeyListener<Velocity3D>() {
-            @Override
-            public void onValueChange(@Nullable Velocity3D oldValue, @Nullable Velocity3D newValue) {
-                if (newValue != null) {
-                    if (newValue.getZ() != null) {
-                        Movement.getInstance().setVertical_speed(newValue.getZ());
-                    }
-                    if (newValue.getY() != null && newValue.getX() != null) {
-                        Movement.getInstance().setHorizontal_speed(Math.abs(Math.sqrt((newValue.getX() * newValue.getX()) + (newValue.getY() * newValue.getY()))));
-                    }
-                    pushFlightAttitude();
+                        isFlying = newValue;
+                        Movement.getInstance().setPlaneWing(newValue);
+                        pushFlightAttitude();
 
-                }
-            }
-        });
-
-        //卫星数
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyGPSSatelliteCount), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer oldValue, @Nullable Integer newValue) {
-                if (newValue != null) {
-                    Movement.getInstance().setGps_number(newValue);
-                    Movement.getInstance().setRtk_number(newValue);
-                    pushFlightAttitude();
-                }
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyGPSSatelliteCount), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setGPSSatelliteCount(t1);
-                }
-            }
-        });
-
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyGPSSignalLevel), this, new CommonCallbacks.KeyListener<GPSSignalLevel>() {
-            @Override
-            public void onValueChange(@Nullable GPSSignalLevel gpsSignalLevel, @Nullable GPSSignalLevel t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setQuality(t1.value());
-                    pushFlightAttitude();
-
-                }
-            }
-        });
-
-        //返航位置
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyHomeLocation), this, new CommonCallbacks.KeyListener<LocationCoordinate2D>() {
-            @Override
-            public void onValueChange(@Nullable LocationCoordinate2D oldValue, @Nullable LocationCoordinate2D newValue) {
-                if (newValue != null) {
-                    Movement.getInstance().setHomepoint_latitude(newValue.getLatitude());
-                    Movement.getInstance().setHomepoint_longitude(newValue.getLongitude());
-                    pushFlightAttitude();
-
-                }
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyDistanceLimitEnabled), this, new CommonCallbacks.KeyListener<Boolean>() {
-            @Override
-            public void onValueChange(@Nullable Boolean aBoolean, @Nullable Boolean t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setDistanceLimitEnabled(t1);
-                    pushFlightAttitude();
-                }
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyWindSpeed), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer oldValue, @Nullable Integer newValue) {
-                if (newValue != null) {
-                    Movement.getInstance().setWind_speed(newValue);
-                    pushFlightAttitude();
-                }
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyWindDirection), this, new CommonCallbacks.KeyListener<WindDirection>() {
-            @Override
-            public void onValueChange(@Nullable WindDirection windDirection, @Nullable WindDirection t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setWind_direction(t1.value());
-                    pushFlightAttitude();
-                }
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyCompassHeading), this, new CommonCallbacks.KeyListener<Double>() {
-            @Override
-            public void onValueChange(@Nullable Double oldValue, @Nullable Double newValue) {
-                if (newValue != null) {
-                    Movement.getInstance().setAngleYaw(newValue.intValue());
-                    pushFlightAttitude();
-                }
-            }
-        });
-
-        //飞行器夜航灯状态
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyLEDsSettings), this, new CommonCallbacks.KeyListener<LEDsSettings>() {
-            @Override
-            public void onValueChange(@Nullable LEDsSettings leDsSettings, @Nullable LEDsSettings t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setNight_lights_state(t1.getNavigationLEDsOn() ? 1 : 0);
-                    pushFlightAttitude();
-
-                }
-            }
-        });
-
-        //飞行器状态	(未找到类似上云api的枚举格式，先用FlightMode替代)
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyFlightMode), this, new CommonCallbacks.KeyListener<FlightMode>() {
-            @Override
-            public void onValueChange(@Nullable FlightMode oldValue, @Nullable FlightMode newValue) {
-                if (newValue != null) {
-                    if (newValue == FlightMode.MOTOR_START) {
-                        //刚起飞时，重置保存的状态
-                        PreferenceUtils.getInstance().setNeedTriggerAlterArucoLand(false);
-                        PreferenceUtils.getInstance().setNeedTriggerApronArucoLand(false);
-                        PreferenceUtils.getInstance().setTriggerToAlternatePoint(false);
-
-                    }
-                    Movement.getInstance().setPlaneMode(newValue.name());
-                    pushFlightAttitude();
-
-                    switch (newValue) {
-                        case TAKE_OFF_READY:
-                            //Movement.getInstance().setMode_code(2);
-                            break;
-                        case VIRTUAL_STICK:
-                            //Movement.getInstance().setMode_code(3);
-                            break;
-                        case AUTO_TAKE_OFF:
-                            //我觉得可能会重复设置
-                            //Movement.getInstance().setMode_code(4);
-                            break;
-                        case WAYPOINT:
-                            //Movement.getInstance().setMode_code(5);
-                            break;
-                        case PANO:
-                            Movement.getInstance().setMode_code(6);
-                            break;
-                        case FOLLOW_ME:
-                            Movement.getInstance().setMode_code(7);
-                            break;
-                        case AUTO_AVOIDANCE:
-                            Movement.getInstance().setMode_code(8);
-                            break;
-                        case GO_HOME:
-                            Movement.getInstance().setMode_code(9);
-                            break;
-                        case AUTO_LANDING:
-                            Movement.getInstance().setMode_code(10);
-                            //重置这个飞行状态
-                            Movement.getInstance().setFlightmode(0);
-                            break;
-                        case FORCE_LANDING:
-                            Movement.getInstance().setMode_code(11);
-                            break;
-                        case POI:
-                            Movement.getInstance().setMode_code(20);
-                            break;
 
                     }
                 }
-            }
-        });
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAreMotorsOn), this, new CommonCallbacks.KeyListener<Boolean>() {
+                @Override
+                public void onValueChange(@Nullable Boolean oldValue, @Nullable Boolean newValue) {
+                    if (newValue != null) {
+
+                        if (newValue == false) {
+                            //电机不转待机
+                            Movement.getInstance().setMode_code(0);
+                            OSDManager.getInstance().pushFlightAttitude();
+                        }
+
+                        isMotorsOn = newValue;
+                        pushFlightAttitude();
+                        Movement.getInstance().setMotorsOn(newValue);
+                    }
 
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftAttitude), this, new CommonCallbacks.KeyListener<Attitude>() {
-            @Override
-            public void onValueChange(@Nullable Attitude attitude, @Nullable Attitude t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setAttitude_pitch(t1.getPitch());
-                    Movement.getInstance().setAttitude_head(t1.getYaw());
-                    Movement.getInstance().setTask_attitude_head(t1.getYaw());
-                    Movement.getInstance().setAttitude_roll(t1.getRoll());
                 }
-                pushFlightAttitude();
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(AirLinkKey.KeyUpLinkQuality), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer oldValue, @Nullable Integer newValue) {
-                if (newValue != null) {
-                    Movement.getInstance().setRemoteControlSignal(newValue);
+            });
+            //挡位
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyRemoteControllerFlightMode), this, new CommonCallbacks.KeyListener<RemoteControllerFlightMode>() {
+                @Override
+                public void onValueChange(@Nullable RemoteControllerFlightMode remoteControllerFlightMode, @Nullable RemoteControllerFlightMode t1) {
+                    if (remoteControllerFlightMode != null) {
+                        Movement.getInstance().setGear(remoteControllerFlightMode.value());
+                        pushFlightAttitude();
+                    }
                 }
-                pushFlightAttitude();
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(AirLinkKey.KeyDownLinkQuality), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer oldValue, @Nullable Integer newValue) {
-                if (newValue != null) {
-                    Movement.getInstance().setPictureBiographySignal(newValue);
+            });
+            KeyManager.getInstance().listen(KeyTools.createKey(ProductKey.KeyProductType), this, new CommonCallbacks.KeyListener<ProductType>() {
+                @Override
+                public void onValueChange(@Nullable ProductType productType, @Nullable ProductType t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setProductName(t1.name());
+                        pushFlightAttitude();
+                    }
                 }
-                pushFlightAttitude();
-            }
-        });
+            });
+            //飞机SN号
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeySerialNumber), this, new CommonCallbacks.KeyListener<String>() {
+                @Override
+                public void onValueChange(@Nullable String s, @Nullable String t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setFirmware_version(t1);
+                        pushFlightAttitude();
+                    }
+                }
+            });
+            //RID状态
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyRidWorkingStatusPush), this, new CommonCallbacks.KeyListener<RidWorkingStatusPushMsg>() {
+                @Override
+                public void onValueChange(@Nullable RidWorkingStatusPushMsg ridWorkingStatusPushMsg, @Nullable RidWorkingStatusPushMsg t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setRid_state(t1.getIsRidSupport());
+                        pushFlightAttitude();
 
-        GoHomeState goHomeState = KeyManager.getInstance().getValue(createKey(FlightControllerKey.KeyGoHomeStatus));
-        if (goHomeState != null) {
-            Movement.getInstance().setGoHomeState(goHomeState.value());
+                    }
+                }
+            });
+            //rtk起飞高度(计算海拔高度使用)
+            KeyManager.getInstance().listen(createKey(RtkMobileStationKey.KeyRTKTakeoffAltitudeInfo), this, new CommonCallbacks.KeyListener<RTKTakeoffAltitudeInfo>() {
+                @Override
+                public void onValueChange(@Nullable RTKTakeoffAltitudeInfo rtkTakeoffAltitudeInfo, @Nullable RTKTakeoffAltitudeInfo t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setRtk_takeoff_altitude(t1.getAltitude());
+                        pushFlightAttitude();
+                    }
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftLocation3D), this, new CommonCallbacks.KeyListener<LocationCoordinate3D>() {
+                @Override
+                public void onValueChange(@Nullable LocationCoordinate3D oldValue, @Nullable LocationCoordinate3D newValue) {
+                    if (newValue != null) {
+                        if (newValue.getAltitude() != null) {
+                            Movement.getInstance().setElevation(newValue.getAltitude());
+                            Movement.getInstance().setTask_height(newValue.getAltitude());
+
+                        }
+
+                        double distance = LocationUtils.getDistance(String.valueOf(Movement.getInstance().getHomepoint_longitude()),
+                                String.valueOf(Movement.getInstance().getHomepoint_latitude()),
+                                String.valueOf(newValue.getLongitude()),
+                                String.valueOf(newValue.getLatitude()));
+                        Movement.getInstance().setHome_distance(distance);
+
+                        Movement.getInstance().setHeight(GpsUtils.egm96Altitude((Movement.getInstance().getRtk_takeoff_altitude() +
+                                        Movement.getInstance().getElevation()),
+                                newValue.getLatitude(), newValue.getLongitude()));
+
+                        Movement.getInstance().setLatitude(newValue.getLatitude());
+                        Movement.getInstance().setLongitude(newValue.getLongitude());
+                        pushFlightAttitude();
+
+
+                    }
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftVelocity), this, new CommonCallbacks.KeyListener<Velocity3D>() {
+                @Override
+                public void onValueChange(@Nullable Velocity3D velocity3D, @Nullable Velocity3D t1) {
+
+                }
+            });
+
+            //水平&垂直速度
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftVelocity), this, new CommonCallbacks.KeyListener<Velocity3D>() {
+                @Override
+                public void onValueChange(@Nullable Velocity3D oldValue, @Nullable Velocity3D newValue) {
+                    if (newValue != null) {
+                        if (newValue.getZ() != null) {
+                            Movement.getInstance().setVertical_speed(newValue.getZ());
+                        }
+                        if (newValue.getY() != null && newValue.getX() != null) {
+                            Movement.getInstance().setHorizontal_speed(Math.abs(Math.sqrt((newValue.getX() * newValue.getX()) + (newValue.getY() * newValue.getY()))));
+                        }
+                        pushFlightAttitude();
+
+                    }
+                }
+            });
+
+            //卫星数
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyGPSSatelliteCount), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer oldValue, @Nullable Integer newValue) {
+                    if (newValue != null) {
+                        Movement.getInstance().setGps_number(newValue);
+                        Movement.getInstance().setRtk_number(newValue);
+                        pushFlightAttitude();
+                    }
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyGPSSatelliteCount), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setGPSSatelliteCount(t1);
+                    }
+                }
+            });
+
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyGPSSignalLevel), this, new CommonCallbacks.KeyListener<GPSSignalLevel>() {
+                @Override
+                public void onValueChange(@Nullable GPSSignalLevel gpsSignalLevel, @Nullable GPSSignalLevel t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setQuality(t1.value());
+                        pushFlightAttitude();
+
+                    }
+                }
+            });
+
+            //返航位置
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyHomeLocation), this, new CommonCallbacks.KeyListener<LocationCoordinate2D>() {
+                @Override
+                public void onValueChange(@Nullable LocationCoordinate2D oldValue, @Nullable LocationCoordinate2D newValue) {
+                    if (newValue != null) {
+                        Movement.getInstance().setHomepoint_latitude(newValue.getLatitude());
+                        Movement.getInstance().setHomepoint_longitude(newValue.getLongitude());
+                        pushFlightAttitude();
+
+                    }
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyDistanceLimitEnabled), this, new CommonCallbacks.KeyListener<Boolean>() {
+                @Override
+                public void onValueChange(@Nullable Boolean aBoolean, @Nullable Boolean t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setDistanceLimitEnabled(t1);
+                        pushFlightAttitude();
+                    }
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyWindSpeed), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer oldValue, @Nullable Integer newValue) {
+                    if (newValue != null) {
+                        Movement.getInstance().setWind_speed(newValue);
+                        pushFlightAttitude();
+                    }
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyWindDirection), this, new CommonCallbacks.KeyListener<WindDirection>() {
+                @Override
+                public void onValueChange(@Nullable WindDirection windDirection, @Nullable WindDirection t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setWind_direction(t1.value());
+                        pushFlightAttitude();
+                    }
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyCompassHeading), this, new CommonCallbacks.KeyListener<Double>() {
+                @Override
+                public void onValueChange(@Nullable Double oldValue, @Nullable Double newValue) {
+                    if (newValue != null) {
+                        Movement.getInstance().setAngleYaw(newValue.intValue());
+                        pushFlightAttitude();
+                    }
+                }
+            });
+
+            //飞行器夜航灯状态
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyLEDsSettings), this, new CommonCallbacks.KeyListener<LEDsSettings>() {
+                @Override
+                public void onValueChange(@Nullable LEDsSettings leDsSettings, @Nullable LEDsSettings t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setNight_lights_state(t1.getNavigationLEDsOn() ? 1 : 0);
+                        pushFlightAttitude();
+
+                    }
+                }
+            });
+
+            //飞行器状态	(未找到类似上云api的枚举格式，先用FlightMode替代)
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyFlightMode), this, new CommonCallbacks.KeyListener<FlightMode>() {
+                @Override
+                public void onValueChange(@Nullable FlightMode oldValue, @Nullable FlightMode newValue) {
+                    if (newValue != null) {
+                        if (newValue == FlightMode.MOTOR_START) {
+                            //刚起飞时，重置保存的状态
+                            PreferenceUtils.getInstance().setNeedTriggerAlterArucoLand(false);
+                            PreferenceUtils.getInstance().setNeedTriggerApronArucoLand(false);
+                            PreferenceUtils.getInstance().setTriggerToAlternatePoint(false);
+
+                        }
+                        Movement.getInstance().setPlaneMode(newValue.name());
+                        pushFlightAttitude();
+
+                        switch (newValue) {
+                            case TAKE_OFF_READY:
+                                //Movement.getInstance().setMode_code(2);
+                                break;
+                            case VIRTUAL_STICK:
+                                //Movement.getInstance().setMode_code(3);
+                                break;
+                            case AUTO_TAKE_OFF:
+                                //我觉得可能会重复设置
+                                //Movement.getInstance().setMode_code(4);
+                                break;
+                            case WAYPOINT:
+                                //Movement.getInstance().setMode_code(5);
+                                break;
+                            case PANO:
+                                Movement.getInstance().setMode_code(6);
+                                break;
+                            case FOLLOW_ME:
+                                Movement.getInstance().setMode_code(7);
+                                break;
+                            case AUTO_AVOIDANCE:
+                                Movement.getInstance().setMode_code(8);
+                                break;
+                            case GO_HOME:
+                                Movement.getInstance().setMode_code(9);
+                                break;
+                            case AUTO_LANDING:
+                                Movement.getInstance().setMode_code(10);
+                                //重置这个飞行状态
+                                Movement.getInstance().setFlightmode(0);
+                                break;
+                            case FORCE_LANDING:
+                                Movement.getInstance().setMode_code(11);
+                                break;
+                            case POI:
+                                Movement.getInstance().setMode_code(20);
+                                break;
+
+                        }
+                    }
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftAttitude), this, new CommonCallbacks.KeyListener<Attitude>() {
+                @Override
+                public void onValueChange(@Nullable Attitude attitude, @Nullable Attitude t1) {
+                    if (t1 != null) {
+                        double pitch = Math.round(t1.getPitch() * 10.0) / 10.0;
+                        double yaw = Math.round(t1.getYaw() * 10.0) / 10.0;
+                        double roll = Math.round(t1.getRoll() * 10.0) / 10.0;
+
+                        Movement.getInstance().setAttitude_pitch(pitch);
+                        Movement.getInstance().setAttitude_head(yaw);
+                        Movement.getInstance().setAttitude_roll(roll);
+
+
+                        Movement.getInstance().setTask_attitude_head(t1.getYaw());
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(AirLinkKey.KeyUpLinkQuality), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer oldValue, @Nullable Integer newValue) {
+                    if (newValue != null) {
+                        Movement.getInstance().setRemoteControlSignal(newValue);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(AirLinkKey.KeyDownLinkQuality), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer oldValue, @Nullable Integer newValue) {
+                    if (newValue != null) {
+                        Movement.getInstance().setPictureBiographySignal(newValue);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            GoHomeState goHomeState = KeyManager.getInstance().getValue(createKey(FlightControllerKey.KeyGoHomeStatus));
+            if (goHomeState != null) {
+                Movement.getInstance().setGoHomeState(goHomeState.value());
+            }
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyGoHomeStatus), this, new CommonCallbacks.KeyListener<GoHomeState>() {
+                @Override
+                public void onValueChange(@Nullable GoHomeState oldValue, @Nullable GoHomeState newValue) {
+                    if (newValue != null) {
+                        Movement.getInstance().setGoHomeState(newValue.value());
+                        LogUtil.log(TAG, "GoHomeStatus:" + newValue.name());
+                        goHomeExecutionState = newValue.value();
+                        //返航或降落中不允许恢复断点航线
+                        if (newValue.value() == 1 || newValue.value() == 2 || newValue.value() == 3) {
+                            Movement.getInstance().setCurrentWaypointIndex(0);
+                        }
+                        //返航后触发可入库条件
+                        if (newValue.value() == 2) {
+                            triggerLandOrGoHome = true;
+                            Movement.getInstance().setVirtualStickQuitMission(false);
+                        }
+                        pushFlightAttitude();
+                    }
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyUltrasonicHeight), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer oldValue, @Nullable Integer newValue) {
+                    if (newValue != null) {
+                        Movement.getInstance().setUltrasonicHeight(newValue);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            //总里程(单位m)
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftTotalFlightDistance), this, new CommonCallbacks.KeyListener<Double>() {
+                @Override
+                public void onValueChange(@Nullable Double aDouble, @Nullable Double t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setTotal_flight_distance(t1);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            //航迹 ID
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyTrackId), this, new CommonCallbacks.KeyListener<String>() {
+                @Override
+                public void onValueChange(@Nullable String s, @Nullable String t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setTrack_id(t1);
+                        Movement.getInstance().setTask_track_id(t1);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            //总航时
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftTotalFlightDuration), this, new CommonCallbacks.KeyListener<Double>() {
+                @Override
+                public void onValueChange(@Nullable Double aDouble, @Nullable Double t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setTotal_flight_time(t1);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            //总架次
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftTotalFlightTimes), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setTotal_flight_sorties(t1);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            //失联动作
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyFailsafeAction), this, new CommonCallbacks.KeyListener<FailsafeAction>() {
+                @Override
+                public void onValueChange(@Nullable FailsafeAction failsafeAction, @Nullable FailsafeAction t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setRc_lost_action(t1.value());
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            //返航高度
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyGoHomeHeight), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setRth_altitude(t1);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            //限高
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyHeightLimit), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setHeight_limit(t1);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            //是否接近限高
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyIsNearHeightLimit), this, new CommonCallbacks.KeyListener<Boolean>() {
+                @Override
+                public void onValueChange(@Nullable Boolean aBoolean, @Nullable Boolean t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setIs_near_height_limit(t1 ? 1 : 0);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            //是否接近设定的限制距离
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyIsNearDistanceLimit), this, new CommonCallbacks.KeyListener<Boolean>() {
+                @Override
+                public void onValueChange(@Nullable Boolean aBoolean, @Nullable Boolean t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setIs_near_distance_limit(t1 ? 1 : 0);
+                        Movement.getInstance().setIs_near_area_limit(t1 ? 1 : 0);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            //是否开启限远
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyDistanceLimitEnabled), this, new CommonCallbacks.KeyListener<Boolean>() {
+                @Override
+                public void onValueChange(@Nullable Boolean aBoolean, @Nullable Boolean t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setIs_near_distance_limit(t1 ? 1 : 0);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            //限远
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyDistanceLimit), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setDistance_limit(t1);
+                    }
+                    pushFlightAttitude();
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyLowBatteryWarningThreshold), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setLowBatteryWarningThreshold(t1);
+                        pushFlightAttitude();
+                    }
+                }
+            });
+
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeySeriousLowBatteryWarningThreshold), this, new CommonCallbacks.KeyListener<Integer>() {
+                @Override
+                public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setSeriousLowBatteryWarningThreshold(t1);
+                        pushFlightAttitude();
+                    }
+                }
+            });
+            KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyLowBatteryRTHEnabled), this, new CommonCallbacks.KeyListener<Boolean>() {
+                @Override
+                public void onValueChange(@Nullable Boolean aBoolean, @Nullable Boolean t1) {
+                    if (t1 != null) {
+                        Movement.getInstance().setLowBatteryRTHEnabled(t1 ? 1 : 0);
+                        pushFlightAttitude();
+                    }
+                }
+            });
         }
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyGoHomeStatus), this, new CommonCallbacks.KeyListener<GoHomeState>() {
-            @Override
-            public void onValueChange(@Nullable GoHomeState oldValue, @Nullable GoHomeState newValue) {
-                if (newValue != null) {
-                    Movement.getInstance().setGoHomeState(newValue.value());
-                    LogUtil.log(TAG, "GoHomeStatus:" + newValue.name());
-                    goHomeExecutionState = newValue.value();
-                    //返航或降落中不允许恢复断点航线
-                    if (newValue.value() == 1 || newValue.value() == 2 || newValue.value() == 3) {
-                        Movement.getInstance().setCurrentWaypointIndex(0);
-                    }
-                    //返航后触发可入库条件
-                    if (newValue.value() == 2) {
-                        triggerLandOrGoHome = true;
-                        Movement.getInstance().setVirtualStickQuitMission(false);
-                    }
-                    pushFlightAttitude();
-                }
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyUltrasonicHeight), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer oldValue, @Nullable Integer newValue) {
-                if (newValue != null) {
-                    Movement.getInstance().setUltrasonicHeight(newValue);
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        //总里程(单位m)
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftTotalFlightDistance), this, new CommonCallbacks.KeyListener<Double>() {
-            @Override
-            public void onValueChange(@Nullable Double aDouble, @Nullable Double t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setTotal_flight_distance(t1);
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        //航迹 ID
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyTrackId), this, new CommonCallbacks.KeyListener<String>() {
-            @Override
-            public void onValueChange(@Nullable String s, @Nullable String t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setTrack_id(t1);
-                    Movement.getInstance().setTask_track_id(t1);
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        //总航时
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftTotalFlightDuration), this, new CommonCallbacks.KeyListener<Double>() {
-            @Override
-            public void onValueChange(@Nullable Double aDouble, @Nullable Double t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setTotal_flight_time(t1);
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        //总架次
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyAircraftTotalFlightTimes), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setTotal_flight_sorties(t1);
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        //失联动作
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyFailsafeAction), this, new CommonCallbacks.KeyListener<FailsafeAction>() {
-            @Override
-            public void onValueChange(@Nullable FailsafeAction failsafeAction, @Nullable FailsafeAction t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setRc_lost_action(t1.value());
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        //返航高度
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyGoHomeHeight), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setRth_altitude(t1);
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        //限高
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyHeightLimit), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setHeight_limit(t1);
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        //是否接近限高
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyIsNearHeightLimit), this, new CommonCallbacks.KeyListener<Boolean>() {
-            @Override
-            public void onValueChange(@Nullable Boolean aBoolean, @Nullable Boolean t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setIs_near_height_limit(t1 ? 1 : 0);
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        //是否接近设定的限制距离
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyIsNearDistanceLimit), this, new CommonCallbacks.KeyListener<Boolean>() {
-            @Override
-            public void onValueChange(@Nullable Boolean aBoolean, @Nullable Boolean t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setIs_near_distance_limit(t1 ? 1 : 0);
-                    Movement.getInstance().setIs_near_area_limit(t1 ? 1 : 0);
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        //是否开启限远
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyDistanceLimitEnabled), this, new CommonCallbacks.KeyListener<Boolean>() {
-            @Override
-            public void onValueChange(@Nullable Boolean aBoolean, @Nullable Boolean t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setIs_near_distance_limit(t1 ? 1 : 0);
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        //限远
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyDistanceLimit), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setDistance_limit(t1);
-                }
-                pushFlightAttitude();
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyLowBatteryWarningThreshold), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setLowBatteryWarningThreshold(t1);
-                    pushFlightAttitude();
-                }
-            }
-        });
-
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeySeriousLowBatteryWarningThreshold), this, new CommonCallbacks.KeyListener<Integer>() {
-            @Override
-            public void onValueChange(@Nullable Integer integer, @Nullable Integer t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setSeriousLowBatteryWarningThreshold(t1);
-                    pushFlightAttitude();
-                }
-            }
-        });
-        KeyManager.getInstance().listen(createKey(FlightControllerKey.KeyLowBatteryRTHEnabled), this, new CommonCallbacks.KeyListener<Boolean>() {
-            @Override
-            public void onValueChange(@Nullable Boolean aBoolean, @Nullable Boolean t1) {
-                if (t1 != null) {
-                    Movement.getInstance().setLowBatteryRTHEnabled(t1 ? 1 : 0);
-                    pushFlightAttitude();
-                }
-            }
-        });
-    }
     }
 
     //标识是否降落后触发关舱门
@@ -813,7 +835,7 @@ public class FlightManager extends BaseManager {
 
     private void closeCabinDoor() {
         // 获取飞行状态和航线状态
-        boolean isFlyingAndHeightOk = isFlying && Movement.getInstance().getElevation() > 10 && Movement.getInstance().getElevation()>30;
+        boolean isFlyingAndHeightOk = isFlying && Movement.getInstance().getElevation() > 30;
         boolean isDebugMode = PreferenceUtils.getInstance().getIsDebugMode();
         String missionState = Movement.getInstance().getWaypointMissionExecuteState();
         boolean isMissionExecuting = (!TextUtils.isEmpty(missionState) &&
@@ -825,7 +847,9 @@ public class FlightManager extends BaseManager {
             sendCloseCabinDoorMsg = true;
             DockCloseManager.getInstance().sendDockCloseMsg2Server();
             PerceptionManager.getInstance().setPerceptionEnable(true);
-            PerceptionManager.getInstance().setObstacleAvoidanceHorizontalEnabled(true);
+            PerceptionManager.getInstance().setObstacleAvoidancedownEnabled(true);
+            PerceptionManager.getInstance().setObstacleAvoidanceupEnabled(true);
+            PerceptionManager.getInstance().closeRadarManager(true);
         }
     }
 
@@ -855,16 +879,147 @@ public class FlightManager extends BaseManager {
     //降落时将云台朝下
     private void gimbalDownwards() {
         if (goHomeExecutionState == GoHomeState.LANDING.value()
-                && Movement.getInstance().getElevation() > 11) {
-//            DroneHelper.getInstance().setGimbalPitchDegree();
-//            //将镜头设置为自动对焦
-//            DroneHelper.getInstance().setCameraFocusMode();
-//            isGimbalDownwards = true;
+                && Movement.getInstance().getElevation() > 11 && !isGimbalDownwards) {
+            DroneHelper.getInstance().setGimbalPitchDegree();
+            //将镜头设置为自动对焦
+            DroneHelper.getInstance().setCameraFocusMode();
+
+
+            new android.os.Handler().postDelayed(() -> {
+                setkuaim();
+            }, 500);
+            new android.os.Handler().postDelayed(() -> {
+                setCameraExposureMode();
+            }, 500);
+            //将镜头设置为自动对焦
+//            new android.os.Handler().postDelayed(() -> {
+//                setCameraExposureCompensation();
+////            }, 500);
+//            new android.os.Handler().postDelayed(() -> {
+//                setKeyShutterSpeed();
+//            }, 500);
+//            // 等0.5秒后再执行相机设置（给固件切换镜头留时间）
+//            new android.os.Handler().postDelayed(() -> {
+//                DroneHelper.getInstance().setCameraFocusMode();
+//            }, 500);
+
+
+            isGimbalDownwards = true;
             PerceptionManager.getInstance().setPerceptionEnable(false);
-            PerceptionManager.getInstance().setObstacleAvoidanceHorizontalEnabled(false);
-//            if (Movement.getInstance().getIsRecording() == 1) {
-//                CameraManager.getInstance().stopRecordVideo(null);
-//            }
+            PerceptionManager.getInstance().setObstacleAvoidanceupEnabled(false);
+            PerceptionManager.getInstance().setObstacleAvoidancedownEnabled(false);
+            PerceptionManager.getInstance().closeRadarManager(false);
+            if (Movement.getInstance().getIsRecording() == 1) {
+                CameraManager.getInstance().stopRecordVideo(null);
+            }
+        }
+    }
+
+
+    private void setkuaim() {
+        Boolean isConnect = KeyManager.getInstance().getValue(KeyTools.createKey(CameraKey.
+                KeyConnection, ComponentIndexType.PORT_1));
+        if (isConnect != null && isConnect) {
+            //切换成广角镜头
+            KeyManager.getInstance().setValue(KeyTools.createKey(CameraKey.KeyCameraVideoStreamSource,
+                    ComponentIndexType.PORT_1), CameraVideoStreamSourceType.WIDE_CAMERA, new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    LogUtil.log(TAG, "返航时将镜头切为广角");
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError error) {
+                    LogUtil.log(TAG, "返航切换广角失败：" + new Gson().toJson(error));
+                }
+            });
+
+        } else {
+            LogUtil.log(TAG, "降落切换广角失败：当前状态相机禁止操作");
+        }
+    }
+
+    public void setKeyShutterSpeed() {
+        Boolean cameraConnect = KeyManager.getInstance().getValue(KeyTools.createKey(CameraKey.
+                KeyConnection, ComponentIndexType.PORT_1));
+        if (cameraConnect != null && cameraConnect) {
+            KeyManager.getInstance().setValue(KeyTools.createKey(CameraKey.KeyShutterSpeed, ComponentIndexType.PORT_1), CameraShutterSpeed.SHUTTER_SPEED1_8000, new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    LogUtil.log(TAG, "设置快门速度成功");
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError idjiError) {
+                    LogUtil.log(TAG, "设置快门速度失败" + idjiError.toString());
+                }
+            });
+        } else {
+            LogUtil.log(TAG, "相机未连接");
+        }
+    }
+    //
+
+    //曝光-1
+    private void setCameraExposureCompensation() {
+        Boolean cameraConnect = KeyManager.getInstance().getValue(KeyTools.createKey(CameraKey.
+                KeyConnection, ComponentIndexType.PORT_1));
+        if (cameraConnect != null && cameraConnect) {
+            KeyManager.getInstance().setValue(KeyTools.createKey(CameraKey.KeyExposureCompensation, ComponentIndexType.PORT_1), CameraExposureCompensation.NEG_0EV, new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    LogUtil.log(TAG, "设置曝光-1成功");
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError idjiError) {
+                    LogUtil.log(TAG, "设置曝光-1失败" + idjiError.toString());
+                }
+            });
+        } else {
+            LogUtil.log(TAG, "相机未连接");
+        }
+    }
+
+    //快门优先
+    private void setCameraExposureMode() {
+        Boolean cameraConnect = KeyManager.getInstance().getValue(KeyTools.createKey(CameraKey.
+                KeyConnection, ComponentIndexType.PORT_1));
+        if (cameraConnect != null && cameraConnect) {
+            KeyManager.getInstance().setValue(KeyTools.createKey(CameraKey.KeyExposureMode, ComponentIndexType.PORT_1), CameraExposureMode.PROGRAM, new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    LogUtil.log(TAG, "快门优先曝光成功");
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError idjiError) {
+                    LogUtil.log(TAG, "快门优先曝光失败" + idjiError.toString());
+                }
+            });
+        } else {
+            LogUtil.log(TAG, "相机未连接");
+        }
+    }
+
+    //设置成
+    public void setCameraExposureModePROGRAM() {
+        Boolean cameraConnect = KeyManager.getInstance().getValue(KeyTools.createKey(CameraKey.
+                KeyConnection, ComponentIndexType.PORT_1));
+        if (cameraConnect != null && cameraConnect) {
+            KeyManager.getInstance().setValue(KeyTools.createKey(CameraKey.KeyExposureMode, ComponentIndexType.PORT_1), CameraExposureMode.PROGRAM, new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    LogUtil.log(TAG, "自动曝光成功");
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError idjiError) {
+                    LogUtil.log(TAG, "自动曝光失败" + idjiError.toString());
+                }
+            });
+        } else {
+            LogUtil.log(TAG, "相机未连接");
         }
     }
 
@@ -895,7 +1050,7 @@ public class FlightManager extends BaseManager {
     }
 
 
-    private static final double FLYING_HEIGHT_THRESHOLD_MAX = 15;
+    private static final double FLYING_HEIGHT_THRESHOLD_MAX = 20;
     private static final double FLYING_HEIGHT_THRESHOLD_MAX_ALTERNATE = 10;
     private static final double FLYING_HEIGHT_THRESHOLD_MIN = -2;
     private static final double FLYING_HEIGHT_THRESHOLD_MIN_ALTERNATE = 2.0;
@@ -907,8 +1062,10 @@ public class FlightManager extends BaseManager {
         boolean needTriggerApronArucoLand = PreferenceUtils.getInstance().getNeedTriggerApronArucoLand();
         boolean needTriggerAlterArucoLand = PreferenceUtils.getInstance().getNeedTriggerAlterArucoLand();
         double thresholdMax = triggerToAlternatePoint ? FLYING_HEIGHT_THRESHOLD_MAX_ALTERNATE : FLYING_HEIGHT_THRESHOLD_MAX;
+        LogUtil.log(TAG,"相对高度"+Movement.getInstance().getElevation()+"超声波高度"+Movement.getInstance().getUltrasonicHeight());
 
-        if (isFlying && (Movement.getInstance().getElevation() < thresholdMax && Movement.getInstance().getUltrasonicHeight()<50)&& !isSendDetect) {
+
+        if (isFlying && (Movement.getInstance().getElevation() < 13 && Movement.getInstance().getUltrasonicHeight() < 50) && !isSendDetect) {
             double flyingHeight = Movement.getInstance().getElevation();
             double thresholdMin = triggerToAlternatePoint ? FLYING_HEIGHT_THRESHOLD_MIN_ALTERNATE : FLYING_HEIGHT_THRESHOLD_MIN;
 
@@ -920,7 +1077,6 @@ public class FlightManager extends BaseManager {
                 } else {
                     shouldTriggerDetection = goHomeExecutionState == 2 || needTriggerApronArucoLand || needTriggerAlterArucoLand;
                 }
-
                 if (shouldTriggerDetection) {
                     triggerArucoDetection();
                 }
@@ -975,18 +1131,41 @@ public class FlightManager extends BaseManager {
         }
     }
 
+    //    public void stopArucoDetectAndLanding(int i) {
+//        logLandingHeight(i);
+//        DroneHelper.getInstance().exitVirtualStickMode();
+//        EventBus.getDefault().post(FLAG_DOWN_LAND);
+//        PreferenceUtils.getInstance().setNeedTriggerApronArucoLand(false);
+//        PreferenceUtils.getInstance().setNeedTriggerAlterArucoLand(false);
+//        PreferenceUtils.getInstance().setTriggerToAlternatePoint(false);
+//        isGimbalReset = false;
+//        isTriggerLanding = true;
+//        isGimbalDownwards = false;
+//    }
+    // FlightManager.java
     public void stopArucoDetectAndLanding(int i) {
         logLandingHeight(i);
-        DroneHelper.getInstance().exitVirtualStickMode();
-        EventBus.getDefault().post(FLAG_DOWN_LAND);
-        PreferenceUtils.getInstance().setNeedTriggerApronArucoLand(false);
-        PreferenceUtils.getInstance().setNeedTriggerAlterArucoLand(false);
-        PreferenceUtils.getInstance().setTriggerToAlternatePoint(false);
-        isGimbalReset = false;
-        isTriggerLanding = true;
-        isGimbalDownwards = false;
-    }
+        DroneHelper.getInstance().exitVirtualStickMode(new CommonCallbacks.CompletionCallback() {
+            @Override
+            public void onSuccess() {
+                // 只有释放控制权成功后，才发送降落事件
+                EventBus.getDefault().post(FLAG_DOWN_LAND);
+                PreferenceUtils.getInstance().setNeedTriggerApronArucoLand(false);
+                PreferenceUtils.getInstance().setNeedTriggerAlterArucoLand(false);
+                PreferenceUtils.getInstance().setTriggerToAlternatePoint(false);
+                isGimbalReset = false;
+                isTriggerLanding = true;
+                isGimbalDownwards = false;
+            }
 
+            @Override
+            public void onFailure(@NonNull IDJIError error) {
+                // 释放控制权失败时的处理
+                LogUtil.log(TAG, "释放控制权失败，无法执行自动降落: " + error.toString());
+                // 可以添加重试逻辑或其他错误处理
+            }
+        });
+    }
 
     /**
      * 打印这里的条件，判断是否满足降落停浆
@@ -998,15 +1177,15 @@ public class FlightManager extends BaseManager {
         if (PreferenceUtils.getInstance().getNeedTriggerAlterArucoLand()) {
             return !isTriggerLanding && (isFlying || isMotorsOn) && AlternateArucoDetect.getInstance().isCanLanding();
         } else {
-            return !isTriggerLanding && (isFlying || isMotorsOn) && (
-                    ApronArucoDetect.getInstance().isCanLanding() || (ApronArucoDetect.getInstance().isStartFastStick()
-                            && ApronArucoDetect.getInstance().getCheckThrowingErrorsTimes() > 100));
+            return !isTriggerLanding && (isFlying || isMotorsOn) && (ApronArucoDetect.getInstance().isCanLanding() || ApronArucoDetectPort.getInstance().isCanLanding());
         }
     }
+
     private void logLandingHeight(int i) {
         LogUtil.log(TAG, "降落高度" + Movement.getInstance().getElevation() + "米---"
                 + Movement.getInstance().getUltrasonicHeight() + "分米");
     }
+
     private void droneStorage() {
         boolean isDebugMode = PreferenceUtils.getInstance().getIsDebugMode();
         // 检查无人机是否满足降落和入库的条件
@@ -1018,20 +1197,45 @@ public class FlightManager extends BaseManager {
             isTriggerLanding = false;
             sendCloseCabinDoorMsg = false;
             ApronArucoDetect.getInstance().setCanLanding(false);
+            ApronArucoDetectPort.getInstance().setCanLanding(false);
             // 发布事件，通知其他组件停止Aruco检测
             EventBus.getDefault().post(FLAG_STOP_ARUCO);
+
+            //setCameraExposureModePROGRAM();
+
+
+            if (Movement.getInstance().isIstakeoffex() == true && !Objects.equals(Movement.getInstance().getTakeoff_status(), "wayline_cancel")) {
+                Movement.getInstance().setTakeoff_status("task_finish");
+                new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                    @Override
+                    public void run() {
+                        TakeoffProgressScheduler.getInstance().sendProgressReport();
+                    }
+                }, 1000);
+                sendEvent2Server("一键起飞已发送task_finish", 1);
+            } else if (Movement.getInstance().isIstakeoffex() == true && Objects.equals(Movement.getInstance().getTakeoff_status(), "wayline_cancel")) {
+                Movement.getInstance().setTakeoff_status("wayline_failed");
+                new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
+                    @Override
+                    public void run() {
+                        TakeoffProgressScheduler.getInstance().sendProgressReport();
+                    }
+                }, 1000);
+            }
+
+
             //调试模式下不上传媒体文件 不入库
             if (!isDebugMode) {
                 //这里可能也会触发备降点关舱门的逻辑
                 if (!PreferenceUtils.getInstance().getNeedTriggerAlterArucoLand()) {
-                    LogUtil.log(TAG,"");
+                    LogUtil.log(TAG, "");
                     // 发送无人机入库消息到服务器********************待修改************************
                     ApronExecutionStatus.getInstance().setAircraftWaitShutDown(false);
                     DockStorageManager.getInstance().sendDockStorageMsg2Server();
                 }
                 // 上传媒体文件
                 SystemManager.getInstance().upLoadMedia(MqttManager.getInstance().mqttAndroidClient);
-                sendEvent2Server("开始上传日志文件",1);
+                sendEvent2Server("开始上传日志文件", 1);
                 //上传日志文件
                 LogUploadManager.getInstance().uploadTodayLog();
             }
@@ -1046,16 +1250,10 @@ public class FlightManager extends BaseManager {
             //Movement.getInstance().setMissionFinish(true);
             // }, 1000);
             //原有那个替换
-            Movement.getInstance().setMissionFinish1(true);
-
-            //再发送一遍这个一键起飞事件的结果
-            if(Movement.getInstance().isIstakeoffex()==true){
-                Movement.getInstance().setTakeoff_status("task_finish");
-                TakeoffProgressScheduler.getInstance().sendProgressReport();
+            if(Movement.getInstance().getMission_type()==0){
+                Movement.getInstance().setMissionFinish1(true);
             }
 
-
-
             Movement.getInstance().setTask_current_step(25);
             sendOpenCabinDoorMsg = false;
         }
@@ -1073,21 +1271,19 @@ public class FlightManager extends BaseManager {
             WayLineExecutingInterruptManager.getInstance().onExecutingInterruptToDo();
         } else {
             Boolean isConnect = KeyManager.getInstance().getValue(createKey(FlightControllerKey.KeyConnection));
-            if (isConnect != null && isConnect) {
-                KeyManager.getInstance().performAction(createKey(FlightControllerKey.KeyStartGoHome), new CommonCallbacks.CompletionCallbackWithParam<EmptyMsg>() {
-                    @Override
-                    public void onSuccess(EmptyMsg emptyMsg) {
-                        sendMsg2Server(message);
-                    }
 
-                    @Override
-                    public void onFailure(@NonNull IDJIError error) {
-                        sendFailMsg2Server(message, "返航执行失败:" + getIDJIErrorMsg(error));
-                    }
-                });
-            } else {
-                sendFailMsg2Server(message, "返航执行失败:飞控未连接");
-            }
+            KeyManager.getInstance().performAction(createKey(FlightControllerKey.KeyStartGoHome), new CommonCallbacks.CompletionCallbackWithParam<EmptyMsg>() {
+                @Override
+                public void onSuccess(EmptyMsg emptyMsg) {
+                    sendMsg2Server(message);
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError error) {
+                    sendFailMsg2Server(message, "返航执行失败:" + getIDJIErrorMsg(error));
+                }
+            });
+
         }
 
     }
@@ -1295,6 +1491,7 @@ public class FlightManager extends BaseManager {
                 Movement.getInstance().setMode_code(3);
                 OSDManager.getInstance().pushFlightAttitude();
             }
+
             @Override
             public void onFailure(@NonNull IDJIError error) {
                 sendFailMsg2Server(message, "紧急悬停获得控制权失败" + getIDJIErrorMsg(error));
diff --git a/app/src/main/java/com/aros/apron/manager/FlightTaskProgressManager.java b/app/src/main/java/com/aros/apron/manager/FlightTaskProgressManager.java
index ea95e338..c34166db 100644
--- a/app/src/main/java/com/aros/apron/manager/FlightTaskProgressManager.java
+++ b/app/src/main/java/com/aros/apron/manager/FlightTaskProgressManager.java
@@ -34,7 +34,6 @@ public class FlightTaskProgressManager extends BaseManager {
             if (Movement.getInstance().getMission_type()==0&&(Movement.getInstance().isPlaneWing()
                     || Movement.getInstance().isMotorsOn()
                     || Movement.getInstance().isMissionFinish1())) {
-
                 sendFlightTaskProgress2Server();
 
             }
@@ -53,6 +52,7 @@ public class FlightTaskProgressManager extends BaseManager {
     };
 
     private FlightTaskProgressManager() {
+
     }
 
     public static FlightTaskProgressManager getInstance() {
diff --git a/app/src/main/java/com/aros/apron/manager/GimbalManager.java b/app/src/main/java/com/aros/apron/manager/GimbalManager.java
index b32b70f1..b857d0da 100644
--- a/app/src/main/java/com/aros/apron/manager/GimbalManager.java
+++ b/app/src/main/java/com/aros/apron/manager/GimbalManager.java
@@ -12,6 +12,7 @@ import com.aros.apron.base.BaseManager;
 import com.aros.apron.entity.MessageDown;
 import com.aros.apron.entity.Movement;
 import com.aros.apron.tools.ApronArucoDetect;
+import com.aros.apron.tools.ApronArucoDetectPort;
 import com.aros.apron.tools.LogUtil;
 import com.aros.apron.tools.PreferenceUtils;
 import com.google.gson.Gson;
@@ -57,6 +58,7 @@ public class GimbalManager extends BaseManager {
 
     public void initGimbalInfo() {
         ApronArucoDetect.getInstance().setDoublePayload(PreferenceUtils.getInstance().getCameraLocationType() == 2);
+        ApronArucoDetectPort.getInstance().setDoublePayload(PreferenceUtils.getInstance().getCameraLocationType() == 2);
         LogUtil.log(TAG, "主摄像头位置:" + PreferenceUtils.getInstance().getCameraLocationType());
         Boolean isConnect = KeyManager.getInstance().getValue(KeyTools.createKey(FlightControllerKey.KeyConnection));
 
@@ -65,9 +67,14 @@ public class GimbalManager extends BaseManager {
                 @Override
                 public void onValueChange(@Nullable Attitude oldValue, @Nullable Attitude newValue) {
                     if (newValue != null) {
-                        Movement.getInstance().setGimbal_pitch(newValue.getPitch().intValue());
-                        Movement.getInstance().setGimbal_roll(newValue.getRoll().intValue());
-                        Movement.getInstance().setGimbal_yaw(newValue.getYaw().intValue());
+                        // 保留2位小数
+                        double pitch = Math.round(newValue.getPitch().doubleValue() * 10.0) / 10.0;
+                        double roll = Math.round(newValue.getRoll().doubleValue() * 10.0) / 10.0;
+                        double yaw = Math.round(newValue.getYaw().doubleValue() * 10.0) / 10.0;
+
+                        Movement.getInstance().setGimbal_pitch(pitch);
+                        Movement.getInstance().setGimbal_roll(roll);
+                        Movement.getInstance().setGimbal_yaw(yaw);
                     }
                 }
             });
diff --git a/app/src/main/java/com/aros/apron/manager/MediaManager.java b/app/src/main/java/com/aros/apron/manager/MediaManager.java
index d9ee1849..489fa33f 100644
--- a/app/src/main/java/com/aros/apron/manager/MediaManager.java
+++ b/app/src/main/java/com/aros/apron/manager/MediaManager.java
@@ -32,7 +32,9 @@ import java.io.IOException;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import dji.sdk.keyvalue.key.FlightControllerKey;
 import dji.sdk.keyvalue.key.KeyTools;
@@ -63,6 +65,8 @@ public class MediaManager extends BaseManager {
     private MediaFileListState mState = null;
     private List<MediaFile> mediaFiles = new ArrayList<>();
 
+    /* ===== 已上传文件名集合（本次任务内有效） ===== */
+    private final Set<String> uploadedFileNames = new HashSet<>();
     private MediaManager() {
     }
 
@@ -93,102 +97,167 @@ public class MediaManager extends BaseManager {
     private boolean isEnablePlayback;
 
     public void enablePlayback() {
-       MediaDataCenter.getInstance().getMediaManager().enable(new CommonCallbacks.CompletionCallback() {
-           @Override
-           public void onSuccess() {
-               LogUtil.log(TAG, "进入媒体模式成功");
-               new Handler().postDelayed(new Runnable() {
-                   @Override
-                   public void run() {
-                       pullMediaFileListFromCamera();
-                       isEnablePlayback=true;
-                   }
-               },1000);
-           }
-
-           @Override
-           public void onFailure(@NonNull IDJIError idjiError) {
-               LogUtil.log(TAG, "第"+enterPlayBackFailTimes+"次进入媒体模式失败:"+new Gson().toJson(idjiError));
-               if (!isEnablePlayback){
-                   new Handler().postDelayed(new Runnable() {
-                       @Override
-                       public void run() {
-                           if (enterPlayBackFailTimes < 10) {
-                               enterPlayBackFailTimes++;
-                               enablePlayback();
-                           }else{
-                               ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
-                               sendEvent2Server( "媒体模式进入失败:关机",2);
-                           }
-                       }
-                   }, 1500);
-               }
-           }
-       });
-    }
-
-    private int pullMediaFileListFromCameraFailTimes;
-    private boolean isPullMediaFileListFromCameraSuccess;
-
-    private void pullMediaFileListFromCamera(){
-        MediaDataCenter.getInstance().getMediaManager().pullMediaFileListFromCamera(new PullMediaFileListParam.Builder().count(-1).build(), new CommonCallbacks.CompletionCallback() {
+        MediaDataCenter.getInstance().getMediaManager().enable(new CommonCallbacks.CompletionCallback() {
+            @Override
+            public void onSuccess() {
+                LogUtil.log(TAG, "进入媒体模式成功");
+                new Handler().postDelayed(new Runnable() {
                     @Override
-                    public void onSuccess() {
-                        isPullMediaFileListFromCameraSuccess=true;
+                    public void run() {
+                        MediaFileListDataSource source = new MediaFileListDataSource.Builder().setIndexType(ComponentIndexType.PORT_1).build();
+                        // MediaDataCenter.getInstance().getMediaManager().setMediaFileDataSource(source);
+
                         new Handler().postDelayed(new Runnable() {
                             @Override
                             public void run() {
-                                if (mState == MediaFileListState.UP_TO_DATE) {
-                                    mediaFiles =
-                                            MediaDataCenter.getInstance().getMediaManager().getMediaFileListData().getData();
-                                    //倒是看会不会上传
-                                    Movement.getInstance().setTask_media_count(mediaFiles.size());
-
-                                    if (mediaFiles != null&&mediaFiles.size()>0) {
-                                        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
-                                            pullOriginalMediaFileFromCamera();
-                                        }
-                                    } else {
-                                        ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
-                                        sendEvent2Server("拉取媒体文件为空,可关机",2);
-                                        disablePlayback();
-                                    }
-                                } else {
-                                    ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
-                                    sendEvent2Server("拉取媒体文件失败,可关机:"+mState,2);
-                                    disablePlayback();
-                                }
+                                pullMediaFileListFromCamera();
+                                isEnablePlayback = true;
                             }
-                        },1000);
+                        }, 3000);
+                        isEnablePlayback = true;
                     }
+                }, 3000);
+            }
 
-                    @Override
-                    public void onFailure(@NonNull IDJIError idjiError) {
-                        LogUtil.log(TAG, "第"+pullMediaFileListFromCameraFailTimes+"拉取媒体文件失败:"+new Gson().toJson(idjiError));
-
-                        if (!isPullMediaFileListFromCameraSuccess){
-                            new Handler().postDelayed(new Runnable() {
-                                @Override
-                                public void run() {
-                                    if (pullMediaFileListFromCameraFailTimes < 10) {
-                                        pullMediaFileListFromCameraFailTimes++;
-                                        pullMediaFileListFromCamera();
-                                    }else{
-                                        LogUtil.log(TAG, "拉取媒体文件失败:" + new Gson().toJson(idjiError));
-                                        ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
-                                        sendEvent2Server("拉取媒体文件失败",2);
-                                        disablePlayback();
-                                        LogUtil.log(TAG, "发送关闭无人机");
-                                    }
-                                }
-                            }, 1500);
+            @Override
+            public void onFailure(@NonNull IDJIError idjiError) {
+                LogUtil.log(TAG, "第" + enterPlayBackFailTimes + "次进入媒体模式失败:" + new Gson().toJson(idjiError));
+                if (!isEnablePlayback) {
+                    new Handler().postDelayed(new Runnable() {
+                        @Override
+                        public void run() {
+                            if (enterPlayBackFailTimes < 10) {
+                                enterPlayBackFailTimes++;
+                                enablePlayback();
+                            } else {
+                                ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
+                                sendEvent2Server("媒体模式进入失败:关机",1);
+                            }
                         }
+                    }, 1500);
+                }
+            }
+        });
+    }
+
+    private int pullMediaFileListFromCameraFailTimes;
+
+    private int updatingWaitCount = 0;
+    private static final int MAX_UPDATING_WAIT = 60; // 最多等待30秒
+    private boolean pullqwq = false;
+    private boolean isPullMediaFileListFromCameraSuccess;
+
+    private void pullMediaFileListFromCamera() {
+        mState = MediaDataCenter.getInstance().getMediaManager().getMediaFileListState();
+        LogUtil.log(TAG, "当前状态：" + mState + "，准备拉取文件列表");
+
+        // 1. 当状态为IDLE时，需要调用pullMediaFileListFromCamera拉取全量数据
+        // 2. 当状态为UP_TO_DATE时，表示拉取完成，可以获取数据
+        if (mState == MediaFileListState.IDLE) {
+            // 状态为IDLE，开始拉取文件列表
+            LogUtil.log(TAG, "状态为IDLE，开始拉取文件列表");
+            MediaDataCenter.getInstance().getMediaManager().pullMediaFileListFromCamera(new PullMediaFileListParam.Builder().count(-1).build(), new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    LogUtil.log(TAG, "拉取文件列表成功");
+                    // 拉取成功后，等待状态变为UP_TO_DATE
+                    new Handler().postDelayed(MediaManager.this::pullMediaFileListFromCamera, 1000);
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError idjiError) {
+                    LogUtil.log(TAG, "拉取媒体文件失败: " + new Gson().toJson(idjiError));
+                    // 失败后重试，最多重试3次
+                    if (pullMediaFileListFromCameraFailTimes < 5) {
+                        pullMediaFileListFromCameraFailTimes++;
+                        LogUtil.log(TAG, "第" + pullMediaFileListFromCameraFailTimes + "次重试...");
+                        new Handler().postDelayed(MediaManager.this::pullMediaFileListFromCamera, 2000);
+                    } else {
+                        LogUtil.log(TAG, "重试次数达到上限，拉取失败");
+                        ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
+                        sendEvent2Server("拉取媒体文件失败",2);
+                        disablePlayback();
+                        LogUtil.log(TAG, "发送关闭无人机");
+                    }
+                }
+            });
+        } else if (mState == MediaFileListState.UP_TO_DATE) {
+            // 状态为UP_TO_DATE，获取文件列表数据
+            LogUtil.log(TAG, "状态为UP_TO_DATE，获取文件列表数据");
+            try {
+                List<MediaFile> rawList = MediaDataCenter.getInstance().getMediaManager().getMediaFileListData().getData();
+                // 过滤已上传文件
+                mediaFiles = new ArrayList<>();
+                Movement.getInstance().setTask_media_count(mediaFiles.size());
+                for (MediaFile mf : rawList) {
+                    if (!uploadedFileNames.contains(mf.getFileName())) {
+                        mediaFiles.add(mf);
+                    } else {
+                        LogUtil.log(TAG, "跳过已上传文件: " + mf.getFileName());
                     }
                 }
 
-        );
+                if (mediaFiles.isEmpty()) {
+                    LogUtil.log(TAG, "所有文件均已上传，直接清理");
+                    downLoadMediaFileIndex = 0;
+                    removeAllFiles();
+                    return;
+                }
+
+                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+                    pullOriginalMediaFileFromCamera();
+                }
+            } catch (Exception e) {
+                LogUtil.log(TAG, "获取文件列表数据失败: " + e.getMessage());
+                // 发生异常时重试
+                if (pullMediaFileListFromCameraFailTimes < 5) {
+                    pullMediaFileListFromCameraFailTimes++;
+                    LogUtil.log(TAG, "第" + pullMediaFileListFromCameraFailTimes + "次重试...");
+                    new Handler().postDelayed(MediaManager.this::pullMediaFileListFromCamera, 2000);
+                } else {
+                    LogUtil.log(TAG, "重试次数达到上限，拉取失败");
+                    ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
+                    sendEvent2Server("拉取媒体文件失败",2);
+                    disablePlayback();
+                    LogUtil.log(TAG, "发送关闭无人机");
+                }
+            }
+        } else {
+            // 其他状态（如UPDATING），等待状态变化
+            LogUtil.log(TAG, "状态为" + mState + "，等待状态变化...");
+            updatingWaitCount++;
+
+            // 增加超时处理，避免无限等待
+            if (updatingWaitCount >= MAX_UPDATING_WAIT) {
+                LogUtil.log(TAG, "等待状态变化超时，强制关机");
+                ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
+                sendEvent2Server("媒体文件状态更新超时",2);
+                disablePlayback();
+                LogUtil.log(TAG, "发送关闭无人机");
+                return;
+            } else {
+                if (pullqwq == false) {
+                    MediaDataCenter.getInstance().getMediaManager().pullMediaFileListFromCamera(new PullMediaFileListParam.Builder().count(-1).build(), new CommonCallbacks.CompletionCallback() {
+                        @Override
+                        public void onSuccess() {
+                            LogUtil.log(TAG,"拉取成功");
+                        }
+
+                        @Override
+                        public void onFailure(@NonNull IDJIError idjiError) {
+                            LogUtil.log(TAG,"拉取失败");
+                        }
+                    });
+                    pullqwq = true;
+                }
+            }
+
+
+            new Handler().postDelayed(MediaManager.this::pullMediaFileListFromCamera, 1000);
+        }
     }
 
+
     @RequiresApi(Build.VERSION_CODES.O)
     public void pullOriginalMediaFileFromCamera() {
         final MediaFile mediaFile = mediaFiles.get(downLoadMediaFileIndex);
@@ -223,10 +292,14 @@ public class MediaManager extends BaseManager {
             offset = file.length();
         }
 
+        FileOutputStream outputStream = null;
+        BufferedOutputStream bos = null;
         try {
-            FileOutputStream outputStream = new FileOutputStream(file, true);
+            final FileOutputStream finalOutputStream = new FileOutputStream(file, true);
+            outputStream = finalOutputStream;
             long beginTime = System.currentTimeMillis();
-            BufferedOutputStream bos = new BufferedOutputStream(outputStream);
+            final BufferedOutputStream finalBos = new BufferedOutputStream(finalOutputStream);
+            bos = finalBos;
 
             mediaFile.pullOriginalMediaFileFromCamera(0L, new MediaFileDownloadListener() {
                 @Override
@@ -243,8 +316,8 @@ public class MediaManager extends BaseManager {
                 @Override
                 public void onRealtimeDataUpdate(byte[] data, long position) {
                     try {
-                        bos.write(data);
-                        bos.flush();
+                        finalBos.write(data);
+                        finalBos.flush();
                     } catch (IOException e) {
                         Log.e(TAG, "Write error: " + e.getMessage());
                     }
@@ -252,28 +325,55 @@ public class MediaManager extends BaseManager {
 
                 @Override
                 public void onFinish() {
-                    LogUtil.log(TAG, "File:" + downLoadMediaFileIndex+"fileName:"+mediaFile.getFileName() + " downloaded successfully.");
-                        minIOUpLoad(file, mediaFile);
+                    LogUtil.log(TAG, "File:" + downLoadMediaFileIndex + "fileName:" + mediaFile.getFileName() + " downloaded successfully.");
+                    minIOUpLoad(file, mediaFile);
                     try {
-                        outputStream.close();
-                        bos.close();
+                        if (finalBos != null) finalBos.close();
+                        if (finalOutputStream != null) finalOutputStream.close();
                     } catch (IOException error) {
                         LogUtil.log(TAG, "File " + downLoadMediaFileIndex + " error: " + error.getMessage());
                         ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
+                        sendEvent2Server("文件流关闭失败",2);
+                        disablePlayback();
+                        LogUtil.log(TAG, "发送关闭无人机");
                     }
                 }
 
                 @Override
                 public void onFailure(IDJIError error) {
                     LogUtil.log(TAG, "File " + downLoadMediaFileIndex + ": " + mediaFile.getFileName() + " download failed: " + new Gson().toJson(error));
+                    // 清理临时文件
+                    if (file.exists()) {
+                        file.delete();
+                    }
+                    // 关闭文件流
+                    try {
+                        if (finalBos != null) finalBos.close();
+                        if (finalOutputStream != null) finalOutputStream.close();
+                    } catch (IOException e) {
+                        Log.e(TAG, "Error closing file: " + e.getMessage());
+                    }
                     ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
-                    sendEvent2Server( "第" + downLoadMediaFileIndex + "个文件下载失败",2);
-                    downLoadMediaFileIndex = 0;
+                    sendEvent2Server("第" + downLoadMediaFileIndex + "个文件下载失败",2);
+                    disablePlayback();
+                    LogUtil.log(TAG, "发送关闭无人机");
                 }
             });
 
         } catch (IOException e) {
             Log.e(TAG, "Error opening file: " + e.getMessage());
+            // 发生异常时也要确保关机
+            ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
+            sendEvent2Server("文件打开失败",2);
+            disablePlayback();
+            LogUtil.log(TAG, "发送关闭无人机");
+            // 关闭文件流
+            try {
+                if (bos != null) bos.close();
+                if (outputStream != null) outputStream.close();
+            } catch (IOException ex) {
+                Log.e(TAG, "Error closing file: " + ex.getMessage());
+            }
         }
     }
 
@@ -371,6 +471,7 @@ public class MediaManager extends BaseManager {
                     @Override
                     public void onError(Throwable e) {
                         // 每上传失败一张就清除缓存
+                        uploadedFileNames.add(mediaFile.getFileName());
                         FileUtil.deleteFile(file);
                         LogUtil.log(TAG, "Error uploading file " + downLoadMediaFileIndex + ": " + e.getMessage());
 
@@ -406,18 +507,32 @@ public class MediaManager extends BaseManager {
     }
 
     public void removeAllFiles() {
+        // 确保即使没有文件也能正常关机
+        if (mediaFiles == null || mediaFiles.isEmpty()) {
+            LogUtil.log(TAG, "没有文件需要清除，直接关机");
+            ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
+            sendEvent2Server("没有媒体文件需要清除",1);
+            disablePlayback();
+            LogUtil.log(TAG, "发送关闭无人机");
+            return;
+        }
+
         MediaDataCenter.getInstance().getMediaManager().deleteMediaFiles(mediaFiles, new CommonCallbacks.CompletionCallback() {
             @Override
             public void onSuccess() {
                 ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
+                LogUtil.log(TAG, "清除文件成功 ");
                 sendEvent2Server("媒体文件已清除",1);
                 disablePlayback();
+                LogUtil.log(TAG, "发送关闭无人机");
             }
 
             @Override
             public void onFailure(@NonNull IDJIError idjiError) {
                 ApronExecutionStatus.getInstance().setAircraftWaitShutDown(true);
-                sendEvent2Server( "媒体文件清除失败",1);
+                LogUtil.log(TAG, "清除文件失败: " + new Gson().toJson(idjiError));
+                sendEvent2Server("媒体文件清除失败",2);
+                LogUtil.log(TAG, "发送关闭无人机");
             }
         });
     }
@@ -440,11 +555,11 @@ public class MediaManager extends BaseManager {
     private int downLoadMediaFileIndex = 0;
 
     private String getSDCardPath(){
-         if (checkSDCard()) {
-           return Environment.getExternalStorageDirectory()
+        if (checkSDCard()) {
+            return Environment.getExternalStorageDirectory()
                     .getPath();
         } else {
-           return Environment.getExternalStorageDirectory()
+            return Environment.getExternalStorageDirectory()
                     .getParentFile().getPath();
         }
     }
diff --git a/app/src/main/java/com/aros/apron/manager/MissionV3Manager.java b/app/src/main/java/com/aros/apron/manager/MissionV3Manager.java
index e83a3ddf..8a2e549f 100644
--- a/app/src/main/java/com/aros/apron/manager/MissionV3Manager.java
+++ b/app/src/main/java/com/aros/apron/manager/MissionV3Manager.java
@@ -154,9 +154,8 @@ public class MissionV3Manager extends BaseManager {
                                 sendEvent2Server("任务状态:此机型不支持航线任务3.0", 1);
                                 Movement.getInstance().setTask_status("rejected");
 
-                                Movement.getInstance().setMissionFinish(false);
                                 //这个是原来可控制那个发送最终状态的逻辑
-                                Movement.getInstance().setMissionFinish1(false);
+
 
 
                                 break;
@@ -181,10 +180,7 @@ public class MissionV3Manager extends BaseManager {
                                 }
                                 sendEvent2Server("任务状态:上传中", 1);
                                 Movement.getInstance().setVirtualStickQuitMission(false);
-                                Movement.getInstance().setMissionFinish(false);
 
-                                //这个是原来可控制那个发送最终状态的逻辑
-                                Movement.getInstance().setMissionFinish1(false);
 
 
                                 break;
@@ -197,10 +193,7 @@ public class MissionV3Manager extends BaseManager {
                                 }
                                 sendEvent2Server("任务状态:执行准备中", 1);
                                 Movement.getInstance().setVirtualStickQuitMission(false);
-                                Movement.getInstance().setMissionFinish(false);
 
-                                //这个是原来可控制那个发送最终状态的逻辑
-                                Movement.getInstance().setMissionFinish1(false);
 
 
                                 break;
@@ -220,10 +213,7 @@ public class MissionV3Manager extends BaseManager {
                                 Movement.getInstance().setVirtualStickQuitMission(false);
                                 sendEvent2Server("任务状态:进入航线飞行,飞往指定航线的第一个航点", 1);
 
-                                Movement.getInstance().setMissionFinish(false);
 
-                                //这个是原来可控制那个发送最终状态的逻辑
-                                Movement.getInstance().setMissionFinish1(false);
 
 
                                 //航线飞行
@@ -246,24 +236,19 @@ public class MissionV3Manager extends BaseManager {
                                     Movement.getInstance().setTask_status("in_progress");
                                 }
                                 Movement.getInstance().setVirtualStickQuitMission(false);
-                                Movement.getInstance().setMissionFinish(false);
 
-                                //这个是原来可控制那个发送最终状态的逻辑
-                                Movement.getInstance().setMissionFinish1(false);
 
                                 break;
                             case INTERRUPTED:
                                 if (Movement.getInstance().getFlightmode() == 2) {
                                     Movement.getInstance().setTakeoff_status("wayline_cancel");
+                                    TakeoffProgressScheduler.getInstance().stopReporting();
                                 }
 
                                 Movement.getInstance().setVirtualStickQuitMission(false);
                                 sendEvent2Server("任务状态:航线任务执行中断", 1);
                                 Movement.getInstance().setTask_status("paused");
-                                Movement.getInstance().setMissionFinish(false);
 
-                                //这个是原来可控制那个发送最终状态的逻辑
-                                Movement.getInstance().setMissionFinish1(false);
 
 
                                 //切换成手动飞行
@@ -279,17 +264,14 @@ public class MissionV3Manager extends BaseManager {
                                 } else {
                                     Movement.getInstance().setTask_status("in_progress");
                                 }
-                                Movement.getInstance().setMissionFinish(false);
 
-                                //这个是原来可控制那个发送最终状态的逻辑
-                                Movement.getInstance().setMissionFinish1(false);
 
                                 break;
                             case FINISHED:
+
                                 //释放锁
-                                Synchronizedstatus.setFlighttaskExecuteStatus(false);
-
-
+                                Synchronizedstatus.setIsruning(false);
+                                Synchronizedstatus.setInitStatus(false);
 
                                 //如果是虚拟摇杆导致的退出应该要可恢复
                                 if (Movement.getInstance().getMode_code() == 16) {
@@ -308,8 +290,9 @@ public class MissionV3Manager extends BaseManager {
                                         @Override
                                         public void run() {
                                             TakeoffProgressScheduler.getInstance().stopReporting();
+                                            sendEvent2Server("确定已经发送一键起飞的wayok", 1);
                                         }
-                                    }, 2000); // 1000ms = 1秒
+                                    }, 4000); // 1000ms = 1秒
                                 }
 
                                 finishWayLineTime = System.currentTimeMillis();
@@ -342,10 +325,7 @@ public class MissionV3Manager extends BaseManager {
                                 } else {
                                     Movement.getInstance().setTask_status("in_progress");
                                 }
-                                Movement.getInstance().setMissionFinish(false);
 
-                                //这个是原来可控制那个发送最终状态的逻辑
-                                Movement.getInstance().setMissionFinish1(false);
 
                                 break;
                         }
@@ -371,6 +351,8 @@ public class MissionV3Manager extends BaseManager {
 
                 @Override
                 public void onWaylineExecutingInterruptReasonUpdate(IDJIError error) {
+                    LogUtil.log(TAG, "航线中断原因" + error.toString());
+                    sendEvent2Server("航线中断原因" + error.toString(), 2);
                 }
             });
             waypointMissionManager.addWaypointActionListener(new WaypointActionListener() {
@@ -398,9 +380,12 @@ public class MissionV3Manager extends BaseManager {
         }, 2000); // 参数别改：2s延迟
     }
 
+    // 存储最新的航线消息
+
     //收到航线
     public void taskExecute(MessageDown message) {
 
+
         PreferenceUtils.getInstance().setMissionType(0);
         Movement.getInstance().setMission_type(0);
         PreferenceUtils.getInstance().setFlightId(message.getData().getFlight_id());
@@ -423,23 +408,20 @@ public class MissionV3Manager extends BaseManager {
 
         Movement.getInstance().setTask_current_step(5);
 
-
         //1.检查图传是否连接
-        checkVtxWithDelay(() -> {
-            //避免重复执行
-            if (isReceiverMission == false) {
-                isReceiverMission = true;
-            }
-            //2.回复收到指令
+        //避免重复执行
+        if (isReceiverMission == false) {
+            isReceiverMission = true;
+        }
+        sendMsg2Server(message);
+        //3.检查飞机状态（不满足条件直接taskFail入库）
+        boolean statusOk = verifyAircraftStatus(message);
+
+        if (statusOk) {
+            sendEvent2Server("条件满足进入自建和下发航线", 1);
+            verifyGpsAndMissionState(message);
+        }
 
-            //3.检查飞机状态（不满足条件直接taskFail入库）
-            boolean statusOk = verifyAircraftStatus(message);
-            //4.信号收敛(等待GPS搜星)
-            if (statusOk) {
-                sendEvent2Server("条件满足进入自建和下发航线", 1);
-                verifyGpsAndMissionState(message);
-            }
-        });
     }
 
 
@@ -455,8 +437,10 @@ public class MissionV3Manager extends BaseManager {
             }
             //2.关闭避障
             PerceptionManager.getInstance().setPerceptionEnable(false);
+            PerceptionManager.getInstance().setObstacleAvoidanceupEnabled(false);
+            PerceptionManager.getInstance().setObstacleAvoidancedownEnabled(false);
+            PerceptionManager.getInstance().closeRadarManager(false);
 
-            PerceptionManager.getInstance().setObstacleAvoidanceHorizontalEnabled(false);
             //3.清空sd卡
             CameraManager.getInstance().formatStorage(null);
             //4.返航或降落状态无法执行航线
@@ -530,7 +514,6 @@ public class MissionV3Manager extends BaseManager {
             verifyGpsAndMissionStateSuccess = true;
             Movement.getInstance().setIs_fixed(2);
         } else {
-
             if (!verifyGpsAndMissionStateSuccess) {
                 if (verifyGpsAndMissionStateTimes < maxRetries) {
                     mainHandler.postDelayed(new Runnable() {
@@ -645,9 +628,7 @@ public class MissionV3Manager extends BaseManager {
                     if (waylines != null && waylines.size() > 0) {
                         List<WaylineExecuteWaypoint> waypoints = waylines.get(0).getWaypoints();
                         if (waypoints != null && waypoints.size() > 0) {
-
                             CurrentWayline.getInstance().setWaypoints(waypoints);
-
                             LogUtil.log(TAG, "该航线有" + waypoints.size() + "个航点");
                         } else {
                             LogUtil.log(TAG, "WPMZManager getWaypointInfo有误");
@@ -692,10 +673,6 @@ public class MissionV3Manager extends BaseManager {
                             Movement.getInstance().setMode_code(4);
 
                             Movement.getInstance().setTask_current_step(22);
-                            //关闭避障
-                            PerceptionManager.getInstance().setPerceptionEnable(false);
-                            PerceptionManager.getInstance().setObstacleAvoidanceHorizontalEnabled(false);
-
                             startMission(message);
                             pushKMZFileTimes = 0;
                         }
@@ -756,6 +733,9 @@ public class MissionV3Manager extends BaseManager {
             CommonCallbacks.CompletionCallback callback = new CommonCallbacks.CompletionCallback() {
                 @Override
                 public void onSuccess() {
+                    //开始一键起飞事件的上报
+                    Movement.getInstance().setMissionFinish1(false);
+
                     isMissionStart = true;
                     LogUtil.log(TAG, "航线第" + startMissionFailTimes + "次开始成功");
                     Movement.getInstance().setTask_status("in_progress");
@@ -792,11 +772,8 @@ public class MissionV3Manager extends BaseManager {
                                 }, 2000);
                             } else {
                                 if (!Movement.getInstance().isPlaneWing()) {
-
                                     //待机
                                     Movement.getInstance().setMode_code(0);
-
-
                                     sendEvent2Server("航线第" + startMissionFailTimes + "次开始失败,直接关机:" + "---" + new Gson().toJson(error) + "--" + Movement.getInstance().getQuality(), 2);
                                     TaskFailManager.getInstance().sendTaskFailMsg2Server(-1);
                                 }
@@ -895,7 +872,7 @@ public class MissionV3Manager extends BaseManager {
                             mainHandler.postDelayed(new Runnable() {
                                 @Override
                                 public void run() {
-                                    WaypointMissionManager.getInstance().startMission("aros", breakPointInfo,
+                                    WaypointMissionManager.getInstance().resumeMission(breakPointInfo,
                                             new CommonCallbacks.CompletionCallback() {
                                                 @Override
                                                 public void onSuccess() {
@@ -903,9 +880,7 @@ public class MissionV3Manager extends BaseManager {
                                                     PreferenceUtils.getInstance().setIsNewRoute(false);
                                                     LogUtil.log(TAG, "恢复断点航线成功");
                                                     Movement.getInstance().setTask_status("in_progress");
-
                                                 }
-
                                                 @Override
                                                 public void onFailure(@NonNull IDJIError idjiError) {
                                                     LogUtil.log(TAG, "恢复断点航线失败:" + getIDJIErrorMsg(idjiError));
@@ -932,7 +907,7 @@ public class MissionV3Manager extends BaseManager {
     }
 
 
-    private void checkVtxWithDelay(Runnable onVtxReady) {
+    public void checkVtxWithDelay(Runnable onVtxReady) {
 
         if (Movement.getInstance().isVtx()) {
             // 图传正常，直接继续后面的流程
@@ -954,12 +929,13 @@ public class MissionV3Manager extends BaseManager {
                     RestartAPPTool.INSTANCE.restartApp(ApronApp.Companion.getContext());
                 }
             } else {
+
                 // 图传恢复 → 执行后续逻辑
                 PreferenceUtils.getInstance().setRestartAMSTimes(0);
                 LogUtil.log(TAG, "图传在延迟期间恢复，继续执行任务流程");
                 onVtxReady.run();
             }
-        }, 5000);
+        }, 10000);
     }
 
 }
diff --git a/app/src/main/java/com/aros/apron/manager/PerceptionManager.java b/app/src/main/java/com/aros/apron/manager/PerceptionManager.java
index 1708ee30..f1f541e7 100644
--- a/app/src/main/java/com/aros/apron/manager/PerceptionManager.java
+++ b/app/src/main/java/com/aros/apron/manager/PerceptionManager.java
@@ -19,6 +19,9 @@ import dji.v5.common.error.IDJIError;
 import dji.v5.manager.KeyManager;
 import dji.v5.manager.aircraft.perception.data.ObstacleAvoidanceType;
 import dji.v5.manager.aircraft.perception.data.PerceptionDirection;
+import dji.v5.manager.aircraft.perception.radar.RadarInformation;
+import dji.v5.manager.aircraft.perception.radar.RadarInformationListener;
+import dji.v5.manager.aircraft.perception.radar.RadarManager;
 import dji.v5.manager.interfaces.IPerceptionManager;
 import dji.v5.manager.interfaces.IRadarManager;
 
@@ -41,15 +44,12 @@ public class PerceptionManager extends BaseManager {
 
     public void setPerceptionEnable(boolean perceptionEnable) {
         if (PreferenceUtils.getInstance().getCloseObsEnable() && perceptionEnable) {
-            LogUtil.log(TAG, "全局避障关闭,不开启避障");
+            //LogUtil.log(TAG, "全局避障关闭,不开启避障");
             return;
         }
         Boolean isConnect = KeyManager.getInstance().getValue(createKey(FlightControllerKey.KeyConnection));
         if (isConnect != null && isConnect) {
-
             IPerceptionManager perceptionManager = dji.v5.manager.aircraft.perception.PerceptionManager.getInstance();
-
-
             //关闭避障
             perceptionManager.setObstacleAvoidanceType(perceptionEnable ? ObstacleAvoidanceType.BRAKE : ObstacleAvoidanceType.CLOSE, new CommonCallbacks.CompletionCallback() {
                 @Override
@@ -76,6 +76,9 @@ public class PerceptionManager extends BaseManager {
                                         closePerceptionTimes++;
                                         setPerceptionEnable(false);
                                         setObstacleAvoidanceHorizontalEnabled(false);
+                                        setObstacleAvoidanceupEnabled(false);
+                                        setObstacleAvoidancedownEnabled(false);
+                                        closeRadarManager(false);
                                     }
                                 }, 2000);
                             } else {
@@ -89,7 +92,7 @@ public class PerceptionManager extends BaseManager {
     }
 
 
-    //开启水平避障
+    //关闭水平避障
     public void setObstacleAvoidanceHorizontalEnabled(Boolean perceptionEnable) {
         if (PreferenceUtils.getInstance().getCloseObsEnable()) {
             LogUtil.log(TAG, "全局避障关闭,不开启避障");
@@ -98,7 +101,7 @@ public class PerceptionManager extends BaseManager {
         Boolean isConnect = KeyManager.getInstance().getValue(createKey(FlightControllerKey.KeyConnection));
         if (isConnect != null && isConnect) {
             IPerceptionManager perceptionManager = dji.v5.manager.aircraft.perception.PerceptionManager.getInstance();
-            perceptionManager.setObstacleAvoidanceEnabled(perceptionEnable ? true:false, PerceptionDirection.HORIZONTAL, new CommonCallbacks.CompletionCallback() {
+            perceptionManager.setObstacleAvoidanceEnabled(perceptionEnable ? true : false, PerceptionDirection.HORIZONTAL, new CommonCallbacks.CompletionCallback() {
                 @Override
                 public void onSuccess() {
                     //LogUtil.log(TAG, "开启水平避障");
@@ -106,12 +109,104 @@ public class PerceptionManager extends BaseManager {
 
                 @Override
                 public void onFailure(@NonNull IDJIError idjiError) {
-                    LogUtil.log(TAG, "开启水平避障:"+new Gson().toJson(idjiError));
+                    LogUtil.log(TAG, "开启水平避障:" + new Gson().toJson(idjiError));
 
                 }
             });
         }
+    }
 
+    //关闭上避障
+    public void setObstacleAvoidanceupEnabled(Boolean perceptionEnable) {
+        if (PreferenceUtils.getInstance().getCloseObsEnable()) {
+            LogUtil.log(TAG, "全局避障关闭,不开启避障");
+            return;
+        }
+        Boolean isConnect = KeyManager.getInstance().getValue(createKey(FlightControllerKey.KeyConnection));
+        if (isConnect != null && isConnect) {
+            IPerceptionManager perceptionManager = dji.v5.manager.aircraft.perception.PerceptionManager.getInstance();
+            perceptionManager.setObstacleAvoidanceEnabled(perceptionEnable ? true : false, PerceptionDirection.UPWARD, new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    //LogUtil.log(TAG, "开启水平避障");
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError idjiError) {
+                    LogUtil.log(TAG, "开启水平避障:" + new Gson().toJson(idjiError));
+
+                }
+            });
+        }
+    }
+
+    //关闭下避障
+    public void setObstacleAvoidancedownEnabled(Boolean perceptionEnable) {
+        if (PreferenceUtils.getInstance().getCloseObsEnable()) {
+            LogUtil.log(TAG, "全局避障关闭,不开启避障");
+            return;
+        }
+        Boolean isConnect = KeyManager.getInstance().getValue(createKey(FlightControllerKey.KeyConnection));
+        if (isConnect != null && isConnect) {
+            IPerceptionManager perceptionManager = dji.v5.manager.aircraft.perception.PerceptionManager.getInstance();
+            perceptionManager.setObstacleAvoidanceEnabled(perceptionEnable ? true : false, PerceptionDirection.DOWNWARD, new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    //LogUtil.log(TAG, "开启水平避障");
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError idjiError) {
+                    LogUtil.log(TAG, "开启水平避障:" + new Gson().toJson(idjiError));
+
+                }
+            });
+        }
+    }
+
+
+    public void closeRadarManager(boolean perceptionEnable) {
+        if (PreferenceUtils.getInstance().getCloseObsEnable()) {
+            LogUtil.log(TAG, "全局避障关闭,不开启避障");
+            return;
+        }
+        Boolean isConnect = KeyManager.getInstance().getValue(createKey(FlightControllerKey.KeyConnection));
+        if (isConnect != null && isConnect) {
+            IRadarManager iRadarManager = new RadarManager();
+            iRadarManager.setObstacleAvoidanceEnabled(perceptionEnable ? true : false, PerceptionDirection.HORIZONTAL, new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    // LogUtil.log(TAG,"雷达水平关闭");
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError idjiError) {
+                    // LogUtil.log(TAG,"雷达水平关闭失败");
+                }
+            });
+            iRadarManager.setObstacleAvoidanceEnabled(perceptionEnable ? true : false, PerceptionDirection.UPWARD, new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    //LogUtil.log(TAG,"雷达上关闭");
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError idjiError) {
+                    // LogUtil.log(TAG,"雷达上关闭失败");
+                }
+            });
+
+        }
+    }
+
+    public void isladraopeninti() {
+        IRadarManager iRadarManager = new RadarManager();
+        iRadarManager.addRadarInformationListener(new RadarInformationListener() {
+            @Override
+            public void onUpdate(RadarInformation radarInformation) {
+                LogUtil.log(TAG, "雷达避障信息：" + "上" + radarInformation.isUpwardObstacleAvoidanceEnabled() + "水平" + radarInformation.isHorizontalObstacleAvoidanceEnabled());
+            }
+        });
     }
 
 
diff --git a/app/src/main/java/com/aros/apron/manager/RTKManager.java b/app/src/main/java/com/aros/apron/manager/RTKManager.java
index 3ad37a8a..089f74b9 100644
--- a/app/src/main/java/com/aros/apron/manager/RTKManager.java
+++ b/app/src/main/java/com/aros/apron/manager/RTKManager.java
@@ -50,7 +50,7 @@ public class RTKManager extends BaseManager {
                         public void onUpdate(RTKSystemState newValue) {
                             if (newValue!=null){
                                     Movement.getInstance().setIs_fixed(newValue.getRTKHealthy()?0:2);
-                                    LogUtil.log(TAG, "机身RTK状态:" + newValue.getRTKHealthy());
+                                    //LogUtil.log(TAG, "机身RTK状态:" + newValue.getRTKHealthy());
 
                             }
                         }
diff --git a/app/src/main/java/com/aros/apron/manager/StickManager.java b/app/src/main/java/com/aros/apron/manager/StickManager.java
index 4b856660..e2b45fe2 100644
--- a/app/src/main/java/com/aros/apron/manager/StickManager.java
+++ b/app/src/main/java/com/aros/apron/manager/StickManager.java
@@ -88,6 +88,12 @@ public class StickManager extends BaseManager {
 
     //取消虚拟摇杆控制权
     public void enableVirtualStick(MessageDown message) {
+
+        if(Movement.getInstance().isVirtualcontrollget()==true){
+            sendMsg2Server(message);
+            return;
+        }
+
         //吐过开启了drc或者使用过摇杆
         if(Movement.getInstance().isOpendrc()==false){
         VirtualStickManager.getInstance().setVirtualStickAdvancedModeEnabled(true);
@@ -95,17 +101,14 @@ public class StickManager extends BaseManager {
             @Override
             public void onSuccess() {
                 Movement.getInstance().setOpendrc(true);
-
                 if (message != null) {
                     LogUtil.log(TAG, "DRC回复"+message);
                     sendMsg2Server(message);
                 }
-
                 LogUtil.log(TAG, "控制权获取成功");
                 VirtualStickManager.getInstance().setVirtualStickAdvancedModeEnabled(true);
                 //获得过控制权
                 Movement.getInstance().setVirtualcontrollget(true);
-
             }
 
             @Override
@@ -116,11 +119,17 @@ public class StickManager extends BaseManager {
             }
         });
 
+        }else{
+            sendMsg2Server(message);
         }
     }
 
     //取消虚拟摇杆控制权
     public void disableVirtualStick(MessageDown message) {
+        if(Movement.getInstance().isVirtualcontrollget()==false){
+            sendMsg2Server(message);
+            return;
+        }
         VirtualStickManager.getInstance().disableVirtualStick(new CommonCallbacks.CompletionCallback() {
             @Override
             public void onSuccess() {
@@ -132,7 +141,6 @@ public class StickManager extends BaseManager {
                     }else if(Movement.getInstance().getFlightmode()==2){
                         Movement.getInstance().setMode_code(3);
                     }
-
                     Movement.getInstance().setOpendrc(false);
                 }
                 LogUtil.log(TAG, "控制权已取消");
@@ -145,7 +153,7 @@ public class StickManager extends BaseManager {
                 if (message!=null){
                     sendFailMsg2Server(message,"控制权释放失败:"+ Utils.getIDJIErrorMsg(error));
                 }
-                LogUtil.log(TAG, "控制权释放失败:"+Utils.getIDJIErrorMsg(error));
+                //LogUtil.log(TAG, "控制权释放失败:"+Utils.getIDJIErrorMsg(error));
             }
         });
     }
@@ -157,9 +165,9 @@ public class StickManager extends BaseManager {
         new Handler(Looper.getMainLooper()).postDelayed(() -> {
             // 这里放你要延迟执行的代码
             StickManager.getInstance().enableVirtualStick(message);
-        }, 2000);
+        }, 100);
+
 
-        sendMsg2Server(message);
 
 //////        Boolean isConnect = KeyManager.getInstance().getValue(KeyTools.createKey(FlightControllerKey.KeyConnection));
 //////        if (isConnect != null && isConnect) {
diff --git a/app/src/main/java/com/aros/apron/manager/StreamManager.java b/app/src/main/java/com/aros/apron/manager/StreamManager.java
index aa6d16dc..82e5d720 100644
--- a/app/src/main/java/com/aros/apron/manager/StreamManager.java
+++ b/app/src/main/java/com/aros/apron/manager/StreamManager.java
@@ -7,6 +7,7 @@ import android.util.Log;
 
 import androidx.annotation.NonNull;
 
+import com.aros.apron.activity.MainActivity;
 import com.aros.apron.base.BaseManager;
 import com.aros.apron.entity.MessageDown;
 import com.aros.apron.entity.Movement;
@@ -15,6 +16,9 @@ import com.aros.apron.tools.PreferenceUtils;
 import com.aros.apron.tools.SimplePortScanner;
 import com.google.gson.Gson;
 
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
 import dji.sdk.keyvalue.key.CameraKey;
 import dji.sdk.keyvalue.key.DJIKey;
 import dji.sdk.keyvalue.key.FlightControllerKey;
@@ -38,6 +42,11 @@ import dji.v5.manager.interfaces.ILiveStreamManager;
 
 
 public class StreamManager extends BaseManager {
+    private static final String TAG = "StreamManager";
+
+    // ========== 【新增】线程池和主线程Handler，防止ANR ==========
+    private final ExecutorService streamExecutor = Executors.newSingleThreadExecutor();
+    private final Handler mainHandler = new Handler(Looper.getMainLooper());
 
     private StreamManager() {
     }
@@ -50,36 +59,38 @@ public class StreamManager extends BaseManager {
         return StreamHolder.INSTANCE;
     }
 
+    public void stopstream() {
+        streamExecutor.execute(() -> {
+            ILiveStreamManager liveStreamManager = MediaDataCenter.getInstance().getLiveStreamManager();
+            liveStreamManager.stopStream(new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    LogUtil.log(TAG, "直播关闭成功");
+                }
 
-    public void stopstream(){
-        ILiveStreamManager liveStreamManager = MediaDataCenter.getInstance().getLiveStreamManager();
-        liveStreamManager.stopStream(new CommonCallbacks.CompletionCallback() {
-            @Override
-            public void onSuccess() {
-                LogUtil.log(TAG,"直播关闭成功");
-            }
-
-            @Override
-            public void onFailure(@NonNull IDJIError idjiError) {
-                LogUtil.log(TAG,"直播关闭失败");
-            }
+                @Override
+                public void onFailure(@NonNull IDJIError idjiError) {
+                    LogUtil.log(TAG, "直播关闭失败");
+                }
+            });
         });
-
     }
-    public void startstream(){
-        ILiveStreamManager liveStreamManager = MediaDataCenter.getInstance().getLiveStreamManager();
-        liveStreamManager.startStream(new CommonCallbacks.CompletionCallback() {
-            @Override
-            public void onSuccess() {
-                LogUtil.log(TAG,"直播开启成功");
-            }
 
-            @Override
-            public void onFailure(@NonNull IDJIError idjiError) {
-                LogUtil.log(TAG,"直播开启成功失败");
-            }
+    public void startstream() {
+        streamExecutor.execute(() -> {
+            ILiveStreamManager liveStreamManager = MediaDataCenter.getInstance().getLiveStreamManager();
+            liveStreamManager.startStream(new CommonCallbacks.CompletionCallback() {
+                @Override
+                public void onSuccess() {
+                    LogUtil.log(TAG, "直播开启成功");
+                }
+
+                @Override
+                public void onFailure(@NonNull IDJIError idjiError) {
+                    LogUtil.log(TAG, "直播开启成功失败");
+                }
+            });
         });
-
     }
 
 
@@ -135,60 +146,67 @@ public class StreamManager extends BaseManager {
 
     //知眸测试
     public void startLiveWithCustom() {
-        Boolean isAircraftConnected = KeyManager.getInstance().getValue(DJIKey.create(ProductKey.KeyConnection));
-        if (isAircraftConnected == null || !isAircraftConnected) {
-            LogUtil.log(TAG, "飞行器未连接");
-        } else {
+        streamExecutor.execute(() -> {
+            Boolean isAircraftConnected = KeyManager.getInstance().getValue(DJIKey.create(ProductKey.KeyConnection));
+            if (isAircraftConnected == null || !isAircraftConnected) {
+                LogUtil.log(TAG, "飞行器未连接");
+                return;
+            }
             ILiveStreamManager liveStreamManager = MediaDataCenter.getInstance().getLiveStreamManager();
-            LogUtil.log(TAG, "自定义推流地址:" + PreferenceUtils.getInstance().getCustomStreamUrl());
-            LiveStreamSettings.Builder streamSettingBuilder = new LiveStreamSettings.Builder();
-            LiveStreamSettings streamSettings = streamSettingBuilder.setLiveStreamType(LiveStreamType.RTMP)
-                    .setRtmpSettings(new RtmpSettings.Builder().setUrl(PreferenceUtils.getInstance().getCustomStreamUrl()
-                    ).build()).build();
-            liveStreamManager.setLiveStreamSettings(streamSettings);
-            CameraType value = KeyManager.getInstance().getValue(KeyTools.createKey(CameraKey.KeyCameraType, ComponentIndexType.PORT_1));
-//            if (value != null && (value == CameraType.ZENMUSE_H20T ||
-//                    value == CameraType.ZENMUSE_H20N || value == CameraType.ZENMUSE_H20)
-//                    || value == CameraType.ZENMUSE_H30 || value == CameraType.ZENMUSE_H30T) {
-            liveStreamManager.setCameraIndex(ComponentIndexType.PORT_1);
-//            } else {
-//                liveStreamManager.setCameraIndex(ComponentIndexType.FPV);
-//            }
-            liveStreamManager.setLiveStreamQuality(StreamQuality.FULL_HD);
-            liveStreamManager.setLiveVideoBitrateMode(LiveVideoBitrateMode.AUTO);
-            if (!liveStreamManager.isStreaming()) {
-                liveStreamManager.startStream(new CommonCallbacks.CompletionCallback() {
-                    @Override
-                    public void onSuccess() {
-                        LogUtil.log(TAG, "自定义推流启动成功");
-                        isLiveStreamAlreadyStart = true;
-                    }
+            mainHandler.post(() -> {
+                LogUtil.log(TAG, "自定义推流地址:" + PreferenceUtils.getInstance().getCustomStreamUrl());
+                LiveStreamSettings.Builder streamSettingBuilder = new LiveStreamSettings.Builder();
+                LiveStreamSettings streamSettings = streamSettingBuilder.setLiveStreamType(LiveStreamType.RTMP)
+                        .setRtmpSettings(new RtmpSettings.Builder().setUrl(PreferenceUtils.getInstance().getCustomStreamUrl()
+                        ).build()).build();
+                liveStreamManager.setLiveStreamSettings(streamSettings);
 
-                    @Override
-                    public void onFailure(@NonNull IDJIError error) {
-                        LogUtil.log(TAG, "第" + startLiveFailTimes + "次开始推流失败:" + new Gson().toJson(error));
-                        if (!isLiveStreamAlreadyStart) {
-                            new Handler().postDelayed(new Runnable() {
-                                @Override
-                                public void run() {
-                                    if (startLiveFailTimes < 10) {
-                                        startLiveFailTimes++;
-                                        startLiveWithCustom();
-                                    }
+                CameraType value = KeyManager.getInstance().getValue(KeyTools.createKey(CameraKey.KeyCameraType, ComponentIndexType.PORT_1));
+                liveStreamManager.setCameraIndex(ComponentIndexType.PORT_1);
+                liveStreamManager.setLiveStreamQuality(StreamQuality.FULL_HD);
+                liveStreamManager.setLiveVideoBitrateMode(LiveVideoBitrateMode.AUTO);
+            });
+
+            if (!liveStreamManager.isStreaming()) {
+                doStartLiveCustom(liveStreamManager);
+            }
+        });
+    }
+
+    private void doStartLiveCustom(ILiveStreamManager liveStreamManager) {
+        liveStreamManager.startStream(new CommonCallbacks.CompletionCallback() {
+            @Override
+            public void onSuccess() {
+                mainHandler.post(() -> {
+                    LogUtil.log(TAG, "自定义推流启动成功");
+                    isLiveStreamAlreadyStart = true;
+                });
+            }
+
+            @Override
+            public void onFailure(@NonNull IDJIError error) {
+                mainHandler.post(() -> {
+                    LogUtil.log(TAG, "第" + startLiveFailTimes + "次开始推流失败:" + new Gson().toJson(error));
+                    if (!isLiveStreamAlreadyStart) {
+                        mainHandler.postDelayed(() -> {
+                            streamExecutor.execute(() -> {
+                                if (startLiveFailTimes < 10) {
+                                    startLiveFailTimes++;
+                                    startLiveWithCustom();
                                 }
-                            }, 3000);
-                        }
+                            });
+                        }, 3000);
                     }
                 });
             }
-        }
+        });
     }
 
 
     private int isliveindex = 1; //1代表port 2代表fpv
 
-    public void switchptspfpv(ComponentIndexType ComponentIndex, MessageDown message){
-        isliveindex=2;
+    public void switchptspfpv(ComponentIndexType ComponentIndex, MessageDown message) {
+        isliveindex = 2;
         sendMsg2Server(message);
         ILiveStreamManager liveStreamManager = MediaDataCenter.getInstance().getLiveStreamManager();
         LogUtil.log(TAG, "切换RTSP推流fpv:" + PreferenceUtils.getInstance().getRtspUserName()
@@ -209,8 +227,8 @@ public class StreamManager extends BaseManager {
         liveStreamManager.setLiveVideoBitrateMode(LiveVideoBitrateMode.AUTO);
     }
 
-    public void switchptspport(ComponentIndexType ComponentIndex, MessageDown message){
-        isliveindex=1;
+    public void switchptspport(ComponentIndexType ComponentIndex, MessageDown message) {
+        isliveindex = 1;
         sendMsg2Server(message);
         ILiveStreamManager liveStreamManager = MediaDataCenter.getInstance().getLiveStreamManager();
         LogUtil.log(TAG, "切换RTSP推流port:" + PreferenceUtils.getInstance().getRtspUserName()
@@ -225,150 +243,201 @@ public class StreamManager extends BaseManager {
 
         liveStreamManager.setLiveStreamSettings(streamSettings);
 
-
         liveStreamManager.setCameraIndex(ComponentIndex);
 
         liveStreamManager.setLiveStreamQuality(StreamQuality.FULL_HD);
         liveStreamManager.setLiveVideoBitrateMode(LiveVideoBitrateMode.AUTO);
     }
 
-
+    // ========== 【核心修复】RTSP推流入口，全部在子线程执行 ==========
     public void startLiveWithRTSP() {
-        Boolean isAircraftConnected = KeyManager.getInstance().getValue(DJIKey.create(FlightControllerKey.KeyConnection));
-        if (isAircraftConnected == null || !isAircraftConnected) {
-            LogUtil.log(TAG, "飞行器未连接");
-        } else {
+        streamExecutor.execute(() -> {
+            Boolean isAircraftConnected = KeyManager.getInstance().getValue(DJIKey.create(FlightControllerKey.KeyConnection));
+            if (isAircraftConnected == null || !isAircraftConnected) {
+                LogUtil.log(TAG, "飞行器未连接");
+                return;
+            }
+            // 检查相机流是否准备好
+            if (!MainActivity.Companion.getStreamReceive()) {
+                LogUtil.log(TAG, "相机流未准备好，尝试切换FPVWidget恢复");
+                mainHandler.post(() -> {
+                    MainActivity mainActivity = MainActivity.Companion.getInstance();
+                    if (mainActivity != null) {
+                        mainActivity.swapVideoSource();
+                    }
+                });
+
+                mainHandler.postDelayed(() -> {
+                    streamExecutor.execute(() -> {
+                        if (startLiveFailTimes < 2) {
+                            startLiveFailTimes++;
+                            startLiveWithRTSP();
+                        } else {
+                            forceStartLive();
+                            LogUtil.log(TAG, "相机流未准备好，重试次数已达上限，强制启动");
+                        }
+                    });
+                }, 1500);
+                return;
+            }
+
             if (PreferenceUtils.getInstance().getRtspUserName() != null &&
                     PreferenceUtils.getInstance().getRtspPort() != null &&
-                    PreferenceUtils.getInstance().getRtspPassWord() != null
-            ) {
+                    PreferenceUtils.getInstance().getRtspPassWord() != null) {
 
                 ILiveStreamManager liveStreamManager = MediaDataCenter.getInstance().getLiveStreamManager();
                 LogUtil.log(TAG, "自定义RTSP推流:" + PreferenceUtils.getInstance().getRtspUserName()
                         + "--" + PreferenceUtils.getInstance().getRtspPort() + "--" + PreferenceUtils.getInstance().getRtspPassWord());
 
-                if(isliveindex==1){
-                    LiveStreamSettings.Builder streamSettingBuilder = new LiveStreamSettings.Builder();
-                    LiveStreamSettings streamSettings = streamSettingBuilder.setLiveStreamType(LiveStreamType.RTSP)
-                            .setRtspSettings(new RtspSettings.Builder().setPassWord(PreferenceUtils.getInstance().getRtspPassWord()).
-                                    setPort(Integer.parseInt(PreferenceUtils.getInstance().getRtspPort())).
-                                    setUserName(PreferenceUtils.getInstance().getRtspUserName()).build()).build();
+                // 设置参数在主线程执行（部分DJI API要求）
+                mainHandler.post(() -> {
+                    if (isliveindex == 1) {
+                        LiveStreamSettings.Builder streamSettingBuilder = new LiveStreamSettings.Builder();
+                        LiveStreamSettings streamSettings = streamSettingBuilder.setLiveStreamType(LiveStreamType.RTSP)
+                                .setRtspSettings(new RtspSettings.Builder().setPassWord(PreferenceUtils.getInstance().getRtspPassWord()).
+                                        setPort(Integer.parseInt(PreferenceUtils.getInstance().getRtspPort())).
+                                        setUserName(PreferenceUtils.getInstance().getRtspUserName()).build()).build();
 
-                    liveStreamManager.setLiveStreamSettings(streamSettings);
+                        liveStreamManager.setLiveStreamSettings(streamSettings);
+                        liveStreamManager.setCameraIndex(ComponentIndexType.PORT_1);
+                        liveStreamManager.setLiveStreamQuality(StreamQuality.FULL_HD);
+                        liveStreamManager.setLiveVideoBitrateMode(LiveVideoBitrateMode.AUTO);
+                    } else {
+                        LiveStreamSettings.Builder streamSettingBuilder = new LiveStreamSettings.Builder();
+                        LiveStreamSettings streamSettings = streamSettingBuilder.setLiveStreamType(LiveStreamType.RTSP)
+                                .setRtspSettings(new RtspSettings.Builder().setPassWord(PreferenceUtils.getInstance().getRtspPassWord()).
+                                        setPort(Integer.parseInt(PreferenceUtils.getInstance().getRtspPort())).
+                                        setUserName(PreferenceUtils.getInstance().getRtspUserName()).build()).build();
 
-                    CameraType value = KeyManager.getInstance().getValue(KeyTools.createKey(CameraKey.KeyCameraType, ComponentIndexType.PORT_1));
+                        liveStreamManager.setLiveStreamSettings(streamSettings);
+                        liveStreamManager.setCameraIndex(ComponentIndexType.FPV);
+                        liveStreamManager.setLiveStreamQuality(StreamQuality.FULL_HD);
+                        liveStreamManager.setLiveVideoBitrateMode(LiveVideoBitrateMode.AUTO);
+                    }
+                });
 
-//                if (value != null && (value == CameraType.ZENMUSE_H20T ||
-//                        value == CameraType.ZENMUSE_H20N || value == CameraType.ZENMUSE_H20)
-//                        || value == CameraType.ZENMUSE_H30 || value == CameraType.ZENMUSE_H30T) {
-                    liveStreamManager.setCameraIndex(ComponentIndexType.PORT_1);
-//                } else {
-//                    liveStreamManager.setCameraIndex(ComponentIndexType.FPV);
-//                }
-                    liveStreamManager.setLiveStreamQuality(StreamQuality.FULL_HD);
-                    liveStreamManager.setLiveVideoBitrateMode(LiveVideoBitrateMode.AUTO);
-                }else{
-                    LiveStreamSettings.Builder streamSettingBuilder = new LiveStreamSettings.Builder();
-
-                    LiveStreamSettings streamSettings = streamSettingBuilder.setLiveStreamType(LiveStreamType.RTSP)
-                            .setRtspSettings(new RtspSettings.Builder().setPassWord(PreferenceUtils.getInstance().getRtspPassWord()).
-                                    setPort(Integer.parseInt(PreferenceUtils.getInstance().getRtspPort())).
-                                    setUserName(PreferenceUtils.getInstance().getRtspUserName()).build()).build();
-
-                    liveStreamManager.setLiveStreamSettings(streamSettings);
-
-                    liveStreamManager.setCameraIndex(ComponentIndexType.FPV);
-
-                    liveStreamManager.setLiveStreamQuality(StreamQuality.FULL_HD);
-                    liveStreamManager.setLiveVideoBitrateMode(LiveVideoBitrateMode.AUTO);
+                // 稍微等待设置生效
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException e) {
+                    Thread.currentThread().interrupt();
+                    return;
                 }
 
-
                 if (!liveStreamManager.isStreaming()) {
-                    liveStreamManager.startStream(new CommonCallbacks.CompletionCallback() {
-                        @Override
-                        public void onSuccess() {
-                            LogUtil.log(TAG, "自定义RTSP推流启动成功");
-                            isliveindex = 1;
-                            isLiveStreamAlreadyStart = true;
-                            //开始端口扫描
-                            SimplePortScanner.getInstance().startScan();
-                        }
-
-                        @Override
-                        public void onFailure(@NonNull IDJIError error) {
-                            LogUtil.log(TAG, "第" + startLiveFailTimes + "次开始RTSP推流失败:" + new Gson().toJson(error));
-                            if (!isLiveStreamAlreadyStart) {
-                                new Handler().postDelayed(new Runnable() {
-                                    @Override
-                                    public void run() {
-                                        if (startLiveFailTimes < 10) {
-                                            startLiveFailTimes++;
-                                            startLiveWithRTSP();
-                                        }
-                                    }
-                                }, 3000);
-                            }
-                        }
-                    });
+                    // 直接启动
+                    doStartLiveWithRTSP(liveStreamManager, false);
                 } else {
+                    // 先停止再启动
                     liveStreamManager.stopStream(new CommonCallbacks.CompletionCallback() {
                         @Override
                         public void onSuccess() {
-                            new Handler().postDelayed(new Runnable() {
-                                @Override
-                                public void run() {
-                                    liveStreamManager.startStream(new CommonCallbacks.CompletionCallback() {
-                                        @Override
-                                        public void onSuccess() {
-                                            LogUtil.log(TAG, "自定义RTSP推流启动成功");
-                                            isliveindex = 1;
-                                            isLiveStreamAlreadyStart = true;
-                                        }
-
-                                        @Override
-                                        public void onFailure(@NonNull IDJIError error) {
-                                            LogUtil.log(TAG, "第" + startLiveFailTimes + "次开始RTSP推流失败:" + new Gson().toJson(error));
-                                            if (!isLiveStreamAlreadyStart) {
-                                                new Handler().postDelayed(new Runnable() {
-                                                    @Override
-                                                    public void run() {
-                                                        if (startLiveFailTimes < 10) {
-                                                            startLiveFailTimes++;
-                                                            startLiveWithRTSP();
-                                                        }
-                                                    }
-                                                }, 3000);
-                                            }
-                                        }
-                                    });
-                                }
-                            }, 2000);
+                            // 在子线程延迟2秒，替代 Handler.postDelayed
+                            try {
+                                Thread.sleep(2000);
+                            } catch (InterruptedException e) {
+                                Thread.currentThread().interrupt();
+                                return;
+                            }
+                            doStartLiveWithRTSP(liveStreamManager, true);
                         }
 
                         @Override
                         public void onFailure(@NonNull IDJIError error) {
-                            LogUtil.log(TAG, "第" + startLiveFailTimes + "次开始RTSP推流失败:" + new Gson().toJson(error));
-                            if (!isLiveStreamAlreadyStart) {
-                                new Handler().postDelayed(new Runnable() {
-                                    @Override
-                                    public void run() {
-                                        if (startLiveFailTimes < 10) {
-                                            startLiveFailTimes++;
-                                            startLiveWithRTSP();
-                                        }
-                                    }
-                                }, 3000);
-                            }
+                            mainHandler.post(() -> {
+                                LogUtil.log(TAG, "停止旧流失败:" + new Gson().toJson(error));
+                                // 即使停止失败也尝试启动
+                                streamExecutor.execute(() -> doStartLiveWithRTSP(liveStreamManager, true));
+                            });
                         }
                     });
                 }
             } else {
                 LogUtil.log(TAG, "RTSP配置参数有误");
             }
-        }
+        });
     }
 
 
 
-}
+    private void forceStartLive() {
+
+        streamExecutor.execute(() -> {
+            if (PreferenceUtils.getInstance().getRtspUserName() != null &&
+                    PreferenceUtils.getInstance().getRtspPort() != null &&
+                    PreferenceUtils.getInstance().getRtspPassWord() != null) {
+
+                ILiveStreamManager liveStreamManager = MediaDataCenter.getInstance().getLiveStreamManager();
+
+                // 直接设置参数并启动，不检查相机流状态
+                mainHandler.post(() -> {
+                    LiveStreamSettings.Builder streamSettingBuilder = new LiveStreamSettings.Builder();
+                    LiveStreamSettings streamSettings = streamSettingBuilder.setLiveStreamType(LiveStreamType.RTSP)
+                            .setRtspSettings(new RtspSettings.Builder().setPassWord(PreferenceUtils.getInstance().getRtspPassWord()).
+                                    setPort(Integer.parseInt(PreferenceUtils.getInstance().getRtspPort())).
+                                    setUserName(PreferenceUtils.getInstance().getRtspUserName()).build()).build();
+
+                    liveStreamManager.setLiveStreamSettings(streamSettings);
+                    liveStreamManager.setCameraIndex(isliveindex == 1 ? ComponentIndexType.PORT_1 : ComponentIndexType.FPV);
+                    liveStreamManager.setLiveStreamQuality(StreamQuality.FULL_HD);
+                    liveStreamManager.setLiveVideoBitrateMode(LiveVideoBitrateMode.AUTO);
+
+                    // 直接启动
+                    liveStreamManager.startStream(new CommonCallbacks.CompletionCallback() {
+                        @Override
+                        public void onSuccess() {
+                            mainHandler.post(() -> {
+                                LogUtil.log(TAG, "强制启动RTSP推流成功");
+                                MainActivity mainActivity = MainActivity.Companion.getInstance();
+                                mainActivity.swapVideoSource();
+                                isLiveStreamAlreadyStart = true;
+                                SimplePortScanner.getInstance().startScan();
+                            });
+                        }
+
+                        @Override
+                        public void onFailure(@NonNull IDJIError error) {
+                            mainHandler.post(() -> {
+                                LogUtil.log(TAG, "强制启动RTSP推流失败:" + new Gson().toJson(error));
+                            });
+                        }
+                    });
+                });
+            }
+        });
+    }
+
+    // ========== 【新增】实际启动流的私有方法，确保在子线程执行 ==========
+    private void doStartLiveWithRTSP(ILiveStreamManager liveStreamManager, boolean isRestart) {
+        liveStreamManager.startStream(new CommonCallbacks.CompletionCallback() {
+            @Override
+            public void onSuccess() {
+                mainHandler.post(() -> {
+                    LogUtil.log(TAG, "自定义RTSP推流启动成功" + (isRestart ? "(重启)" : ""));
+                    isliveindex = 1;
+                    isLiveStreamAlreadyStart = true;
+                    // 开始端口扫描
+                    SimplePortScanner.getInstance().startScan();
+                });
+            }
+
+            @Override
+            public void onFailure(@NonNull IDJIError error) {
+                mainHandler.post(() -> {
+                    LogUtil.log(TAG, "第" + startLiveFailTimes + "次开始RTSP推流失败:" + new Gson().toJson(error));
+                    if (!isLiveStreamAlreadyStart) {
+                        // 延时3秒后重试，重试也提交到线程池
+                        mainHandler.postDelayed(() -> {
+                            streamExecutor.execute(() -> {
+                                if (startLiveFailTimes < 10) {
+                                    startLiveFailTimes++;
+                                    startLiveWithRTSP();
+                                }
+                            });
+                        }, 3000);
+                    }
+                });
+            }
+        });
+    }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/aros/apron/manager/TakeOffToPointManager.java b/app/src/main/java/com/aros/apron/manager/TakeOffToPointManager.java
index 85adbf0c..ccc7f256 100644
--- a/app/src/main/java/com/aros/apron/manager/TakeOffToPointManager.java
+++ b/app/src/main/java/com/aros/apron/manager/TakeOffToPointManager.java
@@ -21,6 +21,7 @@ import com.aros.apron.entity.MessageDown;
 import com.aros.apron.entity.MissionDataBean;
 import com.aros.apron.entity.MissionPoint;
 import com.aros.apron.entity.Movement;
+import com.aros.apron.entity.Synchronizedstatus;
 import com.aros.apron.tools.DomParserKML;
 import com.aros.apron.tools.DomParserWPML;
 import com.aros.apron.tools.Generakmztools;
@@ -69,12 +70,14 @@ public class TakeOffToPointManager extends BaseManager {
     }
 
     public boolean isReceiverMission = false;
+    // 存储最新的一键起飞消息
 
     //收到一键起飞航线
     public void taskExecute(MessageDown message) {
 
         PreferenceUtils.getInstance().setMissionType(1);
         Movement.getInstance().setIstakeoffex(true);
+
         PreferenceUtils.getInstance().setFlightId(message.getData().getFlight_id());
         PreferenceUtils.getInstance().setAlternatePointLon(message.getData().getAlternate_land_point().getLongitude() + "");
         PreferenceUtils.getInstance().setAlternatePointLat(message.getData().getAlternate_land_point().getLatitude() + "");
@@ -82,24 +85,21 @@ public class TakeOffToPointManager extends BaseManager {
                 message.getData().getAlternate_land_point().getSafe_land_height() + "");
         Movement.getInstance().setTask_current_step(5);
 
-        LogUtil.log(TAG,"生成");
-        //1.检查图传是否连接
-        checkVtxWithDelay(() -> {
-            //避免重复执行
-            if (isReceiverMission == false) {
-                isReceiverMission = true;
-            }
-            //2.回复收到指令
-            sendMsg2Server(message);
-            //3.检查飞机状态（不满足条件直接taskFail入库）
-            boolean statusOk = verifyAircraftStatus(message);
-            //4.信号收敛(等待GPS搜星)
-            if (statusOk) {
-               // LogUtil.log(TAG,"verifyGpsAndMissionState(message)执行了");
-                verifyGpsAndMissionState(message);
-            }
+        LogUtil.log(TAG, "生成");
+
+        //避免重复执行
+        if (isReceiverMission == false) {
+            isReceiverMission = true;
+        }
+        sendMsg2Server(message);
+        //3.检查飞机状态（不满足条件直接taskFail入库）
+        boolean statusOk = verifyAircraftStatus(message);
+        //4.信号收敛(等待GPS搜星)
+        if (statusOk) {
+            verifyGpsAndMissionState(message);
+        }
+
 
-        });
     }
 
     /**
@@ -114,7 +114,10 @@ public class TakeOffToPointManager extends BaseManager {
             }
             //2.关闭避障
             PerceptionManager.getInstance().setPerceptionEnable(false);
-            PerceptionManager.getInstance().setObstacleAvoidanceHorizontalEnabled(false);
+            PerceptionManager.getInstance().setObstacleAvoidanceupEnabled(false);
+            PerceptionManager.getInstance().setObstacleAvoidancedownEnabled(false);
+            PerceptionManager.getInstance().closeRadarManager(false);
+
             //3.清空sd卡
             CameraManager.getInstance().formatStorage(null);
             //4.返航或降落状态无法执行航线
@@ -125,7 +128,7 @@ public class TakeOffToPointManager extends BaseManager {
             }
             //5.检查航线备降点参数
             if (message.getData().getAlternate_land_point() == null) {
-                sendEvent2Server("备降点参数异常",2);
+                sendEvent2Server("备降点参数异常", 2);
                 TaskFailManager.getInstance().sendTaskFailMsg2Server(-1);
                 return false;
             }
@@ -139,14 +142,14 @@ public class TakeOffToPointManager extends BaseManager {
             Integer value = KeyManager.getInstance().getValue(createKey(FlightControllerKey.
                     KeyBatteryPowerPercent, 0));
             if (value != null && value < Integer.parseInt(PreferenceUtils.getInstance().getMinumumBattery())) {
-                sendEvent2Server("任务执行失败,电量过低",2);
+                sendEvent2Server("任务执行失败,电量过低", 2);
                 TaskFailManager.getInstance().sendTaskFailMsg2Server(ErrorCode.DEVICE_BATTERY_LEVEL_TOO_LOW);
                 return false;
             }
             RemoteControllerFlightMode remoteControllerFlightMode =
                     KeyManager.getInstance().getValue(KeyTools.createKey(FlightControllerKey.KeyRemoteControllerFlightMode));
             if (remoteControllerFlightMode != null && remoteControllerFlightMode != RemoteControllerFlightMode.P) {
-                sendEvent2Server("任务执行失败,请将遥控器切换为P/N挡",2);
+                sendEvent2Server("任务执行失败,请将遥控器切换为P/N挡", 2);
                 TaskFailManager.getInstance().sendTaskFailMsg2Server(-1);
                 return false;
             }
@@ -163,7 +166,6 @@ public class TakeOffToPointManager extends BaseManager {
     private final int maxRetries = 100;
 
 
-
     /**
      * 3.GPS信号校验
      */
@@ -171,16 +173,16 @@ public class TakeOffToPointManager extends BaseManager {
         int missionStateCode = Movement.getInstance().getMissionStateCode();
         String planeMessage = Movement.getInstance().getPlaneMessage();
         int quality = Movement.getInstance().getQuality();
-        int GPSSatelliteCount=Movement.getInstance().getGPSSatelliteCount();
+        int GPSSatelliteCount = Movement.getInstance().getGPSSatelliteCount();
 
         boolean isMissionStateValid = (missionStateCode == 2 || missionStateCode == 0 || missionStateCode == 7);
         boolean isPlaneMessageValid = !TextUtils.isEmpty(planeMessage) && !planeMessage.equals("无法起飞");
         boolean isGpsQualityValid = (quality == 4 || quality == 5 || quality == 10);
-        boolean GPSSatelliteCountValid=GPSSatelliteCount>15;
+        boolean GPSSatelliteCountValid = GPSSatelliteCount > 15;
 
-        LogUtil.log(TAG,"isMissionStateValid"+isMissionStateValid+"isPlaneMessageValid"+isPlaneMessageValid+"isGpsQualityValid"+isGpsQualityValid);
+        LogUtil.log(TAG, "isMissionStateValid" + isMissionStateValid + "isPlaneMessageValid" + isPlaneMessageValid + "isGpsQualityValid" + isGpsQualityValid);
 //        if (isMissionStateValid && isPlaneMessageValid && isGpsQualityValid) {
-        if (GPSSatelliteCountValid||isGpsQualityValid) {
+        if (GPSSatelliteCountValid || isGpsQualityValid) {
             //5.生成航线
             //LogUtil.log(TAG,"执行toGenerateKMZFile");
             toGenerateKMZFile(message);
@@ -208,18 +210,17 @@ public class TakeOffToPointManager extends BaseManager {
                     sendEvent2Server("飞行器自检异常:" + WaypointMissionExecuteState.find(missionStateCode).name() +
                             "-RTK:" + Movement.getInstance().getIs_fixed() + "-飞行器状态:" +
                             Movement.getInstance().getPlaneMessage() +
-                            "-GPS信号等级:" + Movement.getInstance().getQuality(),2);
+                            "-GPS信号等级:" + Movement.getInstance().getQuality(), 2);
                     TaskFailManager.getInstance().sendTaskFailMsg2Server(-1);
                 }
             }
 
-            if(verifyGpsAndMissionStateTimes==15){
+            if (verifyGpsAndMissionStateTimes == 15) {
                 toGenerateKMZFile(message);
                 verifyGpsAndMissionStateSuccess = true;
             }
 
 
-
         }
     }
 
@@ -236,11 +237,12 @@ public class TakeOffToPointManager extends BaseManager {
         Movement.getInstance().setTakeofftargetheight(message.getData().getTarget_height());
 
         MissionDataBean data = new Gson().fromJson(new Gson().toJson(message.getData()), MissionDataBean.class);
-        Boolean generateKmz=Generakmztools.getInstance().generateKmz(data);
-        LogUtil.log(TAG,"生成的boole"+generateKmz);
-        if(generateKmz==true){
+        Boolean generateKmz = Generakmztools.getInstance().generateKmz(data);
+        LogUtil.log(TAG, "生成的boole" + generateKmz);
+
+        if (generateKmz == true) {
             pushKMZFileToAircraft(message);
-        }else{
+        } else {
             sendEvent2Server("航线生成失败", 2);
         }
     }
@@ -260,6 +262,7 @@ public class TakeOffToPointManager extends BaseManager {
 
     /**
      * 6.上传指点航线
+     *
      * @param message
      */
     public void pushKMZFileToAircraft(MessageDown message) {
@@ -271,16 +274,16 @@ public class TakeOffToPointManager extends BaseManager {
             if (kmzInfo != null) {
 //                Utils.printJson(TAG,"航点详情:"+new Gson().toJson(kmzInfo));
                 WaylineWaylinesParseInfo waylineWaylinesParseInfo = kmzInfo.getWaylineWaylinesParseInfo();
-                WaylineMissionConfig configParseInfo= kmzInfo.getWaylineMissionConfigParseInfo().getConfig();
+                WaylineMissionConfig configParseInfo = kmzInfo.getWaylineMissionConfigParseInfo().getConfig();
                 if (waylineWaylinesParseInfo != null) {
                     List<Wayline> waylines = waylineWaylinesParseInfo.getWaylines();
-                    if (waylines != null && waylines.size() >0) {
+                    if (waylines != null && waylines.size() > 0) {
                         List<WaylineExecuteWaypoint> waypoints = waylines.get(0).getWaypoints();
                         if (waypoints != null && waypoints.size() > 0) {
                             //将航点列表保存在本地
-                                Movement.getInstance().setSpeed(configParseInfo.getGlobalTransitionalSpeed());
+                            Movement.getInstance().setSpeed(configParseInfo.getGlobalTransitionalSpeed());
 
-                                CurrentWayline.getInstance().setWaypoints(waypoints);
+                            CurrentWayline.getInstance().setWaypoints(waypoints);
                             LogUtil.log(TAG, "该航线有" + waypoints.size() + "个航点");
                         } else {
                             LogUtil.log(TAG, "WPMZManager getWaypointInfo有误");
@@ -344,7 +347,7 @@ public class TakeOffToPointManager extends BaseManager {
                                 LogUtil.log(TAG, "上传航线只处理一次回调" + ":" + new Gson().toJson(error));
                             }
                         } else {
-                            sendEvent2Server("航线第" + pushKMZFileTimes + "次上传失败,直接关机",2);
+                            sendEvent2Server("航线第" + pushKMZFileTimes + "次上传失败,直接关机", 2);
                             //待机
                             Movement.getInstance().setMode_code(0);
                             TaskFailManager.getInstance().sendTaskFailMsg2Server(-1);
@@ -378,7 +381,6 @@ public class TakeOffToPointManager extends BaseManager {
             CommonCallbacks.CompletionCallback callback = new CommonCallbacks.CompletionCallback() {
                 @Override
                 public void onSuccess() {
-
                     isMissionStart = true;
                     LogUtil.log(TAG, "航线第" + startMissionFailTimes + "次开始成功");
                     Movement.getInstance().setTask_status("in_progress");
@@ -387,6 +389,7 @@ public class TakeOffToPointManager extends BaseManager {
                     Movement.getInstance().setTask_current_step(23);
                     Movement.getInstance().setTakeoff_result(0);
                 }
+
                 @Override
                 public void onFailure(@NonNull IDJIError error) {
                     LogUtil.log(TAG, "航线执行失败:" + new Gson().toJson(error));
@@ -409,7 +412,7 @@ public class TakeOffToPointManager extends BaseManager {
                                     //待机
                                     Movement.getInstance().setMode_code(0);
 
-                                    sendEvent2Server("航线第" + startMissionFailTimes + "次开始失败,直接关机:" + "---" + new Gson().toJson(error) + "--" + Movement.getInstance().getQuality(),2);
+                                    sendEvent2Server("航线第" + startMissionFailTimes + "次开始失败,直接关机:" + "---" + new Gson().toJson(error) + "--" + Movement.getInstance().getQuality(), 2);
                                     TaskFailManager.getInstance().sendTaskFailMsg2Server(-1);
                                 }
                             }
@@ -425,7 +428,7 @@ public class TakeOffToPointManager extends BaseManager {
         }
     }
 
-    private void checkVtxWithDelay(Runnable onVtxReady) {
+    public void checkVtxWithDelay(Runnable onVtxReady) {
 
         if (Movement.getInstance().isVtx()) {
             // 图传正常，直接继续后面的流程
diff --git a/app/src/main/java/com/aros/apron/manager/WayLineExecutingInterruptManager.java b/app/src/main/java/com/aros/apron/manager/WayLineExecutingInterruptManager.java
index d5401642..2cc38016 100644
--- a/app/src/main/java/com/aros/apron/manager/WayLineExecutingInterruptManager.java
+++ b/app/src/main/java/com/aros/apron/manager/WayLineExecutingInterruptManager.java
@@ -38,7 +38,8 @@ public class WayLineExecutingInterruptManager extends BaseManager {
     public static WayLineExecutingInterruptManager getInstance() {
         return WayLineExecutingInterruptHolder.INSTANCE;
     }
-
+    public void initWayLineExecutingInterruptInfo() {
+    }
 
     public void onExecutingInterruptToDo() {
         IWaypointMissionManager missionManager = WaypointMissionManager.getInstance();
diff --git a/app/src/main/java/com/aros/apron/tools/ApronArucoDetect.java b/app/src/main/java/com/aros/apron/tools/ApronArucoDetect.java
index d70155c8..ca927cae 100644
--- a/app/src/main/java/com/aros/apron/tools/ApronArucoDetect.java
+++ b/app/src/main/java/com/aros/apron/tools/ApronArucoDetect.java
@@ -31,14 +31,13 @@ import java.util.concurrent.TimeUnit;
 
 import dji.sdk.keyvalue.key.FlightControllerKey;
 import dji.sdk.keyvalue.key.KeyTools;
-import dji.sdk.keyvalue.value.common.EmptyMsg;
 import dji.v5.common.callback.CommonCallbacks;
 import dji.v5.common.error.IDJIError;
 import dji.v5.manager.KeyManager;
 
 /**
  * 2帧一处理：0处理-1跳过-2处理-3跳过
- * 跳过的帧直接return，啥也不干，让飞机自己飘
+ * 先预处理检测，失败再回退原图检测
  */
 public class ApronArucoDetect  {
 
@@ -54,9 +53,18 @@ public class ApronArucoDetect  {
     private static final int TRIGGER_FRAME_THRESHOLD = 2;
 
     // ========== 原有状态 ==========
-    private boolean isTriggerSuccess;
+    private  boolean isTriggerSuccess;
     private boolean arucoNotFoundTag = false;
     private boolean isStartAruco = false;
+
+    public boolean isStartAruco() {
+        return isStartAruco;
+    }
+
+    public void setStartAruco(boolean startAruco) {
+        isStartAruco = startAruco;
+    }
+
     ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
     Future<?> lastFuture = null;
     private String TAG_LOG = getClass().getSimpleName();
@@ -104,8 +112,6 @@ public class ApronArucoDetect  {
     public void init() {
         pidControlX = new PIDControl(0.65f, 0.02f, 0.2f, 0.05f, 2.5f, 0.1f);
         pidControlY = new PIDControl(0.65f, 0.02f, 0.2f, 0.05f, 2.5f, 0.1f);
-//        pidControlX = new PIDControl(0.8f, 0.002f, 0.09f, 0.05f, 2.0f, 0.05f);
-//        pidControlY = new PIDControl(0.8f, 0.002f, 0.09f, 0.05f, 2.0f, 0.05f);
         pidControlX.reset();
         pidControlY.reset();
     }
@@ -113,7 +119,7 @@ public class ApronArucoDetect  {
     public boolean startFastStick;
     public boolean canLanding;
 
-    // ========== 【核心修改】主入口：2帧一处理 ==========
+    // ========== 【核心修改】主入口：2帧一处理 + 预处理回退 ==========
     public void detectArucoTags(int height, int width, byte[] data, Dictionary dictionary) {
         isTriggerSuccess = true;
         Movement.getInstance().setVirtualStickEnableReason(2);
@@ -154,7 +160,7 @@ public class ApronArucoDetect  {
         else if (ultHeight >= 5) { LENS_OFFSET_X = 30; LENS_OFFSET_Y = 20; }
         else { LENS_OFFSET_X = 55; LENS_OFFSET_Y = 35; }
 
-        // ========== 原有完整逻辑（一点不改） ==========
+        // ========== 【核心逻辑】先预处理检测，失败回退原图 ==========
         lastFuture = executor.schedule(new Runnable() {
             @Override
             public void run() {
@@ -166,42 +172,33 @@ public class ApronArucoDetect  {
                     Mat grayImgMat = new Mat();
                     Imgproc.cvtColor(rgbMat, grayImgMat, Imgproc.COLOR_BGR2GRAY);
 
-                    // ========== 【极致容错】双重检测策略 ==========
-                    // 策略1：增强图检测（适应低光/反光）
-                    Mat enhancedMat = createEnhancedImage(grayImgMat);
                     MatOfInt ids = new MatOfInt();
                     List<Mat> corners = new ArrayList<>();
+                    Mat corner6 = new Mat();
 
-                    DetectorParameters params = createUltraTolerantParams();
-                    ArucoDetector detector = new ArucoDetector(dictionary, params);
-                    detector.detectMarkers(enhancedMat, corners, ids);
+                    DetectorParameters parameters = new DetectorParameters();
+                    ArucoDetector detector = new ArucoDetector(dictionary, parameters);
 
-                    // 策略2：如果失败，用原图兜底（适应过曝）
+                    // ========== 【关键修改】第1次：预处理图检测 ==========
+                    Mat processedMat = fixedPreprocess(grayImgMat);
+                    detector.detectMarkers(processedMat, corners, ids);
+                    LogUtil.log(TAG_LOG, "预处理图检测: " + (ids.empty() ? "未检出" : "成功，数量=" + corners.size()));
+
+                    // ========== 【关键修改】第2次：如果失败，回退原图检测 ==========
                     if (ids.empty()) {
-                        corners.clear();
+                        LogUtil.log(TAG_LOG, "预处理失败，回退原图检测");
+                        corners.clear(); // 清空之前的结果
                         detector.detectMarkers(grayImgMat, corners, ids);
+                        LogUtil.log(TAG_LOG, "原图检测: " + (ids.empty() ? "仍未检出" : "成功，数量=" + corners.size()));
                     }
 
-                    // 策略3：如果还失败，降采样检测（适应高分辨率模糊）
-                    if (ids.empty()) {
-                        corners.clear();
-                        Mat downscaled = new Mat();
-                        Imgproc.resize(grayImgMat, downscaled, new Size(grayImgMat.width() * 0.8, grayImgMat.height() * 0.8));
-                        detector.detectMarkers(downscaled, corners, ids);
-                        // 坐标映射回原图比例
-                        if (!ids.empty()) {
-                            for (Mat corner : corners) {
-                                Core.multiply(corner, new Scalar(1.25, 1.25), corner);
-                            }
-                        }
-                        downscaled.release();
-                    }
+                    // 释放预处理图（必须！避免内存泄漏）
+                    processedMat.release();
 
+                    // 只保留6号码
                     ids = keepOnly6(ids, corners);
 
                     boolean marker6Found = false;
-                    Mat corner6 = new Mat();
-
                     if (!ids.empty()) {
                         trycount = 0;
                         arucoNotFoundTag = false;
@@ -251,17 +248,6 @@ public class ApronArucoDetect  {
                                                 LogUtil.log(TAG_LOG, "延迟结束，开始速降");
                                             }
                                         }, 300);
-
-                                        // 清理资源
-                                        enhancedMat.release();
-                                        grayImgMat.release();
-                                        rgbMat.release();
-                                        yuvMat.release();
-                                        ids.release();
-                                        if (!corners.isEmpty()) {
-                                            for (Mat c : corners) if (c != null) c.release();
-                                        }
-                                        isStartAruco = false;
                                         return;
                                     }
                                 } else {
@@ -295,20 +281,8 @@ public class ApronArucoDetect  {
                                 DroneHelper.getInstance().moveVxVyYawrateHeight(0f, 0f, 0f, 3f);
                                 if (dropTimes > Integer.parseInt(AMSConfig.getInstance().getAlternateLandingTimes())) {
                                     LogUtil.log(TAG_LOG, "超过复降限制,去备降点");
-
                                     AlternateLandingManager.getInstance().startTaskProcess(null);
                                     Movement.getInstance().setAlternate(true);
-
-                                    // 清理资源
-                                    enhancedMat.release();
-                                    grayImgMat.release();
-                                    rgbMat.release();
-                                    yuvMat.release();
-                                    ids.release();
-                                    if (!corners.isEmpty()) {
-                                        for (Mat c : corners) if (c != null) c.release();
-                                    }
-                                    isStartAruco = false;
                                     return;
                                 }
                                 if (dropTimesTag) {
@@ -323,10 +297,11 @@ public class ApronArucoDetect  {
                         } else if (lostDuration > 8000) {
                             LogUtil.log(TAG_LOG, "判定未识别到二维码,飞往备降点");
                             AlternateLandingManager.getInstance().startTaskProcess(null);
+                            Movement.getInstance().setAlternate(true);
                         }
                     }
-                    // 原有资源释放
-                    enhancedMat.release();
+
+                    // 释放资源
                     grayImgMat.release();
                     rgbMat.release();
                     yuvMat.release();
@@ -346,9 +321,7 @@ public class ApronArucoDetect  {
             }
         }, 0, TimeUnit.MILLISECONDS);
     }
-
     // ========== 以下全部原有方法，一点不改 ==========
-
     private static MatOfInt keepOnly6(MatOfInt ids, List<Mat> corners) {
         if (ids.empty()) return ids;
         int[] idArr = ids.toArray();
@@ -365,87 +338,101 @@ public class ApronArucoDetect  {
         corners.addAll(tmpCorners);
         return new MatOfInt(newIds);
     }
-
-    // ========== 【极致容错】图像增强：全高度段通用 ==========
-    private Mat createEnhancedImage(Mat src) {
+    /**
+     * 简化预处理：双边滤波+CLAHE+高反差保留
+     * 参数别改：适配H30T广角画质
+     */
+    /**
+     * 增强版预处理：双边滤波 + CLAHE + Unsharp Mask（反锐化掩膜）
+     * 参数别改：amount=1.2 是 FPV 运动模糊的推荐强度
+     */
+    private Mat fixedPreprocess(Mat src) {
         Mat result = new Mat();
         try {
-            // 1. 多尺度CLAHE（适应不同亮度）
-            Mat claheMat = new Mat();
-            Imgproc.createCLAHE(2.0, new Size(8, 8)).apply(src, claheMat);
+            // 【新增】判断亮度，区分白天/夜景
+            Scalar meanValue = Core.mean(src);
+            double meanBrightness = meanValue.val[0];
 
-            // 2. 中值滤波去噪（比双边快，保边足够）
+            if (meanBrightness < 80) {  // 夜景模式（FPV晚上通常<80）
+                LogUtil.log(TAG_LOG, "【夜景预处理】亮度=" + (int)meanBrightness);
+
+                // Step 1: 中值滤波（去椒盐噪点，比双边滤波更适合夜景）
+                Mat denoised = new Mat();
+                Imgproc.medianBlur(src, denoised, 5);  // 5x5，去噪且保边
+
+                // Step 2: 直方图均衡化（全局对比度拉伸，把黑灰白拉开）
+                Mat equalized = new Mat();
+                Imgproc.equalizeHist(denoised, equalized);
+
+                // Step 3: 轻度CLAHE（局部微调，避免过曝）
+                Mat clahe = new Mat();
+                Imgproc.createCLAHE(2.0, new Size(8, 8)).apply(equalized, clahe);  // 2.0比白天4.0保守
+
+                // Step 4: 夜景下降低锐化强度（避免放大残余噪点）
+                Mat blurred = new Mat();
+                Imgproc.GaussianBlur(clahe, blurred, new Size(0, 0), 2.0);
+                Mat detail = new Mat();
+                Core.subtract(clahe, blurred, detail);
+
+                double amount = 0.6;  // 【关键】夜景降到0.6，白天1.2会放大噪点
+                Core.multiply(detail, new Scalar(amount), detail);
+                Core.add(clahe, detail, result);
+
+                // 限制范围
+                Core.min(result, new Scalar(255), result);
+                Core.max(result, new Scalar(0), result);
+
+                // 释放
+                denoised.release();
+                equalized.release();
+                blurred.release();
+                detail.release();
+                clahe.release();
+
+                LogUtil.log(TAG_LOG, "夜景处理完成：中值滤波+均衡化+弱锐化(amount=" + amount + ")");
+                return result;
+            }
+
+            // 【原逻辑】白天模式（亮度>=80）
+            LogUtil.log(TAG_LOG, "【白天预处理】亮度=" + (int)meanBrightness);
+
+            // Step 1: 双边滤波（保边缘降噪）
             Mat filtered = new Mat();
-            Imgproc.medianBlur(claheMat, filtered, 5);
-            claheMat.release();
+            Imgproc.bilateralFilter(src, filtered, 9, 75, 75);
 
-            // 3. 自适应阈值（块大小动态，适应全高度）
-            Mat binary = new Mat();
-            Imgproc.adaptiveThreshold(filtered, binary, 255,
-                    Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,
-                    Imgproc.THRESH_BINARY, 41, 3);  // 块41更大，常数3更敏感
+            // Step 2: CLAHE 局部对比度增强
+            Mat clahe = new Mat();
+            Imgproc.createCLAHE(4.0, new Size(8, 8)).apply(filtered, clahe);
             filtered.release();
 
-            // 4. 形态学操作（连接断裂边框）
-            Mat morph = new Mat();
-            Mat kernel = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(5, 5));
-            Imgproc.morphologyEx(binary, morph, Imgproc.MORPH_CLOSE, kernel);
-            kernel.release();
-            binary.release();
-
-            // 5. 轻度锐化（突出边缘，不过度）
-            Mat sharpened = new Mat();
+            // Step 3: Unsharp Mask（反锐化掩膜）
             Mat blurred = new Mat();
-            Imgproc.GaussianBlur(morph, blurred, new Size(0, 0), 3.0);
-            Core.addWeighted(morph, 1.3, blurred, -0.3, 0, sharpened);
-            morph.release();
-            blurred.release();
+            Imgproc.GaussianBlur(clahe, blurred, new Size(0, 0), 2.0);
 
-            return sharpened;
+            Mat detail = new Mat();
+            Core.subtract(clahe, blurred, detail);
+
+            double amount = 1.2;  // 白天可以用1.2
+            Core.multiply(detail, new Scalar(amount), detail);
+            Core.add(clahe, detail, result);
+
+            Core.min(result, new Scalar(255), result);
+            Core.max(result, new Scalar(0), result);
+
+            blurred.release();
+            detail.release();
+            clahe.release();
+
+            LogUtil.log(TAG_LOG, "白天处理完成：双边滤波+CLAHE+UnsharpMask(amount=" + amount + ")");
+            return result;
 
         } catch (Exception e) {
-            LogUtil.log(TAG_LOG, "增强失败: " + e.getMessage());
+            LogUtil.log(TAG_LOG, "预处理失败: " + e.getMessage());
             src.copyTo(result);
             return result;
         }
     }
 
-
-
-    private DetectorParameters createUltraTolerantParams() {
-        DetectorParameters params = new DetectorParameters();
-
-        // 全高度段：4dm=375px, 9dm=190px, 50dm=19px
-        params.set_minMarkerPerimeterRate(0.003f);  // 降到0.003，19像素也能检
-
-        // 畸变/反光/模糊宽容
-        params.set_polygonalApproxAccuracyRate(0.12f);  // 更松
-
-        params.set_cornerRefinementMethod(1);  // SUBPIX
-        params.set_cornerRefinementWinSize(3);  // 降到3更快
-        params.set_cornerRefinementMaxIterations(30);
-        params.set_cornerRefinementMinAccuracy(0.12f);  // 放宽收敛
-
-        // 阈值范围更大，适应全光照
-        params.set_adaptiveThreshWinSizeMin(3);
-        params.set_adaptiveThreshWinSizeMax(63);  // 更大
-        params.set_adaptiveThreshWinSizeStep(10);
-        params.set_adaptiveThreshConstant(3);  // 配合预处理
-
-        params.set_minCornerDistanceRate(0.02f);
-        params.set_minMarkerLengthRatioOriginalImg(0.03f);  // 更宽容
-        params.set_minDistanceToBorder(1);  // 边缘也检
-
-        params.set_perspectiveRemovePixelPerCell(2);  // 降到2，小像素精细
-        params.set_perspectiveRemoveIgnoredMarginPerCell(0.2f);
-
-        params.set_maxErroneousBitsInBorderRate(0.6f);  // 60%容错
-
-        params.set_detectInvertedMarker(false);
-
-        return params;
-    }
-
     private double calculateDistance(Point p1, Point p2) {
         double dx = p2.x - p1.x;
         double dy = p2.y - p1.y;
@@ -515,8 +502,6 @@ public class ApronArucoDetect  {
         double pixelWidth = Math.sqrt(Math.pow(pts[1].x - pts[0].x, 2) +
                 Math.pow(pts[1].y - pts[0].y, 2));
 
-
-
         if (currentHeight >= 10 && currentHeight <= 55) {
             double yawError = calculateYawErrorFromCorners(pts);
             double absError = Math.abs(yawError);
@@ -556,6 +541,7 @@ public class ApronArucoDetect  {
                 vx = 0f;
             }
 
+
             if (Math.abs(errY) > 120) {
                 vy = rawVy > 0 ? 0.135f : -0.135f;
             } else if (Math.abs(errY) > 80) {
@@ -596,7 +582,7 @@ public class ApronArucoDetect  {
 
     private void performOperation() {
         LogUtil.log(TAG_LOG, "快速下拉中..." + handlerCallbackCount);
-        DroneHelper.getInstance().moveVxVyYawrateHeight(0f, 0f, 0f, -4);
+        DroneHelper.getInstance().moveVxVyYawrateHeight(0f, 0f, 0f, -5);
         handlerCallbackCount++;
     }
 
diff --git a/app/src/main/java/com/aros/apron/tools/BasePreference.java b/app/src/main/java/com/aros/apron/tools/BasePreference.java
index c01485d5..0df01ca6 100644
--- a/app/src/main/java/com/aros/apron/tools/BasePreference.java
+++ b/app/src/main/java/com/aros/apron/tools/BasePreference.java
@@ -34,7 +34,7 @@ public class BasePreference {
     }  
   
     protected void setBoolean(String key, boolean value) {
-        sp.edit().putBoolean(key, value).apply();  
+        sp.edit().putBoolean(key, value).commit();  
     }  
   
     protected boolean getBoolean(String key) {
diff --git a/app/src/main/java/com/aros/apron/tools/DroneHelper.java b/app/src/main/java/com/aros/apron/tools/DroneHelper.java
index b2aa70e0..d1ccb150 100644
--- a/app/src/main/java/com/aros/apron/tools/DroneHelper.java
+++ b/app/src/main/java/com/aros/apron/tools/DroneHelper.java
@@ -48,18 +48,59 @@ public class DroneHelper {
     public static DroneHelper getInstance() {
         return DroneHelperHolder.INSTANCE;
     }
+    private boolean isExitInProgress = false; // 新增标志
 
+    // DroneHelper.java
+    private int exitVirtualStickRetryCount = 0;
+    private static final int MAX_EXIT_RETRY = 10;
 
     public void exitVirtualStickMode() {
+        exitVirtualStickMode(null);
+    }
+
+    public void exitVirtualStickMode(CommonCallbacks.CompletionCallback callback) {
+        if (isExitInProgress) {
+            LogUtil.log(TAG, "释放操作已在进行中，跳过重复调用");
+            return;
+        }
+        isExitInProgress = true;
+        exitVirtualStickWithRetry(callback);
+    }
+
+    private void exitVirtualStickWithRetry(CommonCallbacks.CompletionCallback callback) {
         VirtualStickManager.getInstance().disableVirtualStick(new CommonCallbacks.CompletionCallback() {
             @Override
             public void onSuccess() {
+                exitVirtualStickRetryCount = 0;
+                isExitInProgress = false; // 重置标志
                 LogUtil.log(TAG, "控制权已取消");
+                if (callback != null) {
+                    callback.onSuccess();
+                }
             }
 
             @Override
             public void onFailure(@NonNull IDJIError error) {
                 LogUtil.log(TAG, "取消控制权失败:" + error.toString());
+                if (exitVirtualStickRetryCount < MAX_EXIT_RETRY) {
+                    exitVirtualStickRetryCount++;
+                    LogUtil.log(TAG, "重试释放控制权 (" + exitVirtualStickRetryCount + "/" + MAX_EXIT_RETRY + ")");
+                    new Handler().postDelayed(new Runnable() {
+                        @Override
+                        public void run() {
+                            if (isExitInProgress) { // 检查标志
+                                exitVirtualStickWithRetry(callback);
+                            }
+                        }
+                    }, 1000);
+                } else {
+                    LogUtil.log(TAG, "多次尝试释放控制权失败，放弃");
+                    exitVirtualStickRetryCount = 0;
+                    isExitInProgress = false; // 重置标志
+                    if (callback != null) {
+                        callback.onFailure(error);
+                    }
+                }
             }
 
         });
@@ -121,10 +162,10 @@ public class DroneHelper {
         Boolean cameraConnect = KeyManager.getInstance().getValue(KeyTools.createKey(CameraKey.
                 KeyConnection, ComponentIndexType.PORT_1));
         if (cameraConnect!=null&&cameraConnect) {
-            KeyManager.getInstance().setValue(KeyTools.createCameraKey(CameraKey.KeyCameraFocusMode, ComponentIndexType.PORT_1, CameraLensType.CAMERA_LENS_WIDE), CameraFocusMode.AF, new CommonCallbacks.CompletionCallback() {
+            KeyManager.getInstance().setValue(KeyTools.createCameraKey(CameraKey.KeyCameraFocusMode, ComponentIndexType.PORT_1, CameraLensType.CAMERA_LENS_WIDE), CameraFocusMode.AFC, new CommonCallbacks.CompletionCallback() {
                 @Override
                 public void onSuccess() {
-                    LogUtil.log(TAG, "设置对焦模式自动对焦");
+                   LogUtil.log(TAG, "设置对焦模式自动对焦");
                 }
                 @Override
                 public void onFailure(@NonNull IDJIError idjiError) {
@@ -140,6 +181,32 @@ public class DroneHelper {
     private int setGimbalPitchDegreeFailTimes = 0;
     private boolean isGimbalPitchDegree = false;
 
+    public void setGimbalPitchdown(){
+        Boolean isConnect = KeyManager.getInstance().getValue(KeyTools.createKey(GimbalKey.
+                KeyConnection, ComponentIndexType.PORT_1));
+        if (isConnect!=null&&isConnect) {
+            GimbalAngleRotation rotation = new GimbalAngleRotation();
+            rotation.setMode(GimbalAngleRotationMode.ABSOLUTE_ANGLE);
+            rotation.setYaw(0.0);
+            rotation.setRoll(0.0);
+            rotation.setPitch(-90.0);
+            KeyManager.getInstance().performAction(KeyTools.createKey(GimbalKey.KeyRotateByAngle, ComponentIndexType.PORT_1), rotation, new CommonCallbacks.CompletionCallbackWithParam<EmptyMsg>() {
+                        @Override
+                        public void onSuccess(EmptyMsg emptyMsg) {
+                            LogUtil.log(TAG, "云台朝下");
+                        }
+
+                        @Override
+                        public void onFailure(@NonNull IDJIError error) {
+                            LogUtil.log(TAG, "fail:" + error.toString());
+                        }
+                    }
+            );
+        } else {
+            LogUtil.log(TAG, "云台未连接");
+        }
+    }
+
     public void setGimbalPitchDegree() {
         //通知拓挂载云台朝下
 //        PayloadWidgetManager.getInstance().sendMsgToLeftPayload("#TPPG2wPTZ0A76");
diff --git a/app/src/main/java/com/aros/apron/tools/Generakmztools.java b/app/src/main/java/com/aros/apron/tools/Generakmztools.java
index 016f0b0e..1179a68f 100644
--- a/app/src/main/java/com/aros/apron/tools/Generakmztools.java
+++ b/app/src/main/java/com/aros/apron/tools/Generakmztools.java
@@ -8,6 +8,8 @@ import com.aros.apron.entity.Movement;
 import com.aros.apron.manager.TakeOffToPointManager;
 import com.aros.apron.manager.TaskFailManager;
 import com.dji.wpmzsdk.common.data.Template;
+import com.dji.wpmzsdk.common.utils.kml.GeoidManager;
+import com.dji.wpmzsdk.common.utils.kml.GpsUtils;
 import com.dji.wpmzsdk.manager.WPMZManager;
 
 import java.io.File;
@@ -30,11 +32,13 @@ public class Generakmztools extends BaseManager {
     public static Generakmztools getInstance() { return Holder.INSTANCE; }
 
     public Boolean generateKmz(MissionDataBean data) {
+        LogUtil.log("qwq","开始生成一键起飞航线");
         sendEvent2Server("开始生成一键起飞航线", 1);
         LocationCoordinate3D lat = KeyManager.getInstance().getValue(KeyTools.createKey(FlightControllerKey.
                 KeyAircraftLocation3D));
 
 
+
         int retryCount = 0;
         final int MAX_RETRY = 60;
 
@@ -77,6 +81,7 @@ public class Generakmztools extends BaseManager {
         File root = new File("/storage/self/primary/DJIDemo/cache/kmz");
         if (!root.exists()) root.mkdirs();
         File kmz = new File(root, "takeofftopoint.kmz");
+        LogUtil.log(TAG,"高度："+lat.getAltitude());
 
         /* 1. <wpml:mission> 基本信息 */
         WaylineMission mission = new WaylineMission();
@@ -131,13 +136,20 @@ public class Generakmztools extends BaseManager {
         WaylineWaypoint wp = new WaylineWaypoint();
 
         //初始点
+        double wp1heighet= GpsUtils.egm96Altitude(lat.getAltitude(),lat.getLatitude(),lat.getLongitude());
+        //double wpheight=GpsUtils.egm96Altitude(data.getTargetHeight(),data.getTargetLatitude(),data.getTargetLongitude());
+
+        //double wp1ellheighet=GpsUtils.wgs84Altitude();
+        double wpellheight=GpsUtils.wgs84Altitude(data.getTargetHeight(),data.getTargetLatitude(),data.getTargetLongitude());
+
         wp1.setWaypointIndex(0);
         wp1.setLocation(new WaylineLocationCoordinate2D(lat.getLatitude(), lat.getLongitude()));
+        //wp1.setLocation(new WaylineLocationCoordinate2D(data.getTargetLatitude(), data.getTargetLongitude()));
         //wp1.setHeight((double)data.getCommanderFlightHeight());
-        wp1.setHeight(data.getTargetHeight()- Movement.getInstance().getHeight());
-       // wp1.setUseGlobalFlightHeight(true);
-        //椭球高
-        wp1.setEllipsoidHeight(data.getTargetHeight()- Movement.getInstance().getHeight());
+        wp1.setHeight(data.getTargetHeight());
+        //wp.setUseGlobalFlightHeight(true);
+        wp1.setEllipsoidHeight(wpellheight);
+
         wp1.setUseStraightLine(true);
         wp1.setUseGlobalTurnParam(true);
         wp1.setUseGlobalYawParam(true);
@@ -151,10 +163,13 @@ public class Generakmztools extends BaseManager {
         wp.setWaypointIndex(1);
         wp.setLocation(new WaylineLocationCoordinate2D(data.getTargetLatitude(), data.getTargetLongitude()));
         //wp.setHeight((double)data.getCommanderFlightHeight());
-        wp.setHeight(data.getTargetHeight()- Movement.getInstance().getHeight());
-       // wp.setUseGlobalFlightHeight(true);
+        wp.setHeight(data.getTargetHeight());
+        //wp.setUseGlobalFlightHeight(true);
         //椭球高
-        wp.setEllipsoidHeight(data.getTargetHeight()- Movement.getInstance().getHeight());
+        wp.setEllipsoidHeight(wpellheight);
+
+
+
         wp.setUseStraightLine(true);
         wp.setUseGlobalTurnParam(true);
         wp.setUseGlobalYawParam(true);
@@ -195,7 +210,8 @@ public class Generakmztools extends BaseManager {
         /* 5. <wpml:coordinateParam> */
         WaylineCoordinateParam coordParam = new WaylineCoordinateParam();
         coordParam.setCoordinateMode(WaylineCoordinateMode.WGS84);
-        coordParam.setAltitudeMode(WaylineAltitudeMode.RELATIVE_TO_START_POINT);
+
+        coordParam.setAltitudeMode(WaylineAltitudeMode.EGM96);
         coordParam.setPositioningType(WaylinePositioningType.GPS);
 
         /* 6. <wpml:template> */
diff --git a/app/src/main/java/com/aros/apron/tools/PreferenceUtils.java b/app/src/main/java/com/aros/apron/tools/PreferenceUtils.java
index 9f76095c..656dd7d5 100644
--- a/app/src/main/java/com/aros/apron/tools/PreferenceUtils.java
+++ b/app/src/main/java/com/aros/apron/tools/PreferenceUtils.java
@@ -28,6 +28,7 @@ public class PreferenceUtils extends BasePreference {
     private String NEED_TRIGGER_APRON_ARUCO_LAND = "need_trigger_apron_aruco_land";//是否需要触发crash后继续降落到机库
     private String NEED_TRIGGER_ALTER_ARUCO_LAND = "need_trigger_alter_aruco_land";//是否需要触发crash后继续降落到备降点
     private String TRIGGER_TO_ALTERNATE_POINT = "trigger_to_alternate_point";//是否需要触发crash后继续降落
+    private String FIRST_MISSION_RECEIVED = "first_mission_received";//是否第一次收到航线指令
 
     //AMS配置清单
     private String HAVA_RTK = "have_rtk";
@@ -75,13 +76,21 @@ public class PreferenceUtils extends BasePreference {
 
 
     public void setFlightId(String flightId) {
-        setString(FLIGHT_ID,flightId);
+        setString(FLIGHT_ID, flightId);
     }
 
     public String getFlightId() {
         return getString(FLIGHT_ID);
     }
 
+    public void setFirstMissionReceived(boolean firstMissionReceived) {
+        setBoolean(FIRST_MISSION_RECEIVED, firstMissionReceived);
+    }
+
+    public boolean isFirstMissionReceived() {
+        return getBoolean(FIRST_MISSION_RECEIVED);
+    }
+
     public String getBucketName() {
         return getString(BUCKET_NAME);
     }
diff --git a/app/src/main/res/layout-land/activity_config.xml b/app/src/main/res/layout-land/activity_config.xml
index 93bdf280..ee11cb9a 100644
--- a/app/src/main/res/layout-land/activity_config.xml
+++ b/app/src/main/res/layout-land/activity_config.xml
@@ -751,7 +751,14 @@
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:layout_marginLeft="10dp"
-                            android:text="无" />
+                            android:text="下视" />
+                        <RadioButton
+                            android:id="@+id/rb_camera_mix"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="10dp"
+                            android:text="融合" />
+
                     </RadioGroup>
                 </LinearLayout>
 
diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml
index a6e5d057..9bd4daec 100644
--- a/app/src/main/res/layout-land/activity_main.xml
+++ b/app/src/main/res/layout-land/activity_main.xml
@@ -292,7 +292,7 @@
             app:layout_constraintWidth_percent="0.95"
             app:uxsdk_titleBarBackgroundColor="@color/uxsdk_black" />
         <LinearLayout
-            android:visibility="visible"
+            android:visibility="gone"
             android:orientation="horizontal"
             android:layout_width="match_parent"
             android:layout_height="100dp"
diff --git a/app/src/main/res/layout/activity_config.xml b/app/src/main/res/layout/activity_config.xml
index 52f4c7b2..d4789cb8 100644
--- a/app/src/main/res/layout/activity_config.xml
+++ b/app/src/main/res/layout/activity_config.xml
@@ -746,12 +746,19 @@
                             android:layout_height="wrap_content"
                             android:layout_marginLeft="10dp"
                             android:text="中间" />
+
                         <RadioButton
                             android:id="@+id/rb_camera_null"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:layout_marginLeft="10dp"
-                            android:text="无" />
+                            android:text="下视" />
+                        <RadioButton
+                            android:id="@+id/rb_camera_mix"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="10dp"
+                            android:text="融合" />
                     </RadioGroup>
                 </LinearLayout>
 
