作者 潘浩彬

合并分支 'dev_00.00.02.20' 到 'dev'

新振膜音量修改

zy燕工程包含
非大型文件包含

查看合并请求 !24

要显示太多修改。

为保证性能只显示 18 of 18+ 个文件。

@@ -7,27 +7,73 @@ linux_kernel @@ -7,27 +7,73 @@ linux_kernel
7 7
8 project_build/AUTEL_道通PSDK 8 project_build/AUTEL_道通PSDK
9 project_build/GDU_普宙PSDK 9 project_build/GDU_普宙PSDK
10 -project_build/ZY_珠海紫燕PSDK  
11 10
12 -project_build/Only_Serial/*  
13 -!project_build/Only_Serial/application  
14 -!project_build/Only_Serial/CMakeLists.txt 11 +# project_build/Only_Serial/*
  12 +# !project_build/Only_Serial/application
  13 +# !project_build/Only_Serial/CMakeLists.txt
15 14
16 15
17 -project_build/DJI_大疆PSDK/*  
18 -!project_build/DJI_大疆PSDK/samples  
19 -project_build/DJI_大疆PSDK/samples/sample_c++ 16 +# project_build/DJI_大疆PSDK/*
  17 +# !project_build/DJI_大疆PSDK/samples
  18 +# project_build/DJI_大疆PSDK/samples/sample_c++
20 19
21 -project_build/DJI_大疆PSDK/samples/sample_c/platform/*  
22 -!project_build/DJI_大疆PSDK/samples/sample_c/platform/linux 20 +# project_build/DJI_大疆PSDK/samples/sample_c/platform/*
  21 +# !project_build/DJI_大疆PSDK/samples/sample_c/platform/linux
23 22
24 23
25 -project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/*  
26 -!project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/application  
27 -!project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/hal  
28 -!project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/CMakeLists.txt 24 +# project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/*
  25 +# !project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/application
  26 +# !project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/hal
  27 +# !project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/CMakeLists.txt
29 28
30 project_build/Payload-SDK-release-v3.11.0/* 29 project_build/Payload-SDK-release-v3.11.0/*
31 30
32 31
33 -project_build/Attention_提示程序  
  32 +# project_build/Attention_提示程序
  33 +
  34 +# Prerequisites
  35 +*.d
  36 +
  37 +# Compiled Object files
  38 +*.slo
  39 +*.lo
  40 +*.o
  41 +*.obj
  42 +
  43 +# Precompiled Headers
  44 +*.gch
  45 +*.pch
  46 +
  47 +# Compiled Dynamic libraries
  48 +*.so
  49 +*.dylib
  50 +*.dll
  51 +*.so*
  52 +
  53 +# Fortran module files
  54 +*.mod
  55 +*.smod
  56 +
  57 +# Compiled Static libraries
  58 +*.lai
  59 +*.la
  60 +*.a
  61 +*.lib
  62 +
  63 +# 执行程序
  64 +*.exe
  65 +*.out
  66 +*.app
  67 +build
  68 +
  69 +# 编译文件
  70 +*.bin
  71 +*.dir
  72 +Upgrade_Package
  73 +
  74 +# 存档文件
  75 +*.png
  76 +*.jpg
  77 +*.mp4
  78 +*.h264
  79 +*.pdf
@@ -138,7 +138,10 @@ @@ -138,7 +138,10 @@
138 "jzsdk_smt_code.h": "c", 138 "jzsdk_smt_code.h": "c",
139 "volume.h": "c", 139 "volume.h": "c",
140 "jzsdk_data_transmisson.h": "c", 140 "jzsdk_data_transmisson.h": "c",
141 - "jzsdk_monitor.h": "c" 141 + "jzsdk_monitor.h": "c",
  142 + "*.bak": "c",
  143 + "ziyan_sdk_config.h": "c",
  144 + "test_payload_cam_emu_base.h": "c"
142 }, 145 },
143 "Codegeex.GenerationPreference": "automatic", 146 "Codegeex.GenerationPreference": "automatic",
144 "C_Cpp.dimInactiveRegions": false, 147 "C_Cpp.dimInactiveRegions": false,
1 # 编译链的配置 1 # 编译链的配置
2 2
3 #1、编译链与设备类型的选择 3 #1、编译链与设备类型的选择
4 -set(DEVICE_NAME JZ_U3S) 4 +set(DEVICE_NAME JZ_U3D)
5 #上一行为禁止修改行 5 #上一行为禁止修改行
6 6
7 message("**************************JZSDK构建编译开始***************************\n") 7 message("**************************JZSDK构建编译开始***************************\n")
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 #define VERSION_CHOOSE_H 7 #define VERSION_CHOOSE_H
8 #include "JZsdk_Base/JZsdk_Code/JZsdk_DeviceCode.h" 8 #include "JZsdk_Base/JZsdk_Code/JZsdk_DeviceCode.h"
9 //1~10行 除了D可以修改版本选择 禁止动任何东西 9 //1~10行 除了D可以修改版本选择 禁止动任何东西
10 -#define DEVICE_VERSION JZ_U3S 10 +#define DEVICE_VERSION JZ_U3D
11 11
12 //禁止修改行 选择是串口程序 还是 psdk程序 12 //禁止修改行 选择是串口程序 还是 psdk程序
13 #define APP_VERSION APP_PSDK 13 #define APP_VERSION APP_PSDK
@@ -80,7 +80,7 @@ extern "C" { @@ -80,7 +80,7 @@ extern "C" {
80 // #define MAX_TTS_VOLUME (81) 80 // #define MAX_TTS_VOLUME (81)
81 81
82 //2025 4 10 改滤波 降低到u53% 82 //2025 4 10 改滤波 降低到u53%
83 -#define MAX_VOLUME (63) 83 + #define MAX_VOLUME (63)
84 #define MAX_TTS_VOLUME (70) 84 #define MAX_TTS_VOLUME (70)
85 85
86 #elif DEVICE_VERSION == JZ_U30 86 #elif DEVICE_VERSION == JZ_U30
@@ -373,7 +373,7 @@ static T_JZsdkReturnCode Megaphone_MaxVolume_Init() @@ -373,7 +373,7 @@ static T_JZsdkReturnCode Megaphone_MaxVolume_Init()
373 g_TTS_Max_volume = MAX_TTS_VOLUME; 373 g_TTS_Max_volume = MAX_TTS_VOLUME;
374 } 374 }
375 375
376 -#elif DEVICE_VERSION == JZ_U3S || DEVICE_VERSION == JZ_U3 376 +#elif DEVICE_VERSION == JZ_U3S || DEVICE_VERSION == JZ_U3 || DEVICE_VERSION == JZ_U30 || DEVICE_VERSION == JZ_U3D
377 377
378 //检索版本号,振膜更换版本 378 //检索版本号,振膜更换版本
379 if (HardwareInfo_GetVersion(0) == 25 379 if (HardwareInfo_GetVersion(0) == 25
@@ -389,26 +389,7 @@ static T_JZsdkReturnCode Megaphone_MaxVolume_Init() @@ -389,26 +389,7 @@ static T_JZsdkReturnCode Megaphone_MaxVolume_Init()
389 } 389 }
390 else 390 else
391 { 391 {
392 - g_Max_volume = MAX_VOLUME;  
393 - g_TTS_Max_volume = MAX_TTS_VOLUME;  
394 - }  
395 -  
396 -#elif DEVICE_VERSION == JZ_U3D || DEVICE_VERSION == JZ_U30  
397 -  
398 - //检索版本号,振膜更换版本  
399 - if (HardwareInfo_GetVersion(0) == 25  
400 - && HardwareInfo_GetVersion(1) == 5  
401 - && HardwareInfo_GetVersion(2) == 15  
402 - && HardwareInfo_GetVersion(3) == 0  
403 - )  
404 - {  
405 - JZSDK_LOG_INFO("音量为振膜更换版本");  
406 - g_Max_volume = MAX_VOLUME * 95 / 100;  
407 - g_TTS_Max_volume = MAX_TTS_VOLUME * 95 / 100;  
408 - }  
409 -  
410 - else  
411 - { 392 + JZSDK_LOG_INFO("音量为最初硬件");
412 g_Max_volume = MAX_VOLUME; 393 g_Max_volume = MAX_VOLUME;
413 g_TTS_Max_volume = MAX_TTS_VOLUME; 394 g_TTS_Max_volume = MAX_TTS_VOLUME;
414 } 395 }
  1 +cmake_minimum_required(VERSION 2.8)
  2 +
  3 +if (NOT USE_SYSTEM_ARCH)
  4 + # select use platform 'LINUX' or 'RTOS' here, reset cache and reload cmake project
  5 + set(USE_SYSTEM_ARCH LINUX)
  6 +endif ()
  7 +
  8 +if (USE_SYSTEM_ARCH MATCHES RTOS)
  9 + cmake_minimum_required(VERSION 3.15)
  10 + set(CMAKE_C_COMPILER arm-none-eabi-gcc)
  11 + set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
  12 + set(CMAKE_ASM_COMPILER arm-none-eabi-gcc)
  13 + set(CMAKE_AR arm-none-eabi-ar)
  14 + set(CMAKE_OBJCOPY arm-none-eabi-objcopy)
  15 + set(CMAKE_OBJDUMP arm-none-eabi-objdump)
  16 + set(SIZE arm-none-eabi-size)
  17 + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
  18 +endif ()
  19 +
  20 +project(entry)
  21 +
  22 +# Disable in-source builds to prevent source tree corruption.
  23 +if (" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}")
  24 + message(FATAL_ERROR "FATAL: In-source builds are not allowed.
  25 + You should create a separate directory for build files.")
  26 +endif ()
  27 +
  28 +if (USE_SYSTEM_ARCH MATCHES LINUX)
  29 + add_definitions(-DSYSTEM_ARCH_LINUX)
  30 + add_subdirectory(samples/sample_c/platform/linux/manifold2)
  31 + add_subdirectory(samples/sample_c++/platform/linux/manifold2)
  32 +
  33 + execute_process(COMMAND uname -m OUTPUT_VARIABLE DEVICE_SYSTEM_ID)
  34 + if (DEVICE_SYSTEM_ID MATCHES x86_64)
  35 + set(LIBRARY_PATH psdk_lib/lib/x86_64-linux-gnu-gcc)
  36 + elseif (DEVICE_SYSTEM_ID MATCHES aarch64)
  37 + set(LIBRARY_PATH psdk_lib/lib/aarch64-linux-gnu-gcc)
  38 + else ()
  39 + message(FATAL_ERROR "FATAL: Please confirm your platform.")
  40 + endif ()
  41 +
  42 + install(FILES ${LIBRARY_PATH}/libpayloadsdk.a
  43 + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
  44 + )
  45 +
  46 + install(DIRECTORY psdk_lib/include
  47 + DESTINATION "${CMAKE_INSTALL_PREFIX}"
  48 + )
  49 +elseif (USE_SYSTEM_ARCH MATCHES RTOS)
  50 + add_definitions(-DSYSTEM_ARCH_RTOS)
  51 + add_subdirectory(samples/sample_c/platform/rtos_freertos/stm32f4_discovery/project/armgcc)
  52 +endif ()
  53 +
  54 +add_custom_target(${PROJECT_NAME} ALL)
  1 +END USER LICENSE AGREEMENT
  2 +YOU AGREE TO USE THE SDK SOLELY IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF THIS END USER LICENSE AGREEMENT (THE “AGREEMENT”), AND YOU AGREE THAT YOU ARE BOUND BY AND ARE A PARTY TO THIS AGREEMENT. YOU WARRANT THAT YOU ARE AT LEAST EIGHTEEN YEARS OLD AND THAT YOU HAVE THE LEGAL CAPACITY TO ENTER INTO CONTRACTS. IF YOU ARE AGREEING TO BE BOUND BY THIS AGREEMENT ON BEHALF OF A COMPANY, ORGANIZATION, OR OTHER ENTITY, THEN (i) “YOU” INCLUDES YOU AND THAT COMPANY, ORGANIZATION OR ENTITY, AND (ii) YOU REPRESENT AND WARRANT THAT YOU ARE AN AUTHORIZED REPRESENTATIVE OF SUCH COMPANY, ORGANIZATION OR ENTITY WITH THE AUTHORITY TO BIND SUCH COMPANY, ORGANIZATION OR ENTITY TO THIS AGREEMENT.
  3 +YOUR USE OF THE SDK IS EXPRESSLY CONDITIONED ON YOUR ACCEPTANCE OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT, YOU MAY NOT INSTALL OR USE THE SDK.
  4 + 1. About This Agreement.
  5 + 1.1 Generally. This Agreement applies to the SDK made available by DJI to you.
  6 + 1.2 Additional Terms. Certain additional and/or different terms may apply to certain types of users. If you are a federal, state, or local government entity (including but not limited to any agency or other sub-governmental organization thereof) utilizing the SDK in your official capacity, and to whom DJI has agreed to provide the SDK, then our Government Terms apply to you.
  7 + 2. Definitions
  8 +“Analytics Data” means information collected from a DJI Product (e.g., a DJI UAV) that is used in connection with an Application and/or devices used to operate the DJI Product (e.g., a mobile device). The Analytics Data may include Header Data and/or Event Data. Analytics Data may be used by DJI for any lawful purpose, including without limitation, for research or to improve its SDK or DJI Products.
  9 +“Application” means a software program that is developed by you using the SDK for use with DJI Products.
  10 +“Confidential Information” means the SDK and all other information disclosed to you by DJI that would reasonably be considered to be confidential, or is or was considered by DJI to be confidential, except for information which you can demonstrate: (a) is previously rightfully known to you without restriction on disclosure; (b) is or becomes, from no act or failure to act on your part, generally known in the relevant industry or public domain; (c) is disclosed to you by a third-party as a matter of right and without restriction on disclosure; or (d) is or was independently developed by you without access to, use of, or reference to the Confidential Information.
  11 +“Documentation” means any online read me, help files, technical specifications, or other related explanatory materials that are contained in the SDK or that accompany the SDK.
  12 +“DJI” means SZ DJI TECHNOLOGY CO., LTD. and its affiliates.
  13 +“DJI Products” means DJI hardware, software, and services, such as unmanned aerial vehicles (UAVs), flight controllers, sensors, cameras, gimbals, remote controllers, accessories, etc.
  14 +“Event Data” means information about time of operation or events, session identification numbers, event types, and flight operation information, including but not limited to GPS data, navigation, operation, speed, distance, modes, mission, command, altitude, takeoff and landing, payload and other component use, battery levels, etc.
  15 +“Header Data” means information about the software (including but not limited to installation identification, app key, SDK version of an Application) and hardware (including but not limited to product identifiers and names of UAVs, payloads, remote controllers, etc.).
  16 +“Licensee Disclosure” means any information that you may provide to DJI in connection with this Agreement, including, for example, feedback on errors and improvements within or relating to the SDK.
  17 +“Privacy Policy” means DJI’s privacy policy located at https://developer.dji.com/policies/privacy/.
  18 +“SDK” or “Software Development Kit” means software (source code and object code), applications, tools, sample code, templates, fonts, logos, icons, images, libraries, interfaces, Updates, Documentation, application programming interfaces (APIs), information, data, files, and other materials, whether tangible or intangible, in whatever form or medium provided to you by DJI for use by you in connection with your Application. For the purpose of this Agreement, SDK includes, without limitation, (a) the DJI “Guidance” software development kit (https://developer.dji.com/guidance-sdk/), (b) the DJI “Mobile” software development kit (https://developer.dji.com/mobile-sdk/), (c) the DJI “Payload” software development kit (https://developer.dji.com/payload-sdk/, and/or (d) the DJI “Onboard” software development kit (https://developer.dji.com/onboard-sdk/).
  19 +“Open-Source Component” means software, interfaces and firmware subject to an open-source software license, which means any software license approved as open-source licenses by the Open Source Initiative or any substantially similar licenses, including without limitation any license that, as a condition of distribution of the software licensed under such license, requires that the distributor make the software available in source code format.
  20 +“Third-Party Component” means software, interfaces and firmware licensed by DJI from a third-party (e.g., a supplier of DJI) for incorporation into the SDK and distributed as an integral part of the SDK, as applicable. Third-Party Components may include Open-Source Components.
  21 +“Updates” means bug fixes, service packs, hot fixes, updates, upgrades, enhancements, modifications, and new releases of versions of the SDK.
  22 +“Warranty Logs” means information provided to and/or received by the SDK that is necessary for determining warranty eligibility and product reliability, including without limitation SDK function calls (including without limitation time, function name, results/feedback, etc.), protocol or commands sent from or to a mobile device, an Application, and/or a remote controller (including without limitation time, name, type, command/action, etc.).
  23 +
  24 + 3. License.
  25 + 3.1 License Grants. The SDK is licensed, not sold, to you by DJI and/or, if applicable, its suppliers and licensors. Subject to the terms and conditions of this Agreement, you are hereby granted a limited, worldwide, non-exclusive, non-sublicensable, and nontransferable right to use the SDK solely in the manner described in the Documentation and solely to develop, test, and operate Applications in connection with DJI products.
  26 + 3.2 Use Restrictions. You may not use the SDK except as permitted in this Agreement and any additional terms and conditions that DJI provides pursuant to Section 3.1. Except with DJI’s prior written consent or otherwise provided herein, you may not: (a) alter, modify or create any derivative works of the SDK, including the underlying source code, or the Documentation in any way, including without limitation customization, translation or localization; (b) port, reverse compile, reverse assemble, reverse engineer, or otherwise attempt to separate any of the components of the SDK or derive the source code for the SDK (except to the extent applicable laws specifically prohibit such restriction); (c) copy, redistribute, encumber, sell, rent, lease, sublicense, or otherwise transfer rights to the SDK; (d) remove or alter any trademark, logo, copyright or other proprietary notices, legends, symbols or labels in the SDK; (e) block, disable, or otherwise affect any advertising, advertisement banner window, links to other sites and services, or other features that constitute an integral part of the SDK; or (f) use any part of the SDK to develop applications for use with hardware devices that are not DJI Products, unless they are the devices running the applications or are devices connected (directly or indirectly) to DJI Product(s) the SDK interfaces with. You may not release the results of any performance or functional evaluation of any of the SDK to any third-party without prior written approval of DJI for each such release. You may not cause or permit any third-party to do any of the foregoing.
  27 + 3.3 Distribution of Object Code. You may distribute your Application with object code of the SDK, provided that you must: (1) distribute such object code of the SDK in execution form only; (2) distribute such code only as a part of your Applications; (3) not distribute any portion of the SDK that is not object code, including but not limited to source code, header files and Documentation; (4) not charge a separate price or fee for the object code of the SDK that is distinct from the fee you charge for your Application; (5) not distribute, link, or integrate the object code of the SDK such that any part of the object code of the SDK becomes subject to an open source license; and (6) include the following copyright notice within your Application’s source code in the same locations as your own copyright notice: “Portions copyright (c) 2014–Present DJI. All rights reserved.”. To the extent that any source code is provided to you as part of the SDK, you may use, modify and compile the source code solely for the purposes of developing your Applications.
  28 + 3.4 Third-Party Components. You acknowledge that the SDK may contain Third-Party Components. All third-party licensors and suppliers retain all right, title and interest in and to such Third-Party Components and all copies thereof, including all copyright and other intellectual property rights. Your use of any Third-Party Components shall be subject to, and you shall comply with, the terms and conditions of this Agreement, and the applicable restrictions and other terms and conditions set forth in any Third-Party Components documentation or printed materials, including without limitation an end user license agreement.
  29 + 3.5 Open-Source Components. The SDK may include Open-Source Components that are subject to open-source software licenses. The Documentation accompanying the SDK includes copies of the licenses applicable to the Open-Source Components. To the extent there is conflict between the license terms covering the Open-Source Components and this Agreement, the terms of such licenses will apply in lieu of the terms of this Agreement. To the extent the terms of the licenses applicable to Open-Source Components prohibit any of the restrictions in this Agreement with respect to such Open-Source Component, such restrictions will not apply to such Open-Source Component.
  30 + 4. Reservation of Rights. DJI and its licensors reserve all rights, including but not limited to ownership and intellectual property rights, including in the SDK, not expressly granted to you. DJI’s licensors are the intended third-party beneficiaries of this Agreement and have the express right to rely upon and directly enforce the terms set forth herein. There are no implied licenses granted by DJI under this Agreement. Except as specified above, you shall have no rights to the SDK. You acknowledge and agree that the form and nature of the SDK that DJI provides may change without prior notice to you and that future versions of the SDK may be incompatible with Applications developed on previous versions of the SDK. You acknowledge and agree that DJI may stop providing the SDK or any features of the SDK permanently or temporarily to you or users generally at DJI’s sole discretion, without prior notice to you. If the SDK is a “beta” release, you acknowledge and agree that the SDK is a “beta” release for evaluation purposes only and may contain bugs, defects and errors and that the SDK may fail, return inaccurate results, and/or be subject to other malfunctions.
  31 + 5. Your Applications and Use of the SDK.
  32 + 5.1 Rights in Your Applications. Subject to Section 4 above, DJI agrees that it obtains no right, title, or interest from you (or your licensors) under this Agreement in or to any Applications that you develop using the SDK, including any sole and separate intellectual property rights of yours that subsist in those Applications.
  33 + 5.2 Permitted Applications. You agree to use the SDK and develop Applications solely for purposes that are permitted by: (a) this Agreement; (b) the DJI Developer Policy available at https://developer.dji.com/policies/developer/; and (c) any applicable law, rule, regulation, or generally accepted practice or guideline in the relevant jurisdiction, including but not limited to laws, rules, or regulations regarding the export of data or software to and from the United States or other relevant countries, and national, public, and personal security.
  34 + 5.3 Your Responsibilities. You agree that you are solely responsible for, and that DJI has no responsibility to you or any third-party for, or access to: (a) any data, content, or resources that you create, transmit, or display through the Applications you develop on or with the SDK (whether originating with you or a third-party), and for the consequences of your actions (including any loss or damage suffered by DJI) by doing so; and (b) any breach of your obligations under this Agreement, any applicable third-party contract or terms of service, or any applicable law, rule, or regulation, and for the consequences (including any loss or damage suffered by DJI) of any such breach.
  35 + 5.4 Compliance with Law; Safety. For the avoidance of doubt, you agree that you shall at all times strictly comply with all applicable laws, rules and regulations and shall not threaten the safety of national security, public security, or the health, privacy, or safety of any person.
  36 + 6. Privacy and Automatically Collected Information.
  37 + 6.1 SDK Use and User Information. In order to continually improve the SDK, DJI may automatically collect certain usage statistics including, but not limited to, unique identifiers, associated IP address, and other information on which tools and services in the SDK are being used and how they are being used. This data is collected in the aggregate to improve the SDK and is maintained in accordance with DJI’s Privacy Policy. We may also collect certain personal information from you, including but not limited to your legal name, mailing address, phone number, email address, and other contact or personal information. We may also collect additional information in order to verify your identity or provide certain functions. This information will be maintained in accordance with DJI’s Privacy Policy, and you hereby agree that we may share this information with our third-party business partners for purposes of verifying your identity or provide certain functions and as otherwise permitted by our Privacy Policy.
  38 + 6.2 Application User Information. The SDK may automatically collect Analytics Data, such as Header Data and/or Event Data. The Analytics Data may be provided to DJI and used by DJI for any use in research or improving its SDK or DJI Products. The Analytics Data may be used by DJI for any lawful purpose, including without limitation, for research or to improve its SDK or DJI Products. Certain SDK (e.g., Mobile SDK) may also automatically collect Warranty Log information, for example, for the purpose of determining warranty eligibility and product reliability. The Warranty Logs are stored locally on a device running the Application (e.g., mobile device) and are not automatically transmitted to DJI without prior user consent. You may be required to make the Warranty Logs available to DJI to support any warranty claims regarding the SDK. By using the SDK and creating an Application, you represent and warrant that you will provide clear and conspicuous notice to each user of the Application of the automatic collection, storage, and DJI’s use of the Analytics Data and Warranty Logs, and that you will obtain any legally-required consents for DJI to receive and use the Analytics Data and Warranty Logs for the purposes specified herein. The Application User Information is maintained in accordance with DJI’s Privacy Policy located at https://developer.dji.com/policies/privacy/.
  39 + 7. Proprietary Rights. You acknowledge and agree that the SDK belongs to DJI or its licensors. You agree that you neither own nor hereby acquire any claim or right of ownership to the SDK or to any related patents, copyrights, trademarks, or other intellectual property. DJI and its licensors retain all right, title, and interest in and to all copies of the SDK at all times, regardless of the form or media in or on which the original or other copies may subsequently exist. This license is not a sale of the original or any subsequent copy. The SDK is protected by copyright and other intellectual property laws and by international treaties. You may not make any copies of the SDK except as otherwise permitted by this Agreement. Any and all other copies of the SDK made by you are in violation of this license. All content accessed through the SDK is the property of the applicable content owner and may be protected by applicable copyright law. This license gives you no rights to such content. All trademarks used in connection with the SDK are owned by DJI, its affiliates and/or its licensors and other suppliers, and no license to use any such trademarks is provided hereunder.
  40 + 8. Information Submitted to DJI Not Deemed Confidential. DJI works with many application developers and some of their products may be similar to or compete with Your Applications. DJI may also be developing its own similar or competing applications, or may decide to do so in the future. To avoid potential misunderstandings, DJI CANNOT AGREE, AND EXPRESSLY DISCLAIMS, ANY CONFIDENTIALITY OBLIGATIONS OR USE RESTRICTIONS, EXPRESS OR IMPLIED, WITH RESPECT TO ANY LICENSEE DISCLOSURE. Such licensee disclosure may include, for example, feedback on errors and improvements within or relating to the SDK. You agree any such licensee disclosure will be non-confidential. DJI will be free to use and disclose any licensee disclosure on an unrestricted basis without notifying or compensating you. You release DJI from all liability and obligations that may arise from the receipt, review, use, or disclosure of any portion of any licensee disclosure. Any physical materials you submit to DJI will become DJI property and DJI will have no obligation to return those materials to you or to certify their destruction.
  41 + 9. No Support. This Agreement does not entitle you to receive from DJI or its licensors hard-copy documentation, support, telephone assistance, or enhancements or updates to the SDK.
  42 + 10. Term and Termination. This Agreement and your right to use the SDK may be terminated by you or by DJI at any time upon written notice. This Agreement automatically terminates if you fail to comply with its terms and conditions. Immediately upon termination, you shall return or destroy all copies of the SDK in your possession, custody, or control and, if requested by DJI, you shall certify to DJI in writing that such return or destruction has occurred. The following Sections of this Agreement survive any expiration or termination hereof: 1, 2, 3.2, 3.3, 3.4, 3.5, and 4 through 18 (inclusive).
  43 + 11. No warranty. YOU AGREE THAT THE SDK IS PROVIDED “AS IS” AND THAT DJI AND ITS LICENSORS MAKE NO OTHER WARRANTY AS TO THE SDK, INCLUDING, BUT NOT LIMITED TO, UNINTERRUPTED USE, ACCURACY, AND DATA LOSS. DJI AND ITS LICENSORS DISCLAIM ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, PRIVACY, SECURITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE (EVEN IF DJI KNOWS OR SHOULD HAVE KNOWN OF SUCH PURPOSE), RELATED TO THE SDK, ITS USE OR ANY INABILITY TO USE IT, THE RESULTS OF ITS USE AND THIS AGREEMENT. DJI AND ITS LICENSORS DO NOT WARRANT THAT THE SDK OR ANY RESULTS OF USE THEREOF WILL BE FREE OF DEFECTS, ERRORS OR VIRUSES, RELIABLE OR ABLE TO OPERATE ON AN UNINTERRUPTED BASIS OR IN A PARTICULAR ENVIRONMENT OR THAT ERRORS THEREIN, IF ANY, WILL BE CORRECTED.
  44 + 12. Limitation of Liability. TO THE FULLEST EXTENT PERMITTED BY LAW, DJI AND ITS AFFILIATES AND LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES, WHETHER IN CONTRACT OR TORT (INCLUDING NEGLIGENCE) OR ANY OTHER LEGAL OR EQUITABLE THEORY, ARISING FROM THIS AGREEMENT AND/OR YOUR USE OF THE SDK OR DEVELOPMENT OR DISTRIBUTION OF ANY APPLICATION, INCLUDING WITHOUT LIMITATION ANY INDIRECT, CONSEQUENTIAL, SPECIAL, EXEMPLARY, INCIDENTAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. YOU AGREE THAT YOU SHALL HAVE THE SOLE RESPONSIBILITY FOR PROTECTING YOUR DATA, BY PERIODIC BACKUP OR OTHERWISE, USED IN CONNECTION WITH THE SDK. IN ANY CASE, DJI AND ITS AFFILIATES AND LICENSORS’ SOLE LIABILITY AND YOUR EXCLUSIVE REMEDY UNDER ANY PROVISION OF THIS AGREEMENT SHALL BE TO STOP USING THE SDK, WITH THE EXCEPTION OF DEATH OR PERSONAL INJURY CAUSED BY THE SOLE NEGLIGENCE OF DJI, AND SOLELY TO THE EXTENT APPLICABLE LAW PROHIBITS THE LIMITATION OF DAMAGES IN SUCH CASES.
  45 + 13. Indemnification. TO THE MAXIMUM EXTENT PERMITTED BY LAW, YOU AGREE TO DEFEND, INDEMNIFY, AND HOLD HARMLESS DJI, ITS AFFILIATES AND THEIR RESPECTIVE DIRECTORS, OFFICERS, EMPLOYEES, AND AGENTS FROM AND AGAINST ANY AND ALL CLAIMS, ACTIONS, SUITS, OR PROCEEDINGS, AS WELL AS ANY AND ALL LOSSES, LIABILITIES, DAMAGES, COSTS, AND EXPENSES (INCLUDING REASONABLE ATTORNEYS’ FEES) ARISING OUT OF OR ACCRUING FROM: (A) YOUR USE OF THE SDK, INCLUDING THIRD-PARTY SOFTWARE AND/OR DOCUMENTATION; (B) ANY APPLICATION YOU DEVELOP ON OR WITH THE SDK THAT IS ALLEGED TO OR DETERMINED TO INFRINGE ANY PATENT, COPYRIGHT, TRADEMARK, OR OTHER INTELLECTUAL PROPERTY OR PROPRIETARY RIGHT OF A THIRD PARTY; AND (C) YOUR NONCOMPLIANCE WITH ANY TERM OF THIS AGREEMENT, EXCEPT FOR DEATH OR PERSONAL INJURY CAUSED BY THE SOLE NEGLIGENCE OF DJI.
  46 + 14. Confidentiality. You shall use your best efforts to preserve and protect the confidentiality of the Confidential Information at all times, both during the term hereof and for a period of at least 3 years after termination of this Agreement, provided, however, that any source code you receive shall be held in confidence in perpetuity. You shall not disclose, disseminate, or otherwise publish or communicate Confidential Information to any person, firm, corporation or other third-party without the prior written consent of DJI. You shall not use any Confidential Information other than in the course of the activities permitted hereunder. You agree to use your best efforts to prevent and protect the contents of the SDK from unauthorized disclosure or use. You shall notify DJI in writing immediately upon discovery of any unauthorized use or disclosure of Confidential Information or any other breach of this Agreement, and will cooperate with DJI in every reasonable way to regain possession of Confidential Information and prevent any further unauthorized use.
  47 +If you are legally compelled to disclose any of the Confidential Information, then, prior to such disclosure, you will (i) immediately notify DJI prior to such disclosure to allow DJI an opportunity to contest the disclosure, (ii) assert the privileged and confidential nature of the Confidential Information, and (iii) cooperate fully with DJI in protecting against any such disclosure and/or obtaining a protective order narrowing the scope of such disclosure and/or use of the Confidential Information. In the event such protection is not obtained, you shall disclose the Confidential Information only to the extent necessary to comply with the applicable legal requirements.
  48 + 15. Injunctive Relief. You acknowledge and agree that your breach or threatened breach of this Agreement shall cause DJI irreparable damage for which recovery of money damages would be inadequate and that DJI therefore may obtain timely injunctive relief to protect its rights under this Agreement in addition to any and all other remedies available at law or in equity.
  49 + 16. Export Controls. The SDK and the underlying information and technology may not be downloaded or otherwise exported or re-exported (a) into (or to a national or resident of) any country to which the U.S. has embargoed goods; or (b) to or through or involve any party on any U.S. government screening or prohibited list (including those as updated from time-to-time on the U.S. Consolidated Screening List (available at http://export.gov/ecr/eg_main_023148.asp). By downloading or using the SDK and/or Documentation, you are agreeing to the foregoing and you represent and warrant that you are not located in, under the control of, or a national or resident of any such country or on any such list and you agree to comply with all export laws and other applicable laws.
  50 + 17. Miscellaneous. (a) This Agreement, together with any amendments and any additional agreements you may enter into with DJI in connection with the use of SDK, shall constitute the entire agreement between the parties concerning the subject matter hereof, which may only be modified by a written amendment signed by an authorized executive of DJI. (b) Any dispute, controversy, difference or claim arising out of or relating to this contract, including the existence, validity, interpretation, performance, breach or termination thereof or any dispute regarding non-contractual obligations arising out of or relating to it shall be referred to and finally resolved by arbitration administered by the Hong Kong International Arbitration Centre (“HKIAC”) under the HKIAC Administered Arbitration Rules in force when the Notice of Arbitration is submitted. The law of this arbitration clause shall be Hong Kong law, excluding its conflict of law provisions. The seat of arbitration shall be Hong Kong. The number of arbitrators shall be three (3) in accordance with such rules. The arbitration proceedings shall be conducted in English. Any awards of shall be final and binding upon the applicable parties. (c) This Agreement shall not be governed by the United Nations Convention on Contracts for the International Sale of Goods. (d) If any part of this Agreement is held invalid or unenforceable, that part shall be construed to reflect the parties' original intent, and the remaining portions remain in full force and effect, or DJI may at its option terminate this Agreement. (e) The controlling language of this Agreement is English. If you have received a translation into another language, it has been provided for your convenience only. (f) A waiver by either party of any term or condition of this Agreement or any breach thereof, in any one instance, shall not waive such term or condition or any subsequent breach thereof. (g) You may not assign or otherwise transfer by operation of law or otherwise this Agreement or any rights or obligations herein. DJI may assign this Agreement to any entity at its sole discretion. (h) This Agreement shall be binding upon and shall inure to the benefit of the parties, their successors and permitted assigns.
  51 + 18. User Outside the People’s Republic of China. If you are using the SDK outside the People’s Republic of China, then the following shall apply: (a) You confirm that this Agreement and all related documentation is and will be in the English language; (b) you are responsible for complying with any local laws in your jurisdiction which might impact your right to import, export or use the SDK, and you represent that you have complied with any regulations or registration procedures required by applicable law to make this license enforceable.
  52 +
  53 +This End User License Agreement was last modified on December 11, 2017.
  1 +The following portions of the DJI’s Payload SDK (“Software” referred to in the terms below) are made available to you under the terms of the MIT License. A copy of the MIT license is available at https://opensource.org/licenses/MIT.
  2 +
  3 +.
  4 +├── CMakeLists.txt
  5 +├── doc
  6 +│   ├── dji_sdk_code_style
  7 +│   │   ├── dji_sdk_template.c
  8 +│   │   └── dji_sdk_template.h
  9 +│   ├── reference_designs
  10 +│   │   ├── E-Port Lite Schematic Reference.pdf
  11 +│   │   └── E-Port Schematic Reference.pdf
  12 +│   └── simple_model
  13 +│   ├── H20.stp
  14 +│   ├── H20T.stp
  15 +│   ├── M300_OSDK_Adapter.stp
  16 +│   ├── M300_RTK_1.stp
  17 +│   ├── M300_RTK_2.stp
  18 +│   ├── M300_RTK_3.stp
  19 +│   ├── M30T.stp
  20 +│   ├── M3E.stp
  21 +│   ├── PSDK Mounting Bracket(Payload).stp
  22 +│   ├── Readme.txt
  23 +│   ├── Skyport_Adapter_2.stp
  24 +│   └── X-Port 80mm.stp
  25 +├── EULA.txt
  26 +├── LICENSE.txt
  27 +├── psdk_lib
  28 +│   ├── include
  29 +│   │   ├── dji_aircraft_info.h
  30 +│   │   ├── dji_camera_manager.h
  31 +│   │   ├── dji_core.h
  32 +│   │   ├── dji_error.h
  33 +│   │   ├── dji_fc_subscription.h
  34 +│   │   ├── dji_flight_controller.h
  35 +│   │   ├── dji_gimbal.h
  36 +│   │   ├── dji_gimbal_manager.h
  37 +│   │   ├── dji_high_speed_data_channel.h
  38 +│   │   ├── dji_hms_customization.h
  39 +│   │   ├── dji_hms.h
  40 +│   │   ├── dji_hms_info_table.h
  41 +│   │   ├── dji_hms_manager.h
  42 +│   │   ├── dji_interest_point.h
  43 +│   │   ├── dji_liveview.h
  44 +│   │   ├── dji_logger.h
  45 +│   │   ├── dji_low_speed_data_channel.h
  46 +│   │   ├── dji_mop_channel.h
  47 +│   │   ├── dji_payload_camera.h
  48 +│   │   ├── dji_perception.h
  49 +│   │   ├── dji_platform.h
  50 +│   │   ├── dji_positioning.h
  51 +│   │   ├── dji_power_management.h
  52 +│   │   ├── dji_time_sync.h
  53 +│   │   ├── dji_typedef.h
  54 +│   │   ├── dji_upgrade.h
  55 +│   │   ├── dji_version.h
  56 +│   │   ├── dji_waypoint_v2.h
  57 +│   │   ├── dji_waypoint_v2_type.h
  58 +│   │   ├── dji_waypoint_v3.h
  59 +│   │   ├── dji_widget.h
  60 +│   │   ├── dji_xport.h
  61 +│   │   └── legacy_psdk2.x
  62 +│   │   ├── psdk_aircraft_info.h
  63 +│   │   ├── psdk_core.h
  64 +│   │   ├── psdk_data_channel.h
  65 +│   │   ├── psdk_data_subscription.h
  66 +│   │   ├── psdk_data_transmission.h
  67 +│   │   ├── psdk_error.h
  68 +│   │   ├── psdk_gimbal.h
  69 +│   │   ├── psdk_logger.h
  70 +│   │   ├── psdk_mop_channel.h
  71 +│   │   ├── psdk_payload_camera.h
  72 +│   │   ├── psdk_payload_collaboration.h
  73 +│   │   ├── psdk_platform.h
  74 +│   │   ├── psdk_positioning.h
  75 +│   │   ├── psdk_power_management.h
  76 +│   │   ├── psdk_product_info.h
  77 +│   │   ├── psdk_time_sync.h
  78 +│   │   ├── psdk_typedef.h
  79 +│   │   ├── psdk_upgrade.h
  80 +│   │   ├── psdk_version.h
  81 +│   │   ├── psdk_widget.h
  82 +│   │   └── psdk_xport.h
  83 +│   └── lib
  84 +│   ├── aarch64-linux-gnu-gcc
  85 +│   │   └── libpayloadsdk.a
  86 +│   ├── armcc_cortex-m4
  87 +│   │   └── libpayload.lib
  88 +│   ├── arm-linux-gnueabi-gcc
  89 +│   │   └── libpayloadsdk.a
  90 +│   ├── arm-linux-gnueabihf-gcc
  91 +│   │   └── libpayloadsdk.a
  92 +│   └── x86_64-linux-gnu-gcc
  93 +│   └── libpayloadsdk.a
  94 +├── README.md
  95 +├── samples
  96 +│   ├── sample_c
  97 +│   │   ├── module_sample
  98 +│   │   │   ├── camera_emu
  99 +│   │   │   │   ├── dji_media_file_manage
  100 +│   │   │   │   │   ├── dji_media_file_core.c
  101 +│   │   │   │   │   ├── dji_media_file_core.h
  102 +│   │   │   │   │   ├── dji_media_file_jpg.c
  103 +│   │   │   │   │   ├── dji_media_file_jpg.h
  104 +│   │   │   │   │   ├── dji_media_file_mp4.c
  105 +│   │   │   │   │   └── dji_media_file_mp4.h
  106 +│   │   │   │   ├── media_file
  107 +│   │   │   │   │   ├── PSDK_0001_ORG.jpg
  108 +│   │   │   │   │   ├── PSDK_0002_ORG.jpg
  109 +│   │   │   │   │   ├── PSDK_0003_ORG.jpg
  110 +│   │   │   │   │   ├── PSDK_0004_ORG.mp4
  111 +│   │   │   │   │   └── PSDK_0005.h264
  112 +│   │   │   │   ├── test_payload_cam_emu_base.c
  113 +│   │   │   │   ├── test_payload_cam_emu_base.h
  114 +│   │   │   │   ├── test_payload_cam_emu_media.c
  115 +│   │   │   │   └── test_payload_cam_emu_media.h
  116 +│   │   │   ├── camera_manager
  117 +│   │   │   │   ├── test_camera_manager.c
  118 +│   │   │   │   └── test_camera_manager.h
  119 +│   │   │   ├── data_transmission
  120 +│   │   │   │   ├── test_data_transmission.c
  121 +│   │   │   │   └── test_data_transmission.h
  122 +│   │   │   ├── fc_subscription
  123 +│   │   │   │   ├── test_fc_subscription.c
  124 +│   │   │   │   └── test_fc_subscription.h
  125 +│   │   │   ├── flight_control
  126 +│   │   │   │   ├── test_flight_control.c
  127 +│   │   │   │   └── test_flight_control.h
  128 +│   │   │   ├── gimbal_emu
  129 +│   │   │   │   ├── test_payload_gimbal_emu.c
  130 +│   │   │   │   └── test_payload_gimbal_emu.h
  131 +│   │   │   ├── gimbal_manager
  132 +│   │   │   │   ├── test_gimbal_manager.c
  133 +│   │   │   │   └── test_gimbal_manager.h
  134 +│   │   │   ├── hms
  135 +│   │   │   │   ├── data
  136 +│   │   │   │   │   └── hms.json
  137 +│   │   │   │   ├── hms_text
  138 +│   │   │   │   │   ├── cn
  139 +│   │   │   │   │   │   └── hms_text_config.json
  140 +│   │   │   │   │   └── en
  141 +│   │   │   │   │   └── hms_text_config.json
  142 +│   │   │   │   ├── hms_text_c
  143 +│   │   │   │   │   └── en
  144 +│   │   │   │   │   └── hms_text_config_json.h
  145 +│   │   │   │   ├── test_hms.c
  146 +│   │   │   │   └── test_hms.h
  147 +│   │   │   ├── interest_point
  148 +│   │   │   │   ├── test_interest_point.c
  149 +│   │   │   │   └── test_interest_point.h
  150 +│   │   │   ├── liveview
  151 +│   │   │   │   ├── test_liveview.c
  152 +│   │   │   │   └── test_liveview.h
  153 +│   │   │   ├── mop_channel
  154 +│   │   │   │   ├── mop_channel_test_file
  155 +│   │   │   │   │   └── mop_send_test_file.mp4
  156 +│   │   │   │   ├── test_mop_channel.c
  157 +│   │   │   │   └── test_mop_channel.h
  158 +│   │   │   ├── payload_collaboration
  159 +│   │   │   │   ├── test_payload_collaboration.c
  160 +│   │   │   │   └── test_payload_collaboration.h
  161 +│   │   │   ├── perception
  162 +│   │   │   │   ├── test_perception.c
  163 +│   │   │   │   └── test_perception.h
  164 +│   │   │   ├── positioning
  165 +│   │   │   │   ├── test_positioning.c
  166 +│   │   │   │   └── test_positioning.h
  167 +│   │   │   ├── power_management
  168 +│   │   │   │   ├── test_power_management.c
  169 +│   │   │   │   └── test_power_management.h
  170 +│   │   │   ├── time_sync
  171 +│   │   │   │   ├── test_time_sync.c
  172 +│   │   │   │   └── test_time_sync.h
  173 +│   │   │   ├── upgrade
  174 +│   │   │   │   ├── test_upgrade.c
  175 +│   │   │   │   ├── test_upgrade_common_file_transfer.c
  176 +│   │   │   │   ├── test_upgrade_common_file_transfer.h
  177 +│   │   │   │   ├── test_upgrade.h
  178 +│   │   │   │   ├── test_upgrade_platform_opt.c
  179 +│   │   │   │   └── test_upgrade_platform_opt.h
  180 +│   │   │   ├── utils
  181 +│   │   │   │   ├── cJSON.c
  182 +│   │   │   │   ├── cJSON.h
  183 +│   │   │   │   ├── dji_config_manager.c
  184 +│   │   │   │   ├── dji_config_manager.h
  185 +│   │   │   │   ├── util_buffer.c
  186 +│   │   │   │   ├── util_buffer.h
  187 +│   │   │   │   ├── util_file.c
  188 +│   │   │   │   ├── util_file.h
  189 +│   │   │   │   ├── util_link_list.c
  190 +│   │   │   │   ├── util_link_list.h
  191 +│   │   │   │   ├── util_md5.c
  192 +│   │   │   │   ├── util_md5.h
  193 +│   │   │   │   ├── util_misc.c
  194 +│   │   │   │   ├── util_misc.h
  195 +│   │   │   │   ├── util_time.c
  196 +│   │   │   │   └── util_time.h
  197 +│   │   │   ├── waypoint_v2
  198 +│   │   │   │   ├── test_waypoint_v2.c
  199 +│   │   │   │   └── test_waypoint_v2.h
  200 +│   │   │   ├── waypoint_v3
  201 +│   │   │   │   ├── test_waypoint_v3.c
  202 +│   │   │   │   ├── test_waypoint_v3.h
  203 +│   │   │   │   ├── waypoint_file
  204 +│   │   │   │   │   └── waypoint_v3_test_file.kmz
  205 +│   │   │   │   └── waypoint_file_c
  206 +│   │   │   │   └── waypoint_v3_test_file_kmz.h
  207 +│   │   │   ├── widget
  208 +│   │   │   │   ├── file_binary_array_list_en.c
  209 +│   │   │   │   ├── file_binary_array_list_en.h
  210 +│   │   │   │   ├── test_widget.c
  211 +│   │   │   │   ├── test_widget.h
  212 +│   │   │   │   ├── test_widget_speaker.c
  213 +│   │   │   │   ├── test_widget_speaker.h
  214 +│   │   │   │   ├── widget_file
  215 +│   │   │   │   │   ├── cn_big_screen
  216 +│   │   │   │   │   │   ├── icon_button1.png
  217 +│   │   │   │   │   │   ├── icon_button2.png
  218 +│   │   │   │   │   │   ├── icon_list_item1.png
  219 +│   │   │   │   │   │   ├── icon_list_item2.png
  220 +│   │   │   │   │   │   ├── icon_scale.png
  221 +│   │   │   │   │   │   ├── icon_switch_select.png
  222 +│   │   │   │   │   │   ├── icon_switch_unselect.png
  223 +│   │   │   │   │   │   └── widget_config.json
  224 +│   │   │   │   │   └── en_big_screen
  225 +│   │   │   │   │   ├── icon_button1.png
  226 +│   │   │   │   │   ├── icon_button2.png
  227 +│   │   │   │   │   ├── icon_list_item1.png
  228 +│   │   │   │   │   ├── icon_list_item2.png
  229 +│   │   │   │   │   ├── icon_scale.png
  230 +│   │   │   │   │   ├── icon_switch_select.png
  231 +│   │   │   │   │   ├── icon_switch_unselect.png
  232 +│   │   │   │   │   └── widget_config.json
  233 +│   │   │   │   └── widget_file_c
  234 +│   │   │   │   └── en_big_screen
  235 +│   │   │   │   ├── icon_button1_png.h
  236 +│   │   │   │   ├── icon_button2_png.h
  237 +│   │   │   │   ├── icon_list_item1_png.h
  238 +│   │   │   │   ├── icon_list_item2_png.h
  239 +│   │   │   │   ├── icon_scale_png.h
  240 +│   │   │   │   ├── icon_switch_select_png.h
  241 +│   │   │   │   ├── icon_switch_unselect_png.h
  242 +│   │   │   │   └── widget_config_json.h
  243 +│   │   │   ├── widget_interaction_test
  244 +│   │   │   │   ├── file_binary_array_list_en.c
  245 +│   │   │   │   ├── file_binary_array_list_en.h
  246 +│   │   │   │   ├── test_widget_interaction.c
  247 +│   │   │   │   ├── test_widget_interaction.h
  248 +│   │   │   │   ├── widget_file
  249 +│   │   │   │   │   ├── cn_big_screen
  250 +│   │   │   │   │   │   ├── icon_button1.png
  251 +│   │   │   │   │   │   ├── icon_button2.png
  252 +│   │   │   │   │   │   ├── icon_list_item1.png
  253 +│   │   │   │   │   │   ├── icon_list_item2.png
  254 +│   │   │   │   │   │   ├── icon_scale.png
  255 +│   │   │   │   │   │   ├── icon_switch_select.png
  256 +│   │   │   │   │   │   ├── icon_switch_unselect.png
  257 +│   │   │   │   │   │   └── widget_config.json
  258 +│   │   │   │   │   └── en_big_screen
  259 +│   │   │   │   │   ├── icon_button1.png
  260 +│   │   │   │   │   ├── icon_button2.png
  261 +│   │   │   │   │   ├── icon_list_item1.png
  262 +│   │   │   │   │   ├── icon_list_item2.png
  263 +│   │   │   │   │   ├── icon_scale.png
  264 +│   │   │   │   │   ├── icon_switch_select.png
  265 +│   │   │   │   │   ├── icon_switch_unselect.png
  266 +│   │   │   │   │   └── widget_config.json
  267 +│   │   │   │   └── widget_file_c
  268 +│   │   │   │   └── en_big_screen
  269 +│   │   │   │   ├── icon_button1_png.h
  270 +│   │   │   │   ├── icon_button2_png.h
  271 +│   │   │   │   ├── icon_list_item1_png.h
  272 +│   │   │   │   ├── icon_list_item2_png.h
  273 +│   │   │   │   ├── icon_scale_png.h
  274 +│   │   │   │   ├── icon_switch_select_png.h
  275 +│   │   │   │   ├── icon_switch_unselect_png.h
  276 +│   │   │   │   └── widget_config_json.h
  277 +│   │   │   └── xport
  278 +│   │   │   ├── test_payload_xport.c
  279 +│   │   │   └── test_payload_xport.h
  280 +│   │   └── platform
  281 +│   │   ├── linux
  282 +│   │   │   ├── common
  283 +│   │   │   │   ├── 3rdparty
  284 +│   │   │   │   │   ├── FindFFMPEG.cmake
  285 +│   │   │   │   │   ├── FindLIBUSB.cmake
  286 +│   │   │   │   │   └── FindOPUS.cmake
  287 +│   │   │   │   ├── monitor
  288 +│   │   │   │   │   ├── sys_monitor.c
  289 +│   │   │   │   │   └── sys_monitor.h
  290 +│   │   │   │   ├── osal
  291 +│   │   │   │   │   ├── osal.c
  292 +│   │   │   │   │   ├── osal_fs.c
  293 +│   │   │   │   │   ├── osal_fs.h
  294 +│   │   │   │   │   ├── osal.h
  295 +│   │   │   │   │   ├── osal_socket.c
  296 +│   │   │   │   │   └── osal_socket.h
  297 +│   │   │   │   └── upgrade_platform_opt
  298 +│   │   │   │   ├── upgrade_platform_opt_linux.c
  299 +│   │   │   │   └── upgrade_platform_opt_linux.h
  300 +│   │   │   ├── manifold2
  301 +│   │   │   │   ├── application
  302 +│   │   │   │   │   ├── dji_sdk_app_info.h
  303 +│   │   │   │   │   ├── dji_sdk_config.h
  304 +│   │   │   │   │   └── main.c
  305 +│   │   │   │   ├── CMakeLists.txt
  306 +│   │   │   │   └── hal
  307 +│   │   │   │   ├── hal_network.c
  308 +│   │   │   │   ├── hal_network.h
  309 +│   │   │   │   ├── hal_uart.c
  310 +│   │   │   │   ├── hal_uart.h
  311 +│   │   │   │   ├── hal_usb_bulk.c
  312 +│   │   │   │   └── hal_usb_bulk.h
  313 +│   │   │   ├── nvidia_jetson
  314 +│   │   │   │   ├── application
  315 +│   │   │   │   │   ├── dji_sdk_app_info.h
  316 +│   │   │   │   │   ├── dji_sdk_config.h
  317 +│   │   │   │   │   └── main.c
  318 +│   │   │   │   ├── CMakeLists.txt
  319 +│   │   │   │   └── hal
  320 +│   │   │   │   ├── hal_i2c.c
  321 +│   │   │   │   ├── hal_i2c.h
  322 +│   │   │   │   ├── hal_network.c
  323 +│   │   │   │   ├── hal_network.h
  324 +│   │   │   │   ├── hal_uart.c
  325 +│   │   │   │   ├── hal_uart.h
  326 +│   │   │   │   ├── hal_usb_bulk.c
  327 +│   │   │   │   └── hal_usb_bulk.h
  328 +│   │   │   ├── raspberry_pi
  329 +│   │   │   │   ├── application
  330 +│   │   │   │   │   ├── dji_sdk_app_info.h
  331 +│   │   │   │   │   ├── dji_sdk_config.h
  332 +│   │   │   │   │   └── main.c
  333 +│   │   │   │   ├── CMakeLists.txt
  334 +│   │   │   │   └── hal
  335 +│   │   │   │   ├── hal_i2c.c
  336 +│   │   │   │   ├── hal_i2c.h
  337 +│   │   │   │   ├── hal_network.c
  338 +│   │   │   │   ├── hal_network.h
  339 +│   │   │   │   ├── hal_uart.c
  340 +│   │   │   │   ├── hal_uart.h
  341 +│   │   │   │   ├── hal_usb_bulk.c
  342 +│   │   │   │   └── hal_usb_bulk.h
  343 +│   │   └── rtos_freertos
  344 +│   │   ├── common
  345 +│   │   │   └── osal
  346 +│   │   │   ├── osal.c
  347 +│   │   │   └── osal.h
  348 +│   │   └── stm32f4_discovery
  349 +│   │   ├── application
  350 +│   │   │   ├── application.c
  351 +│   │   │   ├── application.h
  352 +│   │   │   ├── dji_sdk_app_info.h
  353 +│   │   │   ├── dji_sdk_config.h
  354 +│   │   │   ├── FreeRTOSConfig.h
  355 +│   │   │   └── main.c
  356 +│   │   ├── bootloader
  357 +│   │   │   ├── common.c
  358 +│   │   │   ├── common.h
  359 +│   │   │   ├── main.c
  360 +│   │   │   ├── main.h
  361 +│   │   │   ├── menu.c
  362 +│   │   │   ├── menu.h
  363 +│   │   │   └── ymodem.c
  364 +│   │   ├── drivers
  365 +│   │   │   ├── BSP
  366 +│   │   │   │   ├── apply_high_power.c
  367 +│   │   │   │   ├── apply_high_power.h
  368 +│   │   │   │   ├── button.c
  369 +│   │   │   │   ├── button.h
  370 +│   │   │   │   ├── dji_ringbuffer.c
  371 +│   │   │   │   ├── dji_ringbuffer.h
  372 +│   │   │   │   ├── flash_if.c
  373 +│   │   │   │   ├── flash_if.h
  374 +│   │   │   │   ├── freertos.c
  375 +│   │   │   │   ├── led.c
  376 +│   │   │   │   ├── led.h
  377 +│   │   │   │   ├── pps.c
  378 +│   │   │   │   ├── pps.h
  379 +│   │   │   │   ├── startup_stm32f407vgtx.s
  380 +│   │   │   │   ├── stm32f4xx_hal_conf.h
  381 +│   │   │   │   ├── stm32f4xx_hal_msp.c
  382 +│   │   │   │   ├── stm32f4xx_hal_timebase_tim.c
  383 +│   │   │   │   ├── stm32f4xx_it.c
  384 +│   │   │   │   ├── stm32f4xx_it.h
  385 +│   │   │   │   ├── syscalls.c
  386 +│   │   │   │   ├── sysmem.c
  387 +│   │   │   │   ├── sysmem.h
  388 +│   │   │   │   ├── system_stm32f4xx.c
  389 +│   │   │   │   ├── uart.c
  390 +│   │   │   │   ├── uart.h
  391 +│   │   │   │   ├── upgrade_platform_opt_stm32.c
  392 +│   │   │   │   └── upgrade_platform_opt_stm32.h
  393 +│   │   │   ├── CMSIS
  394 +│   │   │   │   ├── Device
  395 +│   │   │   │   │   └── ST
  396 +│   │   │   │   │   └── STM32F4xx
  397 +│   │   │   │   │   ├── Include
  398 +│   │   │   │   │   │   ├── stm32f407xx.h
  399 +│   │   │   │   │   │   ├── stm32f4xx.h
  400 +│   │   │   │   │   │   └── system_stm32f4xx.h
  401 +│   │   │   │   │   └── Source
  402 +│   │   │   │   │   └── Templates
  403 +│   │   │   │   │   ├── arm
  404 +│   │   │   │   │   │   ├── startup_stm32f401xc.s
  405 +│   │   │   │   │   │   ├── startup_stm32f401xe.s
  406 +│   │   │   │   │   │   ├── startup_stm32f405xx.s
  407 +│   │   │   │   │   │   ├── startup_stm32f407xx.s
  408 +│   │   │   │   │   │   ├── startup_stm32f410cx.s
  409 +│   │   │   │   │   │   ├── startup_stm32f410rx.s
  410 +│   │   │   │   │   │   ├── startup_stm32f410tx.s
  411 +│   │   │   │   │   │   ├── startup_stm32f411xe.s
  412 +│   │   │   │   │   │   ├── startup_stm32f412cx.s
  413 +│   │   │   │   │   │   ├── startup_stm32f412rx.s
  414 +│   │   │   │   │   │   ├── startup_stm32f412vx.s
  415 +│   │   │   │   │   │   ├── startup_stm32f412zx.s
  416 +│   │   │   │   │   │   ├── startup_stm32f413xx.s
  417 +│   │   │   │   │   │   ├── startup_stm32f415xx.s
  418 +│   │   │   │   │   │   ├── startup_stm32f417xx.s
  419 +│   │   │   │   │   │   ├── startup_stm32f423xx.s
  420 +│   │   │   │   │   │   ├── startup_stm32f427xx.s
  421 +│   │   │   │   │   │   ├── startup_stm32f429xx.s
  422 +│   │   │   │   │   │   ├── startup_stm32f437xx.s
  423 +│   │   │   │   │   │   ├── startup_stm32f439xx.s
  424 +│   │   │   │   │   │   ├── startup_stm32f446xx.s
  425 +│   │   │   │   │   │   ├── startup_stm32f469xx.s
  426 +│   │   │   │   │   │   └── startup_stm32f479xx.s
  427 +│   │   │   │   │   ├── gcc
  428 +│   │   │   │   │   │   ├── startup_stm32f401xc.s
  429 +│   │   │   │   │   │   ├── startup_stm32f401xe.s
  430 +│   │   │   │   │   │   ├── startup_stm32f405xx.s
  431 +│   │   │   │   │   │   ├── startup_stm32f407xx.s
  432 +│   │   │   │   │   │   ├── startup_stm32f410cx.s
  433 +│   │   │   │   │   │   ├── startup_stm32f410rx.s
  434 +│   │   │   │   │   │   ├── startup_stm32f410tx.s
  435 +│   │   │   │   │   │   ├── startup_stm32f411xe.s
  436 +│   │   │   │   │   │   ├── startup_stm32f412cx.s
  437 +│   │   │   │   │   │   ├── startup_stm32f412rx.s
  438 +│   │   │   │   │   │   ├── startup_stm32f412vx.s
  439 +│   │   │   │   │   │   ├── startup_stm32f412zx.s
  440 +│   │   │   │   │   │   ├── startup_stm32f413xx.s
  441 +│   │   │   │   │   │   ├── startup_stm32f415xx.s
  442 +│   │   │   │   │   │   ├── startup_stm32f417xx.s
  443 +│   │   │   │   │   │   ├── startup_stm32f423xx.s
  444 +│   │   │   │   │   │   ├── startup_stm32f427xx.s
  445 +│   │   │   │   │   │   ├── startup_stm32f429xx.s
  446 +│   │   │   │   │   │   ├── startup_stm32f437xx.s
  447 +│   │   │   │   │   │   ├── startup_stm32f439xx.s
  448 +│   │   │   │   │   │   ├── startup_stm32f446xx.s
  449 +│   │   │   │   │   │   ├── startup_stm32f469xx.s
  450 +│   │   │   │   │   │   └── startup_stm32f479xx.s
  451 +│   │   │   │   │   └── iar
  452 +│   │   │   │   │   ├── linker
  453 +│   │   │   │   │   │   ├── stm32f401xc_flash.icf
  454 +│   │   │   │   │   │   ├── stm32f401xc_sram.icf
  455 +│   │   │   │   │   │   ├── stm32f401xe_flash.icf
  456 +│   │   │   │   │   │   ├── stm32f401xe_sram.icf
  457 +│   │   │   │   │   │   ├── stm32f405xx_flash.icf
  458 +│   │   │   │   │   │   ├── stm32f405xx_sram.icf
  459 +│   │   │   │   │   │   ├── stm32f407xx_flash.icf
  460 +│   │   │   │   │   │   ├── stm32f407xx_sram.icf
  461 +│   │   │   │   │   │   ├── stm32f410cx_flash.icf
  462 +│   │   │   │   │   │   ├── stm32f410cx_sram.icf
  463 +│   │   │   │   │   │   ├── stm32f410rx_flash.icf
  464 +│   │   │   │   │   │   ├── stm32f410rx_sram.icf
  465 +│   │   │   │   │   │   ├── stm32f410tx_flash.icf
  466 +│   │   │   │   │   │   ├── stm32f410tx_sram.icf
  467 +│   │   │   │   │   │   ├── stm32f411xe_flash.icf
  468 +│   │   │   │   │   │   ├── stm32f411xe_sram.icf
  469 +│   │   │   │   │   │   ├── stm32f412cx_flash.icf
  470 +│   │   │   │   │   │   ├── stm32f412cx_sram.icf
  471 +│   │   │   │   │   │   ├── stm32f412rx_flash.icf
  472 +│   │   │   │   │   │   ├── stm32f412rx_sram.icf
  473 +│   │   │   │   │   │   ├── stm32f412vx_flash.icf
  474 +│   │   │   │   │   │   ├── stm32f412vx_sram.icf
  475 +│   │   │   │   │   │   ├── stm32f412zx_flash.icf
  476 +│   │   │   │   │   │   ├── stm32f412zx_sram.icf
  477 +│   │   │   │   │   │   ├── stm32f413xx_flash.icf
  478 +│   │   │   │   │   │   ├── stm32f413xx_sram.icf
  479 +│   │   │   │   │   │   ├── stm32f415xx_flash.icf
  480 +│   │   │   │   │   │   ├── stm32f415xx_sram.icf
  481 +│   │   │   │   │   │   ├── stm32f417xx_flash.icf
  482 +│   │   │   │   │   │   ├── stm32f417xx_sram.icf
  483 +│   │   │   │   │   │   ├── stm32f423xx_flash.icf
  484 +│   │   │   │   │   │   ├── stm32f423xx_sram.icf
  485 +│   │   │   │   │   │   ├── stm32f427xx_flash.icf
  486 +│   │   │   │   │   │   ├── stm32f427xx_sram.icf
  487 +│   │   │   │   │   │   ├── stm32f429xx_flash.icf
  488 +│   │   │   │   │   │   ├── stm32f429xx_sram.icf
  489 +│   │   │   │   │   │   ├── stm32f437xx_flash.icf
  490 +│   │   │   │   │   │   ├── stm32f437xx_sram.icf
  491 +│   │   │   │   │   │   ├── stm32f439xx_flash.icf
  492 +│   │   │   │   │   │   ├── stm32f439xx_sram.icf
  493 +│   │   │   │   │   │   ├── stm32f446xx_flash.icf
  494 +│   │   │   │   │   │   ├── stm32f446xx_sram.icf
  495 +│   │   │   │   │   │   ├── stm32f469xx_flash.icf
  496 +│   │   │   │   │   │   ├── stm32f469xx_sram.icf
  497 +│   │   │   │   │   │   ├── stm32f479xx_flash.icf
  498 +│   │   │   │   │   │   └── stm32f479xx_sram.icf
  499 +│   │   │   │   │   ├── startup_stm32f401xc.s
  500 +│   │   │   │   │   ├── startup_stm32f401xe.s
  501 +│   │   │   │   │   ├── startup_stm32f405xx.s
  502 +│   │   │   │   │   ├── startup_stm32f407xx.s
  503 +│   │   │   │   │   ├── startup_stm32f410cx.s
  504 +│   │   │   │   │   ├── startup_stm32f410rx.s
  505 +│   │   │   │   │   ├── startup_stm32f410tx.s
  506 +│   │   │   │   │   ├── startup_stm32f411xe.s
  507 +│   │   │   │   │   ├── startup_stm32f412cx.s
  508 +│   │   │   │   │   ├── startup_stm32f412rx.s
  509 +│   │   │   │   │   ├── startup_stm32f412vx.s
  510 +│   │   │   │   │   ├── startup_stm32f412zx.s
  511 +│   │   │   │   │   ├── startup_stm32f413xx.s
  512 +│   │   │   │   │   ├── startup_stm32f415xx.s
  513 +│   │   │   │   │   ├── startup_stm32f417xx.s
  514 +│   │   │   │   │   ├── startup_stm32f423xx.s
  515 +│   │   │   │   │   ├── startup_stm32f427xx.s
  516 +│   │   │   │   │   ├── startup_stm32f429xx.s
  517 +│   │   │   │   │   ├── startup_stm32f437xx.s
  518 +│   │   │   │   │   ├── startup_stm32f439xx.s
  519 +│   │   │   │   │   ├── startup_stm32f446xx.s
  520 +│   │   │   │   │   ├── startup_stm32f469xx.s
  521 +│   │   │   │   │   └── startup_stm32f479xx.s
  522 +│   │   │   │   └── Include
  523 +│   │   │   │   ├── cmsis_armcc.h
  524 +│   │   │   │   ├── cmsis_armclang.h
  525 +│   │   │   │   ├── cmsis_compiler.h
  526 +│   │   │   │   ├── cmsis_gcc.h
  527 +│   │   │   │   ├── cmsis_iccarm.h
  528 +│   │   │   │   ├── cmsis_version.h
  529 +│   │   │   │   ├── core_armv8mbl.h
  530 +│   │   │   │   ├── core_armv8mml.h
  531 +│   │   │   │   ├── core_cm0.h
  532 +│   │   │   │   ├── core_cm0plus.h
  533 +│   │   │   │   ├── core_cm1.h
  534 +│   │   │   │   ├── core_cm23.h
  535 +│   │   │   │   ├── core_cm33.h
  536 +│   │   │   │   ├── core_cm3.h
  537 +│   │   │   │   ├── core_cm4.h
  538 +│   │   │   │   ├── core_cm7.h
  539 +│   │   │   │   ├── core_sc000.h
  540 +│   │   │   │   ├── core_sc300.h
  541 +│   │   │   │   ├── mpu_armv7.h
  542 +│   │   │   │   ├── mpu_armv8.h
  543 +│   │   │   │   └── tz_context.h
  544 +│   │   │   ├── STM32F4xx_HAL_Driver
  545 +│   │   │   │   ├── Inc
  546 +│   │   │   │   │   ├── Legacy
  547 +│   │   │   │   │   │   └── stm32_hal_legacy.h
  548 +│   │   │   │   │   ├── stm32f4xx_hal_cortex.h
  549 +│   │   │   │   │   ├── stm32f4xx_hal_def.h
  550 +│   │   │   │   │   ├── stm32f4xx_hal_dma_ex.h
  551 +│   │   │   │   │   ├── stm32f4xx_hal_dma.h
  552 +│   │   │   │   │   ├── stm32f4xx_hal_exti.h
  553 +│   │   │   │   │   ├── stm32f4xx_hal_flash_ex.h
  554 +│   │   │   │   │   ├── stm32f4xx_hal_flash.h
  555 +│   │   │   │   │   ├── stm32f4xx_hal_flash_ramfunc.h
  556 +│   │   │   │   │   ├── stm32f4xx_hal_gpio_ex.h
  557 +│   │   │   │   │   ├── stm32f4xx_hal_gpio.h
  558 +│   │   │   │   │   ├── stm32f4xx_hal.h
  559 +│   │   │   │   │   ├── stm32f4xx_hal_hcd.h
  560 +│   │   │   │   │   ├── stm32f4xx_hal_pwr_ex.h
  561 +│   │   │   │   │   ├── stm32f4xx_hal_pwr.h
  562 +│   │   │   │   │   ├── stm32f4xx_hal_rcc_ex.h
  563 +│   │   │   │   │   ├── stm32f4xx_hal_rcc.h
  564 +│   │   │   │   │   ├── stm32f4xx_hal_tim_ex.h
  565 +│   │   │   │   │   ├── stm32f4xx_hal_tim.h
  566 +│   │   │   │   │   ├── stm32f4xx_hal_uart.h
  567 +│   │   │   │   │   └── stm32f4xx_ll_usb.h
  568 +│   │   │   │   └── Src
  569 +│   │   │   │   ├── stm32f4xx_hal.c
  570 +│   │   │   │   ├── stm32f4xx_hal_cortex.c
  571 +│   │   │   │   ├── stm32f4xx_hal_dma.c
  572 +│   │   │   │   ├── stm32f4xx_hal_dma_ex.c
  573 +│   │   │   │   ├── stm32f4xx_hal_exti.c
  574 +│   │   │   │   ├── stm32f4xx_hal_flash.c
  575 +│   │   │   │   ├── stm32f4xx_hal_flash_ex.c
  576 +│   │   │   │   ├── stm32f4xx_hal_flash_ramfunc.c
  577 +│   │   │   │   ├── stm32f4xx_hal_gpio.c
  578 +│   │   │   │   ├── stm32f4xx_hal_hcd.c
  579 +│   │   │   │   ├── stm32f4xx_hal_pwr.c
  580 +│   │   │   │   ├── stm32f4xx_hal_pwr_ex.c
  581 +│   │   │   │   ├── stm32f4xx_hal_rcc.c
  582 +│   │   │   │   ├── stm32f4xx_hal_rcc_ex.c
  583 +│   │   │   │   ├── stm32f4xx_hal_tim.c
  584 +│   │   │   │   ├── stm32f4xx_hal_tim_ex.c
  585 +│   │   │   │   ├── stm32f4xx_hal_uart.c
  586 +│   │   │   │   └── stm32f4xx_ll_usb.c
  587 +│   │   │   └── USB_HOST
  588 +│   │   │   ├── App
  589 +│   │   │   │   ├── usb_host.c
  590 +│   │   │   │   └── usb_host.h
  591 +│   │   │   └── Target
  592 +│   │   │   ├── usbh_conf.c
  593 +│   │   │   └── usbh_conf.h
  594 +│   │   ├── hal
  595 +│   │   │   ├── hal_uart.c
  596 +│   │   │   └── hal_uart.h
  597 +│   │   ├── middlewares
  598 +│   │   │   ├── ST
  599 +│   │   │   │   └── STM32_USB_Host_Library
  600 +│   │   │   │   ├── Class
  601 +│   │   │   │   │   └── CDC
  602 +│   │   │   │   │   ├── Inc
  603 +│   │   │   │   │   │   └── usbh_cdc.h
  604 +│   │   │   │   │   └── Src
  605 +│   │   │   │   │   └── usbh_cdc.c
  606 +│   │   │   │   └── Core
  607 +│   │   │   │   ├── Inc
  608 +│   │   │   │   │   ├── usbh_core.h
  609 +│   │   │   │   │   ├── usbh_ctlreq.h
  610 +│   │   │   │   │   ├── usbh_def.h
  611 +│   │   │   │   │   ├── usbh_ioreq.h
  612 +│   │   │   │   │   └── usbh_pipes.h
  613 +│   │   │   │   └── Src
  614 +│   │   │   │   ├── usbh_core.c
  615 +│   │   │   │   ├── usbh_ctlreq.c
  616 +│   │   │   │   ├── usbh_ioreq.c
  617 +│   │   │   │   └── usbh_pipes.c
  618 +│   │   │   └── Third_Party
  619 +│   │   │   └── FreeRTOS
  620 +│   │   │   └── Source
  621 +│   │   │   ├── CMSIS_RTOS
  622 +│   │   │   │   ├── cmsis_os.c
  623 +│   │   │   │   └── cmsis_os.h
  624 +│   │   │   ├── croutine.c
  625 +│   │   │   ├── event_groups.c
  626 +│   │   │   ├── include
  627 +│   │   │   │   ├── atomic.h
  628 +│   │   │   │   ├── croutine.h
  629 +│   │   │   │   ├── deprecated_definitions.h
  630 +│   │   │   │   ├── event_groups.h
  631 +│   │   │   │   ├── FreeRTOS.h
  632 +│   │   │   │   ├── list.h
  633 +│   │   │   │   ├── message_buffer.h
  634 +│   │   │   │   ├── mpu_prototypes.h
  635 +│   │   │   │   ├── mpu_wrappers.h
  636 +│   │   │   │   ├── portable.h
  637 +│   │   │   │   ├── projdefs.h
  638 +│   │   │   │   ├── queue.h
  639 +│   │   │   │   ├── semphr.h
  640 +│   │   │   │   ├── stack_macros.h
  641 +│   │   │   │   ├── StackMacros.h
  642 +│   │   │   │   ├── stream_buffer.h
  643 +│   │   │   │   ├── task.h
  644 +│   │   │   │   └── timers.h
  645 +│   │   │   ├── list.c
  646 +│   │   │   ├── portable
  647 +│   │   │   │   ├── GCC
  648 +│   │   │   │   │   └── ARM_CM4F
  649 +│   │   │   │   │   ├── port.c
  650 +│   │   │   │   │   └── portmacro.h
  651 +│   │   │   │   ├── MemMang
  652 +│   │   │   │   │   └── heap_4.c
  653 +│   │   │   │   └── RVDS
  654 +│   │   │   │   ├── ARM7_LPC21xx
  655 +│   │   │   │   │   ├── portASM.s
  656 +│   │   │   │   │   ├── port.c
  657 +│   │   │   │   │   ├── portmacro.h
  658 +│   │   │   │   │   └── portmacro.inc
  659 +│   │   │   │   ├── ARM_CA9
  660 +│   │   │   │   │   ├── portASM.s
  661 +│   │   │   │   │   ├── port.c
  662 +│   │   │   │   │   ├── portmacro.h
  663 +│   │   │   │   │   └── portmacro.inc
  664 +│   │   │   │   ├── ARM_CM0
  665 +│   │   │   │   │   ├── port.c
  666 +│   │   │   │   │   └── portmacro.h
  667 +│   │   │   │   ├── ARM_CM3
  668 +│   │   │   │   │   ├── port.c
  669 +│   │   │   │   │   └── portmacro.h
  670 +│   │   │   │   ├── ARM_CM4F
  671 +│   │   │   │   │   ├── port.c
  672 +│   │   │   │   │   └── portmacro.h
  673 +│   │   │   │   ├── ARM_CM4_MPU
  674 +│   │   │   │   │   ├── port.c
  675 +│   │   │   │   │   └── portmacro.h
  676 +│   │   │   │   └── ARM_CM7
  677 +│   │   │   │   ├── r0p1
  678 +│   │   │   │   │   ├── port.c
  679 +│   │   │   │   │   └── portmacro.h
  680 +│   │   │   │   └── ReadMe.txt
  681 +│   │   │   ├── queue.c
  682 +│   │   │   ├── stream_buffer.c
  683 +│   │   │   ├── tasks.c
  684 +│   │   │   └── timers.c
  685 +│   │   ├── project
  686 +│   │   │   ├── armgcc
  687 +│   │   │   │   ├── CMakeLists.txt
  688 +│   │   │   │   ├── STM32F407VGTX_FLASH.ld
  689 +│   │   │   │   └── stm32f4discovery.cfg
  690 +│   │   │   ├── mdk
  691 +│   │   │   │   ├── mdk_app.sct
  692 +│   │   │   │   └── mdk_app.uvprojx
  693 +│   │   │   └── mdk_bootloader
  694 +│   │   │   └── mdk_bootloader.uvprojx
  695 +│   │   └── readme.txt
  696 +│   └── sample_c++
  697 +│   ├── module_sample
  698 +│   │   ├── camera_manager
  699 +│   │   │   ├── test_camera_manager_entry.cpp
  700 +│   │   │   └── test_camera_manager_entry.h
  701 +│   │   ├── flight_controller
  702 +│   │   │   ├── config
  703 +│   │   │   │   └── flying_config.json
  704 +│   │   │   ├── test_flight_controller_command_flying.cpp
  705 +│   │   │   ├── test_flight_controller_command_flying.h
  706 +│   │   │   ├── test_flight_controller_entry.cpp
  707 +│   │   │   └── test_flight_controller_entry.h
  708 +│   │   ├── gimbal
  709 +│   │   │   ├── test_gimbal_entry.cpp
  710 +│   │   │   └── test_gimbal_entry.hpp
  711 +│   │   ├── hms_manager
  712 +│   │   │   ├── hms_manager_entry.cpp
  713 +│   │   │   └── hms_manager_entry.h
  714 +│   │   ├── liveview
  715 +│   │   │   ├── data
  716 +│   │   │   │   ├── haarcascade_frontalface_alt.xml
  717 +│   │   │   │   └── tensorflow
  718 +│   │   │   │   ├── frozen_inference_graph.pb
  719 +│   │   │   │   └── ssd_inception_v2_coco_2017_11_17.pbtxt
  720 +│   │   │   ├── dji_camera_image_handler.cpp
  721 +│   │   │   ├── dji_camera_image_handler.hpp
  722 +│   │   │   ├── dji_camera_stream_decoder.cpp
  723 +│   │   │   ├── dji_camera_stream_decoder.hpp
  724 +│   │   │   ├── test_liveview.cpp
  725 +│   │   │   ├── test_liveview_entry.cpp
  726 +│   │   │   ├── test_liveview_entry.hpp
  727 +│   │   │   └── test_liveview.hpp
  728 +│   │   └── perception
  729 +│   │   ├── test_perception.cpp
  730 +│   │   ├── test_perception_entry.cpp
  731 +│   │   ├── test_perception_entry.hpp
  732 +│   │   └── test_perception.hpp
  733 +│   └── platform
  734 +│   └── linux
  735 +│   ├── common
  736 +│   │   ├── 3rdparty
  737 +│   │   │   ├── FindFFMPEG.cmake
  738 +│   │   │   ├── FindLIBUSB.cmake
  739 +│   │   │   └── FindOPUS.cmake
  740 +│   │   └── osal
  741 +│   │   ├── osal.c
  742 +│   │   ├── osal_fs.c
  743 +│   │   ├── osal_fs.h
  744 +│   │   ├── osal.h
  745 +│   │   ├── osal_socket.c
  746 +│   │   └── osal_socket.h
  747 +│   ├── manifold2
  748 +│   │   ├── application
  749 +│   │   │   ├── application.cpp
  750 +│   │   │   ├── application.hpp
  751 +│   │   │   ├── dji_sdk_app_info.h
  752 +│   │   │   ├── dji_sdk_config.h
  753 +│   │   │   ├── dji_sdk_config.json
  754 +│   │   │   └── main.cpp
  755 +│   │   ├── CMakeLists.txt
  756 +│   │   └── hal
  757 +│   │   ├── hal_network.c
  758 +│   │   ├── hal_network.h
  759 +│   │   ├── hal_uart.c
  760 +│   │   ├── hal_uart.h
  761 +│   │   ├── hal_usb_bulk.c
  762 +│   │   └── hal_usb_bulk.h
  763 +│   └── nvidia_jetson
  764 +│   ├── application
  765 +│   │   ├── application.cpp
  766 +│   │   ├── application.hpp
  767 +│   │   ├── dji_sdk_app_info.h
  768 +│   │   ├── dji_sdk_config.h
  769 +│   │   └── main.cpp
  770 +│   ├── CMakeLists.txt
  771 +│   └── hal
  772 +│   ├── hal_network.c
  773 +│   ├── hal_network.h
  774 +│   ├── hal_uart.c
  775 +│   ├── hal_uart.h
  776 +│   ├── hal_usb_bulk.c
  777 +│   └── hal_usb_bulk.h
  778 +└── tools
  779 + └── file2c
  780 + ├── file2c.exe
  781 + └── readme.txt
  782 +
  783 +Unless otherwise agreed, all other portions of DJI’s Payload SDK are and will be made available under the SDK End User License Agreement (EULA). A copy of the SDK EULA is distributed with this software and is available at https://developer.dji.com/policies/eula/.
  784 +-------------------------------------------------------------
  785 +Copyright (c) 2021 DJI.
  786 +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
  787 +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  788 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  789 +===============================================================
  790 +DJI’s Payload SDK uses libraries of List and MD5, whose license is as below.
  791 +
  792 +-------------------------------------------------------------
  793 +crypto-algorithms
  794 +=================
  795 +About
  796 +---
  797 +These are basic implementations of standard cryptography algorithms, written by Brad Conte (brad@bradconte.com) from
  798 +scratch and without any cross-licensing. They exist to provide publically accessible, restriction-free implementations
  799 +of popular cryptographic algorithms, like AES and SHA-1. These are primarily intended for educational and pragmatic
  800 +purposes (such as comparing a specification to actual implementation code, or for building an internal application
  801 +that computes test vectors for a product). The algorithms have been tested against standard test vectors.
  802 +This code is released into the public domain free of any restrictions. The author requests acknowledgement if the code
  803 +is used, but does not require it. This code is provided free of any liability and without any quality claims by the
  804 +author.
  805 +Note that these are *not* cryptographically secure implementations. They have no resistence to side-channel attacks
  806 +and should not be used in contexts that need cryptographically secure implementations.
  807 +These algorithms are not optimized for speed or space. They are primarily designed to be easy to read, although some
  808 +basic optimization techniques have been employed.
  809 +Building
  810 +The source code for each algorithm will come in a pair of a source code file and a header file. There should be no
  811 +inter-header file dependencies, no additional libraries, no platform-specific header files, or any other complicating
  812 +matters. Compiling them should be as easy as adding the relevent source code to the project.
  813 +===============================================================
  814 +DJI’s Payload SDK uses libraries of CMSIS (https://developer.arm.com/tools-and-software/embedded/cmsis), which is licensed under the Apache License, Version 2.0. A copy of the Apache license is provided below and is also available at http://www.apache.org/licenses/LICENSE-2.0.
  815 +
  816 +-------------------------------------------------------------
  817 +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  818 +
  819 +1. Definitions.
  820 +
  821 +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
  822 +
  823 +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
  824 +
  825 +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
  826 +
  827 +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
  828 +
  829 +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
  830 +
  831 +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
  832 +
  833 +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
  834 +
  835 +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
  836 +
  837 +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
  838 +
  839 +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
  840 +
  841 +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
  842 +
  843 +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
  844 +
  845 +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
  846 +
  847 +You must give any other recipients of the Work or Derivative Works a copy of this License; and
  848 +You must cause any modified files to carry prominent notices stating that You changed the files; and
  849 +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
  850 +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
  851 +
  852 +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
  853 +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
  854 +
  855 +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
  856 +
  857 +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
  858 +
  859 +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
  860 +
  861 +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
  862 +
  863 +END OF TERMS AND CONDITIONS
  864 +===============================================================
  865 +DJI’s Payload SDK uses unmodified libraries of cJSON, whose license is as below.
  866 +
  867 +-------------------------------------------------------------
  868 + Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
  869 +
  870 + Permission is hereby granted, free of charge, to any person obtaining a copy
  871 + of this software and associated documentation files (the "Software"), to deal
  872 + in the Software without restriction, including without limitation the rights
  873 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  874 + copies of the Software, and to permit persons to whom the Software is
  875 + furnished to do so, subject to the following conditions:
  876 +
  877 + The above copyright notice and this permission notice shall be included in
  878 + all copies or substantial portions of the Software.
  879 +
  880 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  881 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  882 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  883 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  884 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  885 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  886 + THE SOFTWARE.
  887 +===============================================================
  888 +DJI’s Payload SDK uses unmodified libraries of freeRTOS (http://www.FreeRTOS.org), which is licensed under the MIT License. Full license text is available on the following link: http://www.freertos.org/a00114.html. A copy of the MIT license is provided below and is also available at https://opensource.org/licenses/MIT.
  889 +
  890 +-------------------------------------------------------------
  891 +Permission is hereby granted, free of charge, to any person obtaining a copy of
  892 +this software and associated documentation files (the "Software"), to deal in
  893 +the Software without restriction, including without limitation the rights to
  894 +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  895 +the Software, and to permit persons to whom the Software is furnished to do so,
  896 +subject to the following conditions:
  897 +
  898 +The above copyright notice and this permission notice shall be included in all
  899 +copies or substantial portions of the Software.
  900 +
  901 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  902 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  903 +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  904 +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  905 +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  906 +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  907 +
  908 +===============================================================
  909 +DJI’s Payload SDK uses unmodified libraries of STM32F4xx_HAL_Driver, BSP STM324xG_EVAL libraries and STM32 Projects libraries in STM32CubeF4 package, which is licensed by ST under BSD 3-Clause license. A copy of the license is provided below and is also available at opensource.org/licenses/BSD-3-Clause.
  910 +
  911 +-------------------------------------------------------------
  912 +Note: This license has also been called the "New BSD License" or "Modified BSD License". See also the 2-clause BSD License.
  913 +
  914 +Copyright <YEAR> <COPYRIGHT HOLDER>
  915 +
  916 +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  917 +
  918 +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  919 +
  920 +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  921 +
  922 +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  923 +
  924 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  925 +
  926 +===============================================================
  927 +DJI’s Payload SDK uses unmodified libraries of STM32_USB_Host_Library, whose license is as below.
  928 +
  929 +-------------------------------------------------------------
  930 +Under STMicroelectronics’ intellectual property rights, the redistribution, reproduction and use in source and binary forms of the software or any part thereof, with or without modification, are permitted provided that the following conditions are met:
  931 +1. Redistribution of source code (modified or not) must retain any copyright notice, this list of conditions and the disclaimer set forth below as items 10 and 11.
  932 +
  933 +2. Redistributions in binary form, except as embedded into microcontroller or microprocessor device manufactured by or for STMicroelectronics or a software update for such device, must reproduce any copyright notice provided with the binary code, this list of conditions, and the disclaimer set forth below as items 10 and 11, in documentation and/or other materials provided with the distribution.
  934 +
  935 +3. Neither the name of STMicroelectronics nor the names of other contributors to this software may be used to endorse or promote products derived from this software or part thereof without specific written permission.
  936 +
  937 +4. This software or any part thereof, including modifications and/or derivative works of this software, must be used and execute solely and exclusively on or in combination with a microcontroller or microprocessor device manufactured by or for STMicroelectronics.
  938 +
  939 +5. No use, reproduction or redistribution of this software partially or totally may be done in any manner that would subject this software to any Open Source Terms. “Open Source Terms” shall mean any open source license which requires as part of distribution of software that the source code of such software is distributed therewith or otherwise made available, or open source license that substantially complies with the Open Source definition specified at www.opensource.org and any other comparable open source license such as for example GNU General Public License (GPL), Eclipse Public License (EPL), Apache Software License, BSD license or MIT license.
  940 +
  941 +6. STMicroelectronics has no obligation to provide any maintenance, support or updates for the software.
  942 +
  943 +7. The software is and will remain the exclusive property of STMicroelectronics and its licensors. The recipient will not take any action that jeopardizes STMicroelectronics and its licensors' proprietary rights or acquire any rights in the software, except the limited rights specified hereunder.
  944 +
  945 +8. The recipient shall comply with all applicable laws and regulations affecting the use of the software or any part thereof including any applicable export control law or regulation.
  946 +
  947 +9. Redistribution and use of this software or any part thereof other than as permitted under this license is void and will automatically terminate your rights under this license.
  948 +
  949 +10. THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS, WHICH ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  950 +
  951 +11. EXCEPT AS EXPRESSLY PERMITTED HEREUNDER, NO LICENSE OR OTHER RIGHTS, WHETHER EXPRESS OR IMPLIED, ARE GRANTED UNDER ANY PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF STMICROELECTRONICS OR ANY THIRD PARTY.
  1 +# DJI Payload SDK (PSDK)
  2 +
  3 +![](https://img.shields.io/badge/version-V3.10.0-red.svg)
  4 +![](https://img.shields.io/badge/platform-linux_|_rtos-blue.svg)
  5 +![](https://img.shields.io/badge/license-MIT-purple.svg)
  6 +
  7 +## What is the DJI Payload SDK?
  8 +
  9 +The DJI Payload SDK(PSDK), is a development kit provided by DJI to support developers to develop payload that can be
  10 +mounted on DJI drones. Combined with the X-Port, SkyPort or extension port adapter, developers can obtain the
  11 +information or other resource from the drone. According to the software logic and algorithm framework designed by the
  12 +developer, users could develop payload that can be mounted on DJI Drone, to perform actions they need, such as Automated
  13 +Flight Controller, Payload Controller, Video Image Analysis Platform, Mapping Camera, Megaphone And Searchlight, etc.
  14 +
  15 +## Documentation
  16 +
  17 +For full documentation, please visit
  18 +the [DJI Developer Documentation](https://developer.dji.com/doc/payload-sdk-tutorial/en/). Documentation regarding the
  19 +code can be found in the [PSDK API Reference](https://developer.dji.com/doc/payload-sdk-api-reference/en/)
  20 +section of the developer's website. Please visit
  21 +the [Latest Version Information](https://developer.dji.com/doc/payload-sdk-tutorial/en/)
  22 +to get the latest version information.
  23 +
  24 +## Latest Release
  25 +
  26 +The latest release version of PSDK is 3.10.0. This version of Payload SDK mainly add some new features support and fixed some
  27 +bugs. Please refer to the release notes for detailed changes list.
  28 +
  29 +* Supports Matrice 4T/4E models
  30 +* Supports DJI SDK Certified Chip (DJI SDK CC).
  31 +
  32 +## License
  33 +
  34 +Payload SDK codebase is MIT-licensed. Please refer to the LICENSE file for detailed information.
  35 +
  36 +## Support
  37 +
  38 +You can get official support from DJI and the community with the following methods:
  39 +
  40 +- Post questions on Developer Forum
  41 + * [DJI SDK Developer Forum(Cn)](https://djisdksupport.zendesk.com/hc/zh-cn/community/topics)
  42 + * [DJI SDK Developer Forum(En)](https://djisdksupport.zendesk.com/hc/en-us/community/topics)
  43 +- Submit a request describing your problem on Developer Support
  44 + * [DJI SDK Developer Support(Cn)](https://djisdksupport.zendesk.com/hc/zh-cn/requests/new)
  45 + * [DJI SDK Developer Support(En)](https://djisdksupport.zendesk.com/hc/en-us/requests/new)
  46 +
  47 +You can also communicate with other developers by the following methods:
  48 +
  49 +- Post questions on [**Stackoverflow**](http://stackoverflow.com) using [**
  50 + dji-sdk**](http://stackoverflow.com/questions/tagged/dji-sdk) tag
  51 +
  52 +## About Pull Request
  53 +As always, the DJI Dev Team is committed to improving your developer experience, and we also welcome your contribution,
  54 +but the code review of any pull request maybe not timely, when you have any questionplease send an email to dev@dji.com.
  1 +/**
  2 + ********************************************************************
  3 + * @file dji_sdk_template.c
  4 + * @brief
  5 + *
  6 + * @copyright (c) 2021 DJI. All rights reserved.
  7 + *
  8 + * All information contained herein is, and remains, the property of DJI.
  9 + * The intellectual and technical concepts contained herein are proprietary
  10 + * to DJI and may be covered by U.S. and foreign patents, patents in process,
  11 + * and protected by trade secret or copyright law. Dissemination of this
  12 + * information, including but not limited to data and other proprietary
  13 + * material(s) incorporated within the information, in any form, is strictly
  14 + * prohibited without the express written consent of DJI.
  15 + *
  16 + * If you receive this source code without DJI’s authorization, you may not
  17 + * further disseminate the information, and you must immediately remove the
  18 + * source code and notify DJI of its removal. DJI reserves the right to pursue
  19 + * legal actions against you for any loss(es) or damage(s) caused by your
  20 + * failure to do so.
  21 + *
  22 + *********************************************************************
  23 + */
  24 +
  25 +/* Includes ------------------------------------------------------------------*/
  26 +#include "dji_sdk_template.h"
  27 +
  28 +/* Private constants ---------------------------------------------------------*/
  29 +#define MAX_PACKAGE_LEN 256
  30 +
  31 +/* Private types -------------------------------------------------------------*/
  32 +
  33 +/* Private values -------------------------------------------------------------*/
  34 +static uint8_t s_SendBuffer[DJI_TEMPLATE_MAX_BUFFER_SIZE];
  35 +
  36 +/* Private functions declaration ---------------------------------------------*/
  37 +static int DjiTemplate_PrivateSend(const uint8_t *buffer, uint16_t len);
  38 +
  39 +/* Exported functions definition ---------------------------------------------*/
  40 +/**
  41 + * @brief DJI protocol initialization.
  42 + * @param None.
  43 + * @return None.
  44 + */
  45 +void DjiSdkTemplate_Init(void)
  46 +{
  47 + /* NOTE : This function should be implemented in the user file. */
  48 +}
  49 +
  50 +/**
  51 + * @brief Send data function.
  52 + * @param buffer : the buffer point send data
  53 + * @param len : send data length
  54 + * @return if >= 0, indicate the real send data length; if < 0, indicate the -ErrorCode for send failure reason.
  55 + */
  56 +int DjiSdkTemplate_Send(const uint8_t *buffer, uint16_t len)
  57 +{
  58 + uint16_t realLen;
  59 +
  60 + if (len > MAX_PACKAGE_LEN) {
  61 + realLen = MAX_PACKAGE_LEN;
  62 + } else {
  63 + realLen = len;
  64 + }
  65 +
  66 + DjiTemplate_PrivateSend(buffer, len);
  67 +
  68 + return realLen;
  69 +}
  70 +
  71 +/* Private functions definition-----------------------------------------------*/
  72 +/**
  73 + * @brief DJI low level send function.
  74 + * @param buffer Pointer to send data buffer.
  75 + * @param len Size of data to be sent.
  76 + * @return Size of data to be sent.
  77 + */
  78 +static int DjiTemplate_PrivateSend(const uint8_t *buffer, uint16_t len)
  79 +{
  80 + /* NOTE : This function should be implemented in the user file. */
  81 + return len;
  82 +}
  83 +
  84 +/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/
  1 +/**
  2 + ********************************************************************
  3 + * @file dji_sdk_template.h
  4 + * @brief This is the header file for "dji_sdk_template.c", defining the structure and
  5 + * (exported) function prototypes.
  6 + *
  7 + * @copyright (c) 2021 DJI. All rights reserved.
  8 + *
  9 + * All information contained herein is, and remains, the property of DJI.
  10 + * The intellectual and technical concepts contained herein are proprietary
  11 + * to DJI and may be covered by U.S. and foreign patents, patents in process,
  12 + * and protected by trade secret or copyright law. Dissemination of this
  13 + * information, including but not limited to data and other proprietary
  14 + * material(s) incorporated within the information, in any form, is strictly
  15 + * prohibited without the express written consent of DJI.
  16 + *
  17 + * If you receive this source code without DJI’s authorization, you may not
  18 + * further disseminate the information, and you must immediately remove the
  19 + * source code and notify DJI of its removal. DJI reserves the right to pursue
  20 + * legal actions against you for any loss(es) or damage(s) caused by your
  21 + * failure to do so.
  22 + *
  23 + *********************************************************************
  24 + */
  25 +
  26 +/* Define to prevent recursive inclusion -------------------------------------*/
  27 +#ifndef DJI_SDK_TEMPLATE_H
  28 +#define DJI_SDK_TEMPLATE_H
  29 +
  30 +/* Includes ------------------------------------------------------------------*/
  31 +#include <stdint.h>
  32 +
  33 +#ifdef __cplusplus
  34 +extern "C" {
  35 +#endif
  36 +
  37 +/* Exported constants --------------------------------------------------------*/
  38 +#define DJI_TEMPLATE_MAX_BUFFER_SIZE 256
  39 +
  40 +/**
  41 + * @defgroup psdk_some_flag
  42 + * @{
  43 + */
  44 +#define DJI_TEMPLATE_SUCCESS (0)
  45 +#define DJI_TEMPLATE_FAILURE (-1)
  46 +
  47 +#define DJI_SOME_FLAG_AAA 1 /*!< Define line comment. */
  48 +#define DJI_SOME_FLAG_BBB 2 /*!< Define line comment,
  49 + if comment is too long, split line. */
  50 +#define DJI_SOME_FLAG_CCC 3
  51 +
  52 +#define IS_DJI_SOME_FLAG(FLAG) (((FLAG) == DJI_SOME_FLAG_AAA) || \
  53 + ((FLAG) == DJI_SOME_FLAG_BBB) || \
  54 + ((FLAG) == DJI_SOME_FLAG_CCC))
  55 +
  56 +/**
  57 + * @}
  58 + */
  59 +#define DJI_TEMPLATE_MIN(a, b) (((a)<(b))?(a):(b))
  60 +
  61 +/* Exported types ------------------------------------------------------------*/
  62 +/**
  63 + * @brief Enum brief comment.
  64 + */
  65 +typedef enum {
  66 + TEMPLATE_COLOR_RED = 0,
  67 + TEMPLATE_COLOR_GREED = 1,
  68 + TEMPLATE_COLOR_BLUE = 2,
  69 +} E_TemplateColor;
  70 +
  71 +/**
  72 + * @brief Struct brief comment.
  73 + */
  74 +typedef struct {
  75 + uint8_t structMember1; /*!< structure member comment. */
  76 + uint8_t longStructMember2; /*!< structure member comment. */
  77 +
  78 + uint8_t someFlag; /*!< if this value use marco define ,must use defgroup to indicate, and comment here
  79 + use ref. for example:
  80 + someFlag of DJI template. This parameter can be a value of @ref psdk_some_flag */
  81 +} T_StructDefine;
  82 +
  83 +typedef void (*DjiTemplateFunc)(void);
  84 +
  85 +typedef int Inttype;
  86 +
  87 +/* Use pack(1) to transfer structure. */
  88 +#pragma pack(1)
  89 +
  90 +typedef struct {
  91 + uint8_t structMember1;
  92 + uint32_t structMember2;
  93 +} T_StructProtocolCommunication;
  94 +
  95 +#pragma pack()
  96 +
  97 +/* Exported functions --------------------------------------------------------*/
  98 +void DjiSdkTemplate_Init(void);
  99 +int DjiSdkTemplate_Send(const uint8_t *buffer, uint16_t len);
  100 +
  101 +#ifdef __cplusplus
  102 +}
  103 +#endif
  104 +
  105 +#endif // DJI_SDK_TEMPLATE_H
  106 +/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
  1 +Dear Developers, for subsequent new models, the model files will be updated on the designated page of our official website, and will no longer be maintained in the GitHub software package.
  2 +For more details, please visit: https://developer.dji.com/doc/payload-sdk-tutorial/en/model-instruction/payload-develop-criterion.html#structural-design-standards
  3 +
  1 +/**
  2 + ********************************************************************
  3 + * @file dji_aircraft_info.h
  4 + * @brief This is the header file for "dji_aircraft_info.c", defining the structure and
  5 + * (exported) function prototypes.
  6 + *
  7 + * @copyright (c) 2021 DJI. All rights reserved.
  8 + *
  9 + * All information contained herein is, and remains, the property of DJI.
  10 + * The intellectual and technical concepts contained herein are proprietary
  11 + * to DJI and may be covered by U.S. and foreign patents, patents in process,
  12 + * and protected by trade secret or copyright law. Dissemination of this
  13 + * information, including but not limited to data and other proprietary
  14 + * material(s) incorporated within the information, in any form, is strictly
  15 + * prohibited without the express written consent of DJI.
  16 + *
  17 + * If you receive this source code without DJI’s authorization, you may not
  18 + * further disseminate the information, and you must immediately remove the
  19 + * source code and notify DJI of its removal. DJI reserves the right to pursue
  20 + * legal actions against you for any loss(es) or damage(s) caused by your
  21 + * failure to do so.
  22 + *
  23 + *********************************************************************
  24 + */
  25 +
  26 +/* Define to prevent recursive inclusion -------------------------------------*/
  27 +#ifndef DJI_AIRCRAFT_INFO_H
  28 +#define DJI_AIRCRAFT_INFO_H
  29 +
  30 +/* Includes ------------------------------------------------------------------*/
  31 +#include "dji_typedef.h"
  32 +
  33 +#ifdef __cplusplus
  34 +extern "C" {
  35 +#endif
  36 +
  37 +/* Exported constants --------------------------------------------------------*/
  38 +
  39 +/* Exported types ------------------------------------------------------------*/
  40 +/**
  41 + * @brief Information related to mobile APP.
  42 + */
  43 +typedef struct {
  44 + E_DjiMobileAppLanguage appLanguage; /*!< Mobile APP system language */
  45 + E_DjiMobileAppScreenType appScreenType; /*!< Mobile APP screen size type. */
  46 +} T_DjiMobileAppInfo;
  47 +
  48 +/**
  49 + * @brief Basic information about the aircraft system, mainly including some constant parameters information.
  50 + */
  51 +typedef struct {
  52 + E_DjiAircraftSeries aircraftSeries; /*!< Aircraft series. */
  53 + E_DjiMountPositionType mountPositionType; /*!< Mount position type. */
  54 + E_DjiAircraftType aircraftType; /*!< Aircraft type. */
  55 + E_DjiSdkAdapterType djiAdapterType; /*!< DJI adapter type. */
  56 + E_DjiMountPosition mountPosition; /*!< Payload mount position. */
  57 +} T_DjiAircraftInfoBaseInfo;
  58 +
  59 +/**
  60 + * @brief Aircraft version information.
  61 + */
  62 +typedef struct {
  63 + uint8_t debugVersion;
  64 + uint8_t modifyVersion;
  65 + uint8_t minorVersion;
  66 + uint8_t majorVersion;
  67 +} T_DjiAircraftVersion;
  68 +
  69 +/* Exported functions --------------------------------------------------------*/
  70 +/**
  71 + * @brief Basic information about the aircraft system, including aircraft type and DJI adapter type.
  72 + * @param baseInfo: Pointer to a memory space where the aircraft's basic information will be stored.
  73 + * @return Execution result.
  74 + */
  75 +T_DjiReturnCode DjiAircraftInfo_GetBaseInfo(T_DjiAircraftInfoBaseInfo *baseInfo);
  76 +
  77 +/**
  78 + * @brief Get information related to mobile app.
  79 + * @note Returns unknown for app language and screen type if the RC or app is not connected to the aircraft system.
  80 + * @param mobileAppInfo: Pointer to a memory space where the mobile app information will be stored.
  81 + * @return Execution result.
  82 + */
  83 +T_DjiReturnCode DjiAircraftInfo_GetMobileAppInfo(T_DjiMobileAppInfo *mobileAppInfo);
  84 +
  85 +/**
  86 + * @brief Get connection status between the payload and the aircraft.
  87 + * @note Update period: 1Hz
  88 + * @param isConnected: Pointer to connection status.
  89 + * @return Execution result.
  90 + */
  91 +T_DjiReturnCode DjiAircraftInfo_GetConnectionStatus(bool *isConnected);
  92 +
  93 +/**
  94 + * @brief Get version of the aircraft.
  95 + * @param aircraftVersion: Pointer to aircraft version.
  96 + * @return Execution result.
  97 + */
  98 +T_DjiReturnCode DjiAircraftInfo_GetAircraftVersion(T_DjiAircraftVersion *aircraftVersion);
  99 +
  100 +#ifdef __cplusplus
  101 +}
  102 +#endif
  103 +
  104 +#endif //DJI_AIRCRAFT_INFO_H
  105 +
  106 +/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
  1 +/**
  2 + ********************************************************************
  3 + * @file dji_camera_manager.h
  4 + * @brief This is the header file for "dji_camera_manager.c", defining the structure and
  5 + * (exported) function prototypes.
  6 + *
  7 + * @copyright (c) 2021 DJI. All rights reserved.
  8 + *
  9 + * All information contained herein is, and remains, the property of DJI.
  10 + * The intellectual and technical concepts contained herein are proprietary
  11 + * to DJI and may be covered by U.S. and foreign patents, patents in process,
  12 + * and protected by trade secret or copyright law. Dissemination of this
  13 + * information, including but not limited to data and other proprietary
  14 + * material(s) incorporated within the information, in any form, is strictly
  15 + * prohibited without the express written consent of DJI.
  16 + *
  17 + * If you receive this source code without DJI’s authorization, you may not
  18 + * further disseminate the information, and you must immediately remove the
  19 + * source code and notify DJI of its removal. DJI reserves the right to pursue
  20 + * legal actions against you for any loss(es) or damage(s) caused by your
  21 + * failure to do so.
  22 + *
  23 + *********************************************************************
  24 + */
  25 +
  26 +/* Define to prevent recursive inclusion -------------------------------------*/
  27 +#ifndef DJI_CAMERA_MANAGER_H
  28 +#define DJI_CAMERA_MANAGER_H
  29 +
  30 +/* Includes ------------------------------------------------------------------*/
  31 +#include "dji_typedef.h"
  32 +
  33 +#ifdef __cplusplus
  34 +extern "C" {
  35 +#endif
  36 +
  37 +/* Exported constants --------------------------------------------------------*/
  38 +
  39 +/* Exported types ------------------------------------------------------------*/
  40 +/*! @brief CameraModule work modes.
  41 + */
  42 +typedef enum {
  43 + /*!
  44 + - Capture mode. In this mode, the user can capture pictures.
  45 + */
  46 + DJI_CAMERA_MANAGER_WORK_MODE_SHOOT_PHOTO = 0,
  47 + /*!
  48 + - Record mode. In this mode, the user can record videos.
  49 + */
  50 + DJI_CAMERA_MANAGER_WORK_MODE_RECORD_VIDEO = 1,
  51 + /*!
  52 + - Playback mode. In this mode, the user can preview photos and videos, and
  53 + can delete files. It is supported by Phantom 3 Professional camera, X3, X5
  54 + and X5R cameras on aircraft and Phantom 4 camera. Playback mode is not
  55 + supported by Z30, X5S, X4S, Phantom 4 Pro, Mavic Pro, Phantom 3 Standard,
  56 + Phantom 3 Advanced, Phantom 3 4K and Osmo series.
  57 + */
  58 + DJI_CAMERA_MANAGER_WORK_MODE_PLAYBACK = 2,
  59 + /*!
  60 + - In this mode, the user can download media to the Mobile Device. Not
  61 + supported by X5 camera nor X5R camera while mounted on aircraft.
  62 + */
  63 + DJI_CAMERA_MANAGER_WORK_MODE_MEDIA_DOWNLOAD = 3,
  64 + /*!
  65 + - In this mode, live stream resolution and frame rate will be 1080i50 (PAL)
  66 + or 720p60 (NTSC). In this mode videos can be recorded. Still photos can
  67 + also be taken only when video is recording. The only way to exit broadcast
  68 + mode is to change modes to RECORD_VIDEO. Only supported by Inspire 2.
  69 + */
  70 + DJI_CAMERA_MANAGER_WORK_MODE_BROADCAST = 4,
  71 + /*!
  72 + * The camera work mode is unknown.
  73 + */
  74 + DJI_CAMERA_MANAGER_WORK_MODE_WORK_MODE_UNKNOWN = 0xFF,
  75 +} E_DjiCameraManagerWorkMode;
  76 +
  77 +/*! @brief The ShootPhoto mode itself can have several modes. The default
  78 + * value is SINGLE.
  79 + */
  80 +typedef enum {
  81 + /*!
  82 + - Sets the camera to take a single photo.
  83 + */
  84 + DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_SINGLE = 0x01,
  85 + /*!
  86 + - Sets the camera to take an HDR photo. X5 camera, X5R camera, XT camera,
  87 + Z30 camera, Phantom 4 Pro camera, X4S camera and X5S camera do not support
  88 + HDR mode.
  89 + */
  90 + DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_HDR = 0x02,
  91 + /*!
  92 + - Set the camera to take multiple photos at once. XT camera does not
  93 + support Burst mode.
  94 + */
  95 + DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_BURST = 0x04,
  96 + /*!
  97 + - Automatic Exposure Bracketing (AEB) capture. In this mode you can quickly
  98 + take multiple shots (the default is 3) at different exposures without
  99 + having to manually change any settings between frames. XT camera and Z30
  100 + camera does not support AEB mode.
  101 + */
  102 + DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_AEB = 0x05,
  103 + /*!
  104 + - Sets the camera to take a picture (or multiple pictures) continuously at
  105 + a set time interval. The minimum interval for JPEG format of any quality is
  106 + 2s. For all cameras except X4S, X5S and Phantom 4 Pro camera: The minimum
  107 + interval for RAW or RAW+JPEG format is 10s. For the X4S, X5S and Phantom 4
  108 + Pro cameras the minimum interval for RAW or RAW+JPEG dformat is 5s.
  109 + */
  110 + DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_INTERVAL = 0x06,
  111 + /*!
  112 + - Sets the camera to take a burst of RAW photos. Use getRAWPhotoBurstCount
  113 + to check how many photos have been shot. Only supported by X5S.
  114 + */
  115 + DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_RAW_BURST = 0x09,
  116 + /*!
  117 + - Sets the camera to take an regional photos. It is supported by H20/H20T.
  118 + */
  119 + DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_REGIONAL_SR = 0x16,
  120 + /*!
  121 + - The shoot photo mode is unknown.
  122 + */
  123 + DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_UNKNOWN = 0xFF,
  124 +} E_DjiCameraManagerShootPhotoMode;
  125 +
  126 +/*! @brief the photo action of INTERVAL shooting photo mode
  127 + */
  128 +typedef enum {
  129 + DJI_CAMERA_MANAGER_EXPOSURE_MODE_PROGRAM_AUTO = 1, /*!< Program mode */
  130 + DJI_CAMERA_MANAGER_EXPOSURE_MODE_SHUTTER_PRIORITY = 2, /*!< Shutter priority mode */
  131 + DJI_CAMERA_MANAGER_EXPOSURE_MODE_APERTURE_PRIORITY = 3, /*!< Aperture priority mode */
  132 + DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL = 4, /*!< Manual mode */
  133 + DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_UNKNOWN = 0xFF /*!< The camera exposure mode is unknown. */
  134 +} E_DjiCameraManagerExposureMode;
  135 +
  136 +/*! @brief CameraModule focus mode. If the physical AF switch on the camera is
  137 + * set to auto.
  138 + */
  139 +typedef enum {
  140 + /*!
  141 + - The camera's focus mode is set to manual. In this mode, user sets the
  142 + focus ring value to adjust the focal distance.
  143 + */
  144 + DJI_CAMERA_MANAGER_FOCUS_MODE_MANUAL = 0,
  145 + /*!
  146 + - The camera's focus mode is set to auto. For the Z30 camera, the focus is
  147 + calculated completely automatically. For all other cameras, a focus target
  148 + can be set by the user, which is used to calculate focus automatically.
  149 + */
  150 + DJI_CAMERA_MANAGER_FOCUS_MODE_AUTO = 1,
  151 + /*!
  152 + - The camera's focus mode is set to Continuous AF. It is only supported by
  153 + Mavic Pro with firmware version V01.03.0000 or above, X4S camera, Mavic 2
  154 + Zoom camera and Mavic 2 Pro camera.
  155 + */
  156 + DJI_CAMERA_MANAGER_FOCUS_MODE_AFC = 2,
  157 + /*!
  158 + - The camera's focus mode is unknown.
  159 + */
  160 + DJI_CAMERA_MANAGER_FOCUS_MODE_UNKNOWN = 0xFF,
  161 +} E_DjiCameraManagerFocusMode;
  162 +
  163 +/*! @brief CameraModule shutter mode.
  164 + */
  165 +typedef enum {
  166 + /*! The shutter mode of camera is automatical */
  167 + DJI_CAMERA_MANAGER_SHUTTER_AUTO_MODE = 0x00,
  168 + /*! The shutter mode of camera is manual, the shutter speed setting is
  169 + valid. */
  170 + DJI_CAMERA_MANAGER_SHUTTER_MANUAL_MODE = 0x01,
  171 +} E_DjiCameraManagerShutterMode;
  172 +
  173 +/*! @brief CameraModule shutter speed values.
  174 + */
  175 +typedef enum {
  176 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_8000 = 0, /*!< 1/8000 s */
  177 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_6400 = 1, /*!< 1/6400 s */
  178 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_6000 = 2, /*!< 1/6000 s */
  179 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_5000 = 3, /*!< 1/5000 s */
  180 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_4000 = 4, /*!< 1/4000 s */
  181 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_3200 = 5, /*!< 1/3200 s */
  182 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_3000 = 6, /*!< 1/3000 s */
  183 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_2500 = 7, /*!< 1/2500 s */
  184 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_2000 = 8, /*!< 1/2000 s */
  185 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1600 = 9, /*!< 1/1600 s */
  186 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1500 = 10, /*!< 1/1500 s */
  187 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1250 = 11, /*!< 1/1250 s */
  188 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1000 = 12, /*!< 1/1000 s */
  189 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_800 = 13, /*!< 1/800 s */
  190 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_725 = 14, /*!< 1/725 s */
  191 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_640 = 15, /*!< 1/640 s */
  192 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_500 = 16, /*!< 1/500 s */
  193 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_400 = 17, /*!< 1/400 s */
  194 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_350 = 18, /*!< 1/350 s */
  195 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_320 = 19, /*!< 1/320 s */
  196 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_250 = 20, /*!< 1/250 s */
  197 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_240 = 21, /*!< 1/240 s */
  198 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_200 = 22, /*!< 1/200 s */
  199 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_180 = 23, /*!< 1/180 s */
  200 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_160 = 24, /*!< 1/160 s */
  201 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_125 = 25, /*!< 1/125 s */
  202 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_120 = 26, /*!< 1/120 s */
  203 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_100 = 27, /*!< 1/100 s */
  204 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_90 = 28, /*!< 1/90 s */
  205 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_80 = 29, /*!< 1/80 s */
  206 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_60 = 30, /*!< 1/60 s */
  207 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_50 = 31, /*!< 1/50 s */
  208 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_40 = 32, /*!< 1/40 s */
  209 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_30 = 33, /*!< 1/30 s */
  210 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_25 = 34, /*!< 1/25 s */
  211 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_20 = 35, /*!< 1/20 s */
  212 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_15 = 36, /*!< 1/15 s */
  213 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_12DOT5 = 37, /*!< 1/12.5 s */
  214 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_10 = 38, /*!< 1/10 s */
  215 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_8 = 39, /*!< 1/8 s */
  216 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_6DOT25 = 40, /*!< 1/6.25 s */
  217 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_5 = 41, /*!< 1/5 s */
  218 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_4 = 42, /*!< 1/4 s */
  219 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_3 = 43, /*!< 1/3 s */
  220 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_2DOT5 = 44, /*!< 1/2.5 s */
  221 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_2 = 45, /*!< 1/2 s */
  222 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1DOT67 = 46, /*!< 1/1.67 s */
  223 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1DOT25 = 47, /*!< 1/1.25 s */
  224 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1 = 48, /*!< 1.0 s */
  225 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1DOT3 = 49, /*!< 1.3 s */
  226 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_1DOT6 = 50, /*!< 1.6 s */
  227 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_2 = 51, /*!< 2.0 s */
  228 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_2DOT5 = 52, /*!< 2.5 s */
  229 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_3 = 53, /*!< 3.0 s */
  230 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_3DOT2 = 54, /*!< 3.2 s */
  231 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_4 = 55, /*!< 4.0 s */
  232 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_5 = 56, /*!< 5.0 s */
  233 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_6 = 57, /*!< 6.0 s */
  234 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_7 = 58, /*!< 7.0 s */
  235 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_8 = 59, /*!< 8.0 s */
  236 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_9 = 60, /*!< 9.0 s */
  237 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_10 = 61, /*!< 10.0 s */
  238 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_13 = 62, /*!< 13.0 s */
  239 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_15 = 63, /*!< 15.0 s */
  240 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_20 = 64, /*!< 20.0 s */
  241 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_25 = 65, /*!< 25.0 s */
  242 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_30 = 66, /*!< 30.0 s */
  243 + DJI_CAMERA_MANAGER_SHUTTER_SPEED_UNKNOWN = 0xFF, /*!< Unknown */
  244 +} E_DjiCameraManagerShutterSpeed;
  245 +
  246 +/*! @brief CameraModule ISO values.
  247 + */
  248 +typedef enum {
  249 + /*! The ISO value is automatically set. This cannot be used for all cameras
  250 + when in Manual mode. */
  251 + DJI_CAMERA_MANAGER_ISO_AUTO = 0x00,
  252 + /*! The ISO value is set to 100. */
  253 + DJI_CAMERA_MANAGER_ISO_100 = 0x03,
  254 + /*! The ISO value is set to 200. */
  255 + DJI_CAMERA_MANAGER_ISO_200 = 0x04,
  256 + /*! The ISO value is set to 400.*/
  257 + DJI_CAMERA_MANAGER_ISO_400 = 0x05,
  258 + /*! The ISO value is set to 800.*/
  259 + DJI_CAMERA_MANAGER_ISO_800 = 0x06,
  260 + /*! The ISO value is set to 1600.*/
  261 + DJI_CAMERA_MANAGER_ISO_1600 = 0x07,
  262 + /*! The ISO value is set to 3200.*/
  263 + DJI_CAMERA_MANAGER_ISO_3200 = 0x08,
  264 + /*! The ISO value is set to 6400.*/
  265 + DJI_CAMERA_MANAGER_ISO_6400 = 0x09,
  266 + /*! The ISO value is set to 12800.*/
  267 + DJI_CAMERA_MANAGER_ISO_12800 = 0x0A,
  268 + /*! The ISO value is set to 25600.*/
  269 + DJI_CAMERA_MANAGER_ISO_25600 = 0x0B,
  270 + /*! ISO value is fixed by the camera firmware. When the camera color is set
  271 + to D_LOG, camera will fix the ISO to a specific value in order to optimize
  272 + the performance.
  273 + */
  274 + DJI_CAMERA_MANAGER_ISO_FIXED = 0xFF,
  275 +} E_DjiCameraManagerISO;
  276 +
  277 +/*! @brief CameraModule exposure compensation.
  278 + */
  279 +typedef enum {
  280 + /*! The camera's exposure compensation is -5.0ev.*/
  281 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_5_0 = 1,
  282 + /*! The camera's exposure compensation is -4.7ev.*/
  283 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_4_7 = 2,
  284 + /*! The camera's exposure compensation is -4.3ev.*/
  285 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_4_3 = 3,
  286 + /*! The camera's exposure compensation is -4.0ev.*/
  287 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_4_0 = 4,
  288 + /*! The camera's exposure compensation is -3.7ev.*/
  289 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_3_7 = 5,
  290 + /*! The camera's exposure compensation is -3.3ev.*/
  291 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_3_3 = 6,
  292 + /*! The camera's exposure compensation is -3.0ev.*/
  293 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_3_0 = 7,
  294 + /*! The camera's exposure compensation is -2.7ev.*/
  295 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_2_7 = 8,
  296 + /*! The camera's exposure compensation is -2.3ev.*/
  297 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_2_3 = 9,
  298 + /*! The camera's exposure compensation is -2.0ev.*/
  299 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_2_0 = 10,
  300 + /*! The camera's exposure compensation is -1.7ev.*/
  301 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_1_7 = 11,
  302 + /*! The camera's exposure compensation is -1.3ev.*/
  303 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_1_3 = 12,
  304 + /*! The camera's exposure compensation is -1.0ev.*/
  305 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_1_0 = 13,
  306 + /*! The camera's exposure compensation is -0.7ev.*/
  307 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_0_7 = 14,
  308 + /*! The camera's exposure compensation is -0.3ev.*/
  309 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_0_3 = 15,
  310 + /*! The camera's exposure compensation is 0.0ev.*/
  311 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_0_0 = 16,
  312 + /*! The camera's exposure compensation is +0.3ev.*/
  313 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_0_3 = 17,
  314 + /*! The camera's exposure compensation is +0.7ev.*/
  315 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_0_7 = 18,
  316 + /*! The camera's exposure compensation is +1.0ev.*/
  317 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_1_0 = 19,
  318 + /*! The camera's exposure compensation is +1.3ev.*/
  319 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_1_3 = 20,
  320 + /*! The camera's exposure compensation is +1.7ev.*/
  321 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_1_7 = 21,
  322 + /*! The camera's exposure compensation is +2.0ev.*/
  323 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_2_0 = 22,
  324 + /*! The camera's exposure compensation is +2.3ev.*/
  325 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_2_3 = 23,
  326 + /*! The camera's exposure compensation is +2.7ev.*/
  327 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_2_7 = 24,
  328 + /*! The camera's exposure compensation is +3.0ev.*/
  329 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_3_0 = 25,
  330 + /*! The camera's exposure compensation is +3.3ev.*/
  331 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_3_3 = 26,
  332 + /*! The camera's exposure compensation is +3.7ev.*/
  333 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_3_7 = 27,
  334 + /*! The camera's exposure compensation is +4.0ev.*/
  335 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_4_0 = 28,
  336 + /*! The camera's exposure compensation is +4.3ev.*/
  337 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_4_3 = 29,
  338 + /*! The camera's exposure compensation is +4.7ev.*/
  339 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_4_7 = 30,
  340 + /*! The camera's exposure compensation is +5.0ev.*/
  341 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_5_0 = 31,
  342 + /*! The camera's exposure compensation is fixed by the camera.*/
  343 + DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_FIXED = 0xFF,
  344 +} E_DjiCameraManagerExposureCompensation;
  345 +
  346 +/*! @brief CameraModule aperture values.
  347 + * @note X5, X5R, Z30, Phantom 4 Pro camera, X4S and X5S support this
  348 + * setting.
  349 + */
  350 +typedef enum {
  351 + /*! The Aperture value is f/1.6. It is only supported by Z30
  352 + camera.*/
  353 + DJI_CAMERA_MANAGER_APERTURE_F_1_DOT_6 = 160,
  354 + /*! The Aperture value is f/1.7.*/
  355 + DJI_CAMERA_MANAGER_APERTURE_F_1_DOT_7 = 170,
  356 + /*! The Aperture value is f/1.8.*/
  357 + DJI_CAMERA_MANAGER_APERTURE_F_1_DOT_8 = 180,
  358 + /*! The Aperture value is f/2.*/
  359 + DJI_CAMERA_MANAGER_APERTURE_F_2 = 200,
  360 + /*! The Aperture value is f/2.2.*/
  361 + DJI_CAMERA_MANAGER_APERTURE_F_2_DOT_2 = 220,
  362 + /*! The Aperture value is f/2.4. It is only supported by Z30 camera.*/
  363 + DJI_CAMERA_MANAGER_APERTURE_F_2_DOT_4 = 240,
  364 + /*! The Aperture value is f/2.5.*/
  365 + DJI_CAMERA_MANAGER_APERTURE_F_2_DOT_5 = 250,
  366 + /*! The Aperture value is f/2.6.*/
  367 + DJI_CAMERA_MANAGER_APERTURE_F_2_DOT_6 = 260,
  368 + /*! The Aperture value is f/2.8.*/
  369 + DJI_CAMERA_MANAGER_APERTURE_F_2_DOT_8 = 280,
  370 + /*! The Aperture value is f/3.2.*/
  371 + DJI_CAMERA_MANAGER_APERTURE_F_3_DOT_2 = 320,
  372 + /*! The Aperture value is f/3.4.*/
  373 + DJI_CAMERA_MANAGER_APERTURE_F_3_DOT_4 = 340,
  374 + /*! The Aperture value is f/3.5.*/
  375 + DJI_CAMERA_MANAGER_APERTURE_F_3_DOT_5 = 350,
  376 + /*! The Aperture value is f/4.*/
  377 + DJI_CAMERA_MANAGER_APERTURE_F_4 = 400,
  378 + /*! The Aperture value is f/4.5.*/
  379 + DJI_CAMERA_MANAGER_APERTURE_F_4_DOT_5 = 450,
  380 + /*! The Aperture value is f/4.8.*/
  381 + DJI_CAMERA_MANAGER_APERTURE_F_4_DOT_8 = 480,
  382 + /*! The Aperture value is f/5.*/
  383 + DJI_CAMERA_MANAGER_APERTURE_F_5 = 500,
  384 + /*! The Aperture value is f/5.6.*/
  385 + DJI_CAMERA_MANAGER_APERTURE_F_5_DOT_6 = 560,
  386 + /*! The Aperture value is f/6.3.*/
  387 + DJI_CAMERA_MANAGER_APERTURE_F_6_DOT_3 = 630,
  388 + /*! The Aperture value is f/6.8.*/
  389 + DJI_CAMERA_MANAGER_APERTURE_F_6_DOT_8 = 680,
  390 + /*! The Aperture value is f/7.1.*/
  391 + DJI_CAMERA_MANAGER_APERTURE_F_7_DOT_1 = 710,
  392 + /*! The Aperture value is f/8.*/
  393 + DJI_CAMERA_MANAGER_APERTURE_F_8 = 800,
  394 + /*! The Aperture value is f/9.*/
  395 + DJI_CAMERA_MANAGER_APERTURE_F_9 = 900,
  396 + /*! The Aperture value is f/9.6.*/
  397 + DJI_CAMERA_MANAGER_APERTURE_F_9_DOT_6 = 960,
  398 + /*! The Aperture value is f/10.*/
  399 + DJI_CAMERA_MANAGER_APERTURE_F_10 = 1000,
  400 + /*! The Aperture value is f/11.*/
  401 + DJI_CAMERA_MANAGER_APERTURE_F_11 = 1100,
  402 + /*! The Aperture value is f/13.*/
  403 + DJI_CAMERA_MANAGER_APERTURE_F_13 = 1300,
  404 + /*! The Aperture value is f/14.*/
  405 + DJI_CAMERA_MANAGER_APERTURE_F_14 = 1400,
  406 + /*! The Aperture value is f/16.*/
  407 + DJI_CAMERA_MANAGER_APERTURE_F_16 = 1600,
  408 + /*! The Aperture value is f/18.*/
  409 + DJI_CAMERA_MANAGER_APERTURE_F_18 = 1800,
  410 + /*! The Aperture value is f/19.*/
  411 + DJI_CAMERA_MANAGER_APERTURE_F_19 = 1900,
  412 + /*! The Aperture value is f/20.*/
  413 + DJI_CAMERA_MANAGER_APERTURE_F_20 = 2000,
  414 + /*! The Aperture value is f/22.*/
  415 + DJI_CAMERA_MANAGER_APERTURE_F_22 = 2200,
  416 + /*! The Aperture value is Unknown. */
  417 + DJI_CAMERA_MANAGER_APERTURE_F_UNKNOWN = 0xFFFF,
  418 +} E_DjiCameraManagerAperture;
  419 +
  420 +typedef enum {
  421 + DJI_CAMERA_MANAGER_RECORDING_CONTROL_STOP = 0,
  422 + DJI_CAMERA_MANAGER_RECORDING_CONTROL_BEGIN = 1,
  423 + DJI_CAMERA_MANAGER_RECORDING_CONTROL_PAUSE = 2,
  424 + DJI_CAMERA_MANAGER_RECORDING_CONTROL_RESUME = 3,
  425 +} E_DjiCameraManagerRecordingControl;
  426 +
  427 +typedef enum {
  428 + DJI_CAMERA_MANAGER_FILE_LIST_COUNT_60_PER_SLICE = 60,
  429 + DJI_CAMERA_MANAGER_FILE_LIST_COUNT_120_PER_SLICE = 120,
  430 + DJI_CAMERA_MANAGER_FILE_LIST_COUNT_ALL_PER_SLICE = 0xFFFF,
  431 +} E_DjiCameraManagerFileListCountPerSlice;
  432 +
  433 +typedef enum {
  434 + DJI_CAMERA_MANAGER_SOURCE_DEFAULT_CAM = 0x0,
  435 + DJI_CAMERA_MANAGER_SOURCE_WIDE_CAM = 0x1,
  436 + DJI_CAMERA_MANAGER_SOURCE_ZOOM_CAM = 0x2,
  437 + DJI_CAMERA_MANAGER_SOURCE_IR_CAM = 0x3,
  438 + DJI_CAMERA_MANAGER_SOURCE_VISIBLE_CAM = 0x7,
  439 +} E_DjiCameraManagerStreamSource, E_DjiCameraManagerStreamStorage;
  440 +
  441 +typedef enum {
  442 + DJI_CAMERA_MANAGER_NIGHT_SCENE_MODE_DISABLE = 0,
  443 + DJI_CAMERA_MANAGER_NIGHT_SCENE_MODE_ENABLE = 1,
  444 + DJI_CAMERA_MANAGER_NIGHT_SCENE_MODE_AUTO = 2,
  445 +} E_DjiCameraManagerNightSceneMode;
  446 +
  447 +typedef enum {
  448 + DJI_CAMERA_MANAGER_CAPTURE_OR_RECORDING_CAPTURE = 0,
  449 + DJI_CAMERA_MANAGER_CAPTURE_OR_RECORDING_RECORDING = 1,
  450 +} E_DjiCameraManagerCaptureOrRecording;
  451 +
  452 +typedef enum {
  453 + DJI_CAMERA_MANAGER_EXPAND_NAME_TYPE_FILE = 1,
  454 + DJI_CAMERA_MANAGER_EXPAND_NAME_TYPE_DIR = 2,
  455 +} E_DjiCameraManagerExpandNameType;
  456 +
  457 +typedef enum {
  458 + DJI_CAMERA_MANAGER_PHOTO_RATIO_4X3 = 0,
  459 + DJI_CAMERA_MANAGER_PHOTO_RATIO_16X9 = 1,
  460 + DJI_CAMERA_MANAGER_PHOTO_RATIO_3X2 = 2,
  461 + DJI_CAMERA_MANAGER_PHOTO_RATIO_1X1 = 3,
  462 + DJI_CAMERA_MANAGER_PHOTO_RATIO_18X3 = 4,
  463 + DJI_CAMERA_MANAGER_PHOTO_RATIO_5X4 = 5,
  464 +} E_DjiCameraManagerPhotoRatio;
  465 +
  466 +typedef struct {
  467 + uint8_t firmware_version[4];
  468 +} T_DjiCameraManagerFirmwareVersion;
  469 +
  470 +/*! @brief Tap zoom target point data struct, used by user.
  471 + */
  472 +typedef T_DjiCameraPointInScreen T_DjiCameraManagerTapZoomPosData;
  473 +
  474 +/*! @brief Tap focus target point data struct, used by user.
  475 + */
  476 +typedef T_DjiCameraPointInScreen T_DjiCameraManagerFocusPosData;
  477 +
  478 +typedef struct {
  479 + dji_f32_t currentOpticalZoomFactor;
  480 + dji_f32_t maxOpticalZoomFactor;
  481 +} T_DjiCameraManagerOpticalZoomParam;
  482 +
  483 +typedef struct {
  484 + uint8_t second;
  485 + uint8_t minute;
  486 + uint8_t hour;
  487 + uint8_t day;
  488 + uint8_t month;
  489 + uint16_t year;
  490 +} T_DjiCameraManagerFileCreateTime;
  491 +
  492 +typedef struct {
  493 + union {
  494 + struct {
  495 + uint32_t attributePhotoReserved: 22;
  496 + uint32_t attributePhotoRatio: 8;
  497 + uint32_t attributePhotoRotation: 2;
  498 + uint8_t reserved[12];
  499 + } photoAttribute;
  500 + struct {
  501 + uint32_t attributeVideoDuration: 16;
  502 + uint32_t attributeVideoFramerate: 6;
  503 + uint32_t attributeVideoRotation: 2;
  504 + uint32_t attributeVideoResolution: 8;
  505 + uint8_t reserved[12];
  506 + } videoAttribute;
  507 + };
  508 +} T_DjiCameraManagerFileAttributeData;
  509 +
  510 +typedef struct {
  511 + char fileName[DJI_FILE_NAME_SIZE_MAX];
  512 + uint32_t fileSize;
  513 + uint32_t fileIndex;
  514 + T_DjiCameraManagerFileCreateTime createTime;
  515 + E_DjiCameraMediaFileSubType type;
  516 + T_DjiCameraManagerFileAttributeData attributeData;
  517 +} T_DjiCameraManagerSubFileListInfo;
  518 +
  519 +typedef struct {
  520 + char fileName[DJI_FILE_NAME_SIZE_MAX];
  521 + uint32_t fileSize;
  522 + uint32_t fileIndex;
  523 + T_DjiCameraManagerFileCreateTime createTime;
  524 + E_DjiCameraMediaFileType type;
  525 + T_DjiCameraManagerFileAttributeData attributeData;
  526 + uint8_t subFileListTotalNum;
  527 + T_DjiCameraManagerSubFileListInfo* subFileListInfo;
  528 +} T_DjiCameraManagerFileListInfo;
  529 +
  530 +typedef struct {
  531 + uint16_t totalCount;
  532 + T_DjiCameraManagerFileListInfo *fileListInfo;
  533 +} T_DjiCameraManagerFileList;
  534 +
  535 +typedef struct {
  536 + uint16_t sliceStartIndex;
  537 + E_DjiCameraManagerFileListCountPerSlice countPerSlice;
  538 +} T_DjiCameraManagerSliceConfig;
  539 +
  540 +typedef enum {
  541 + DJI_DOWNLOAD_FILE_EVENT_START,
  542 + DJI_DOWNLOAD_FILE_EVENT_TRANSFER,
  543 + DJI_DOWNLOAD_FILE_EVENT_END,
  544 + DJI_DOWNLOAD_FILE_EVENT_START_TRANSFER_END,
  545 +} E_DjiDownloadFileEvent;
  546 +
  547 +typedef enum {
  548 + DJI_CAMERA_MANAGER_VIDEO_RESOLUTION_640X480P = 0, // 640X480P
  549 + DJI_CAMERA_MANAGER_VIDEO_RESOLUTION_1280X640P = 2, // 1280X640P
  550 + DJI_CAMERA_MANAGER_VIDEO_RESOLUTION_1280X720P = 4, // 1280X720P
  551 + DJI_CAMERA_MANAGER_VIDEO_RESOLUTION_1920X1080P = 10, // 1920X1080P
  552 + DJI_CAMERA_MANAGER_VIDEO_RESOLUTION_3840X2160P = 16, // 3840X2160P
  553 +} E_DjiCameraManagerVideoResolution;
  554 +
  555 +typedef enum {
  556 + DJI_CAMERA_MANAGER_VIDEO_FRAME_RATE_15FPS = 0, // 14.985
  557 + DJI_CAMERA_MANAGER_VIDEO_FRAME_RATE_25FPS = 2, // 25.000
  558 + DJI_CAMERA_MANAGER_VIDEO_FRAME_RATE_30FPS = 3, // 29.970
  559 + DJI_CAMERA_MANAGER_VIDEO_FRAME_RATE_60FPS = 6, // 59.940
  560 +} E_DjiCameraManagerVideoFrameRate;
  561 +
  562 +typedef enum {
  563 + DJI_CAMERA_MANAGER_PHOTO_STORAGE_FORMAT_RAW = 0,
  564 + DJI_CAMERA_MANAGER_PHOTO_STORAGE_FORMAT_JPEG = 1,
  565 + DJI_CAMERA_MANAGER_PHOTO_STORAGE_FORMAT_RAW_JPEG = 2,
  566 + DJI_CAMERA_MANAGER_PHOTO_STORAGE_FORMAT_YUV = 3, // Save as YUV format image
  567 + DJI_CAMERA_MANAGER_PHOTO_STORAGE_FORMAT_RJPEG = 7, // Radiometric JPEG
  568 +} E_DjiCameraManagerPhotoStorageFormat;
  569 +
  570 +typedef enum {
  571 + DJI_CAMERA_MANAGER_VIDEO_STORAGE_FORMAT_MOV = 0,
  572 + DJI_CAMERA_MANAGER_VIDEO_STORAGE_FORMAT_MP4 = 1,
  573 +} E_DjiCameraManagerVideoStorageFormat;
  574 +
  575 +typedef enum {
  576 + DJI_CAMERA_MANAGER_METERING_MODE_CENTRAL = 0,
  577 + DJI_CAMERA_MANAGER_METERING_MODE_AVERAGE = 1,
  578 + DJI_CAMERA_MANAGER_METERING_MODE_SPOT = 2,
  579 +} E_DjiCameraManagerMeteringMode;
  580 +
  581 +typedef enum {
  582 + DJI_CAMERA_MANAGER_FFC_MODE_MANUAL = 0,
  583 + DJI_CAMERA_MANAGER_FFC_MODE_AUTO = 1,
  584 +} E_DjiCameraManagerFfcMode;
  585 +
  586 +typedef enum {
  587 + DJI_CAMERA_MANAGER_IR_GAIN_MODE_AUTO = 0,
  588 + DJI_CAMERA_MANAGER_IR_GAIN_MODE_LOW = 1,
  589 + DJI_CAMERA_MANAGER_IR_GAIN_MODE_HIGH = 2,
  590 +} E_DjiCameraManagerIrGainMode;
  591 +
  592 +typedef enum {
  593 + /* Camera is not capturing photos*/
  594 + DJI_CAMERA_MANAGER_CAPTURING_STATE_IDLE = 0,
  595 +
  596 + /* Camera is capturing a single photo */
  597 + DJI_CAMERA_MANAGER_CAPTURING_STATE_SINGLE = 1,
  598 +
  599 + /* Camera is capturing multiple photos */
  600 + DJI_CAMERA_MANAGER_CAPTURING_STATE_MULTI = 2,
  601 +} E_DjiCameraManagerCapturingState;
  602 +
  603 +typedef enum {
  604 + DJI_CAMERA_MANAGER_RECORDING_STATE_IDLE = 0,
  605 + DJI_CAMERA_MANAGER_RECORDING_STATE_STARTING = 1,
  606 + DJI_CAMERA_MANAGER_RECORDING_STATE_RECORDING = 2,
  607 + DJI_CAMERA_MANAGER_RECORDING_STATE_STOPPING = 3,
  608 +} E_DjiCameraManagerRecordingState;
  609 +
  610 +/*! @brief: when the remote control is in split-screen mode, the coordinate range of the x-axis is 0-0.5.
  611 + */
  612 +typedef struct {
  613 + dji_f32_t pointX; /*! x-coordinate of point thermometry, range: 0-1 */
  614 + dji_f32_t pointY; /*! y-coordinate of point thermometry, range: 0-1 */
  615 +} T_DjiCameraManagerPointThermometryCoordinate;
  616 +
  617 +typedef struct {
  618 + dji_f32_t areaTempLtX; /*! x-coordinate of the upper left corner of the area thermometry, range: 0-1 */
  619 + dji_f32_t areaTempLtY; /*! y-coordinate of the upper left corner of the area thermometry, range: 0-1 */
  620 + dji_f32_t areaTempRbX; /*! x-coordinate of the lower right corner of the area thermometry, range: 0-1 */
  621 + dji_f32_t areaTempRbY; /*! y-coordinate of the lower right corner of the area thermometry, range: 0-1 */
  622 +} T_DjiCameraManagerAreaThermometryCoordinate;
  623 +
  624 +//result of point thermometry
  625 +typedef struct {
  626 + dji_f32_t pointX; /*! x-coordinate of point thermometry, range: 0-1 */
  627 + dji_f32_t pointY; /*! y-coordinate of point thermometry, range: 0-1 */
  628 + dji_f32_t pointTemperature; /*! The temperature of the current point */
  629 +} T_DjiCameraManagerPointThermometryData;
  630 +
  631 +//result of area thermometry
  632 +typedef struct {
  633 + dji_f32_t areaTempLtX; /*! x_coordinate of the upper left corner of the current thermometry area */
  634 + dji_f32_t areaTempLtY; /*! y_coordinate of the upper left corner of the current thermometry area */
  635 + dji_f32_t areaTempRbX; /*! x_coordinate of the lower right corner of the current thermometry area */
  636 + dji_f32_t areaTempRbY; /*! y_coordinate of the lower right corner of the current thermometry area */
  637 + dji_f32_t areaAveTemp; /*! The average temperature of the current thermometry area */
  638 + dji_f32_t areaMinTemp; /*! The minimum temperature of the current thermometry area */
  639 + dji_f32_t areaMaxTemp; /*! The maximum temperature of the current thermometry area */
  640 + dji_f32_t areaMinTempPointX; /*! x_coordinate of the minimum temperature in the thermometry area */
  641 + dji_f32_t areaMinTempPointY; /*! y_coordinate of the minimum temperature in the thermometry area */
  642 + dji_f32_t areaMaxTempPointX; /*! x_coordinate of the maximum temperature in the thermometry area */
  643 + dji_f32_t areaMaxTempPointY; /*! y_coordinate of the maximum temperature in the thermometry area */
  644 +} T_DjiCameraManagerAreaThermometryData;
  645 +
  646 +typedef struct {
  647 + E_DjiDownloadFileEvent downloadFileEvent;
  648 + uint8_t fileType;
  649 + uint32_t fileIndex;
  650 + uint32_t fileSize;
  651 + dji_f32_t progressInPercent;
  652 +} T_DjiDownloadFilePacketInfo;
  653 +
  654 +typedef struct {
  655 + dji_f64_t longitude; /*! Range: [-180,180] */
  656 + dji_f64_t latitude; /*! Range: [-90,90] */
  657 + int32_t altitude; /*! Unit: 0.1m */
  658 + int32_t distance; /*! Unit: 0.1m */
  659 + int16_t screenX; /*! Unit: 0.1% */
  660 + int16_t screenY; /*! Unit: 0.1% */
  661 + bool enable_lidar;
  662 + uint8_t exception;
  663 +} T_DjiCameraManagerLaserRangingInfo;
  664 +
  665 +typedef struct {
  666 + uint32_t size;
  667 + E_DjiCameraManagerStreamSource streamSource[4];
  668 + E_DjiCameraManagerStreamStorage streamStorage[4];
  669 +} T_DjiCameraManagerStreamList;
  670 +
  671 +typedef struct {
  672 + E_DjiCameraManagerVideoResolution videoResolution;
  673 + E_DjiCameraManagerVideoFrameRate videoFrameRate;
  674 +} T_DjiCameraManagerVideoFormat;
  675 +
  676 +typedef struct {
  677 + uint8_t size;
  678 + union {
  679 + E_DjiCameraManagerPhotoStorageFormat photoStorageFormat[16];
  680 + E_DjiCameraManagerVideoStorageFormat videoStorageFormat[16];
  681 + E_DjiCameraManagerPhotoRatio photoRatioFormat[16];
  682 + E_DjiCameraManagerStreamSource streamSource[16];
  683 + E_DjiCameraManagerStreamStorage streamStorage[16];
  684 + E_DjiCameraManagerNightSceneMode nightSceneMode[16];
  685 + };
  686 + uint32_t minValue;
  687 + uint32_t maxValue;
  688 +} T_DjiCameraManagerRangeList;
  689 +
  690 +typedef struct {
  691 + double lowGainTempMin;
  692 + double lowGainTempMax;
  693 + double highGainTempMin;
  694 + double highGainTempMax;
  695 +} T_DjiCameraManagerIrTempMeterRange;
  696 +
  697 +typedef struct {
  698 + uint32_t totalCapacity; /* MByte */
  699 + uint32_t remainCapacity; /* MByte */
  700 +} T_DjiCameraManagerStorageInfo;
  701 +
  702 +typedef struct {
  703 + uint32_t flag; /* 0xFFFFFFFF */
  704 + uint32_t seqNum;
  705 + uint64_t timestamp;
  706 + uint32_t dataByte; /* actual num of bytes used for points */
  707 +} __attribute__((packed)) T_DjiCameraManagerPointCloudHeader;
  708 +
  709 +typedef struct {
  710 + dji_f32_t x; /* the x-axis of NED coordinate system */
  711 + dji_f32_t y; /* the y-axis of NED coordinate system */
  712 + dji_f32_t z; /* the z-axis of NED coordinate system */
  713 + uint8_t intensity;
  714 + uint8_t r;
  715 + uint8_t g;
  716 + uint8_t b;
  717 +}__attribute__((packed)) T_DjiCameraManagerPointXYZRGBInfo;
  718 +
  719 +typedef struct {
  720 + T_DjiCameraManagerPointCloudHeader pointCloudHeader;
  721 + uint32_t crc_header;
  722 + uint32_t crc_rest;
  723 + T_DjiCameraManagerPointXYZRGBInfo points[1];
  724 +}__attribute__((packed)) T_DjiCameraManagerColorPointCloud;
  725 +
  726 +typedef T_DjiReturnCode (*DjiCameraManagerDownloadFileDataCallback)(T_DjiDownloadFilePacketInfo packetInfo,
  727 + const uint8_t *data,
  728 + uint16_t dataLen);
  729 +
  730 +/* Exported functions --------------------------------------------------------*/
  731 +/**
  732 + * @brief Initialise camera manager module, and user should call this function
  733 + * before using camera manager features.
  734 + * @return Execution result.
  735 + */
  736 +T_DjiReturnCode DjiCameraManager_Init(void);
  737 +
  738 +/**
  739 + * @brief Deinitialise camera manager module.
  740 + * @return Execution result.
  741 + */
  742 +T_DjiReturnCode DjiCameraManager_DeInit(void);
  743 +
  744 +/**
  745 + * @brief Get camera type of the selected camera mounted position.
  746 + * @param position: camera mounted position
  747 + * @param cameraType: refer to E_DjiCameraType.
  748 + * @return Execution result.
  749 + */
  750 +T_DjiReturnCode DjiCameraManager_GetCameraType(E_DjiMountPosition position, E_DjiCameraType *cameraType);
  751 +
  752 +/**
  753 + * @brief Get camera firmware version of the selected camera mounted position.
  754 + * @param position: camera mounted position
  755 + * @param firmwareVersion: refer to T_DjiCameraManagerFirmwareVersion.
  756 + * @return Execution result.
  757 + */
  758 +T_DjiReturnCode DjiCameraManager_GetFirmwareVersion(E_DjiMountPosition position,
  759 + T_DjiCameraManagerFirmwareVersion *firmwareVersion);
  760 +
  761 +/**
  762 + * @brief Get camera connection status.
  763 + * @param position: camera mounted position
  764 + * @param connectStatus: returned value of connection status
  765 + * @return Execution result.
  766 + */
  767 +T_DjiReturnCode DjiCameraManager_GetCameraConnectStatus(E_DjiMountPosition position,
  768 + bool *connectStatus);
  769 +
  770 +/**
  771 + * @brief Set camera working mode of the selected camera mounted position.
  772 + * @note Set the camera's work mode to options such as taking pictures, recording video,
  773 + * playback, or downloading. Please note that you cannot change the mode when a certain
  774 + * task is executing. This action takes about 1-2 s.
  775 + * @param position: camera mounted position
  776 + * @param workMode: refer to E_DjiCameraManagerWorkMode.
  777 + * @return Execution result.
  778 + */
  779 +T_DjiReturnCode DjiCameraManager_SetMode(E_DjiMountPosition position,
  780 + E_DjiCameraManagerWorkMode workMode);
  781 +
  782 +/**
  783 + * @brief Get camera working mode of the selected camera mounted position.
  784 + * @param position: camera mounted position
  785 + * @param workMode: refer to E_DjiCameraManagerWorkMode.
  786 + * @return Execution result.
  787 + */
  788 +T_DjiReturnCode DjiCameraManager_GetMode(E_DjiMountPosition position,
  789 + E_DjiCameraManagerWorkMode *workMode);
  790 +
  791 +/**
  792 +* @brief Set camera shoot mode of the selected camera mounted position.
  793 +* @param position: camera mounted position
  794 +* @param mode: refer to E_DjiCameraManagerShootPhotoMode.
  795 +* @return Execution result.
  796 +*/
  797 +T_DjiReturnCode DjiCameraManager_SetShootPhotoMode(E_DjiMountPosition position,
  798 + E_DjiCameraManagerShootPhotoMode mode);
  799 +
  800 +/**
  801 +* @brief Get camera shoot mode of the selected camera mounted position.
  802 +* @param position: camera mounted position
  803 +* @param mode: refer to E_DjiCameraManagerShootPhotoMode.
  804 +* @return Execution result.
  805 +*/
  806 +T_DjiReturnCode DjiCameraManager_GetShootPhotoMode(E_DjiMountPosition position,
  807 + E_DjiCameraManagerShootPhotoMode *takePhotoMode);
  808 +
  809 +/**
  810 + * @brief Start shooting photo.
  811 + * @note Camera must be in ShootPhoto mode. For thermal imaging cameras,
  812 + * it is allowed to take a single photo while recording video. Check the SD
  813 + * card's capacity before using this method to ensure there is enough space.
  814 + * @param position: camera mounted position
  815 + * @param mode: refer to E_DjiCameraManagerShootPhotoMode.
  816 + * @return Execution result.
  817 + */
  818 +T_DjiReturnCode DjiCameraManager_StartShootPhoto(E_DjiMountPosition position,
  819 + E_DjiCameraManagerShootPhotoMode mode);
  820 +
  821 +/**
  822 + * @brief Stop shooting photo.
  823 + * @note Camera must be in ShootPhoto mode and the shoot mode is either
  824 + * Interval or Time-lapse. If set to single shot mode, the camera will
  825 + * automatically stop after taking the photo.
  826 + * @param position: camera mounted position
  827 + * @return Execution result.
  828 + */
  829 +T_DjiReturnCode DjiCameraManager_StopShootPhoto(E_DjiMountPosition position);
  830 +
  831 +/**
  832 + * @brief Get camera capturing state.
  833 + * @note This API is not supported by L1/P1/M3D/M3TD models.
  834 + * @param position: camera mounted position
  835 + * @param capturingState: result of getting, see E_DjiCameraManagerCapturingState.
  836 + * @return Execution result.
  837 + */
  838 +T_DjiReturnCode DjiCameraManager_GetCapturingState(E_DjiMountPosition position,
  839 + E_DjiCameraManagerCapturingState *capturingState);
  840 +
  841 +/**
  842 + * @brief Set the burst count for burst shooting mode.
  843 + * @param position: camera mounted position
  844 + * @param count: refer to E_DjiCameraBurstCount.
  845 + * @return Execution result.
  846 + */
  847 +T_DjiReturnCode DjiCameraManager_SetPhotoBurstCount(E_DjiMountPosition position,
  848 + E_DjiCameraBurstCount count);
  849 +
  850 +/**
  851 + * @brief Set the parameters for INTERVAL shooting mode.
  852 + * @note In this mode, the camera captures a photo, waits a specified interval
  853 + * of time, then captures another photo, continuing until the set number of
  854 + * photos is reached. Supported by thermal imaging cameras, too.
  855 + * @param position: camera mounted position
  856 + * @param intervalSetting: refer to T_DjiCameraPhotoTimeIntervalSettings.
  857 + * @return Execution result.
  858 + */
  859 +T_DjiReturnCode DjiCameraManager_SetPhotoTimeIntervalSettings(E_DjiMountPosition position,
  860 + T_DjiCameraPhotoTimeIntervalSettings intervalSetting);
  861 +
  862 +/**
  863 + * @brief Get the parameters for INTERVAL shooting mode.
  864 + * @param position: camera mounted position
  865 + * @param intervalSetting: refer to T_DjiCameraPhotoTimeIntervalSettings.
  866 + * @return Execution result.
  867 + */
  868 +T_DjiReturnCode DjiCameraManager_GetPhotoTimeIntervalSettings(E_DjiMountPosition position,
  869 + T_DjiCameraPhotoTimeIntervalSettings *intervalSetting);
  870 +
  871 +/**
  872 + * @brief Get the remaining time of interval shooting.
  873 + * @note Not supported by L1/P1/M3D/M3TD models.
  874 + * @param position: camera mounted position
  875 + * @param remainTime: time in seconds.
  876 + * @return Execution result.
  877 + */
  878 +T_DjiReturnCode DjiCameraManager_GetIntervalShootingRemainTime(E_DjiMountPosition position,
  879 + uint8_t *remainTime);
  880 +
  881 +/**
  882 + * @brief Set camera focus mode of the selected camera mounted position.
  883 + * @note Set the lens focus mode. In auto focus mode, the target
  884 + * point is the focal point. In manual focus mode, if focus assist is
  885 + * enabled, it adjusts focus in the zoomed-out area.
  886 + * @param position: camera mounted position
  887 + * @param focusMode: refer to E_DjiCameraManagerFocusMode.
  888 + * @return Execution result.
  889 + */
  890 +T_DjiReturnCode DjiCameraManager_SetFocusMode(E_DjiMountPosition position,
  891 + E_DjiCameraManagerFocusMode focusMode);
  892 +/**
  893 + * @brief Get camera focus mode of the selected camera mounted position.
  894 + * @param position: camera mounted position
  895 + * @param focusMode: refer to E_DjiCameraManagerFocusMode.
  896 + * @return Execution result.
  897 + */
  898 +T_DjiReturnCode DjiCameraManager_GetFocusMode(E_DjiMountPosition position,
  899 + E_DjiCameraManagerFocusMode *focusMode);
  900 +
  901 +/**
  902 + * @brief Set camera focus point of the selected camera mounted position.
  903 + * @note Sets the target point for focusing. In auto mode, this is the focal
  904 + * point. In manual mode with focus assist enabled, it's the zoomed-out area.
  905 + * @param position: camera mounted position
  906 + * @param focusPosData: refer to T_DjiCameraManagerFocusPosData.
  907 + * @return Execution result.
  908 + */
  909 +T_DjiReturnCode DjiCameraManager_SetFocusTarget(E_DjiMountPosition position,
  910 + T_DjiCameraManagerFocusPosData focusPosData);
  911 +
  912 +/**
  913 + * @brief Get camera focus point of the selected camera mounted position.
  914 + * @param position: camera mounted position
  915 + * @param focusPosData: refer to T_DjiCameraManagerFocusPosData.
  916 + * @return Execution result.
  917 + */
  918 +T_DjiReturnCode DjiCameraManager_GetFocusTarget(E_DjiMountPosition position,
  919 + T_DjiCameraManagerFocusPosData *tapFocusPos);
  920 +
  921 +/**
  922 + * @brief Start camera optical zooming of the selected camera mounted position.
  923 + * @note Changes the lens's focal length in the specified direction at a specified
  924 + * speed. Zooming stops at the lens's max or min focal length or when
  925 + * StopContinuousOpticalZoom is called.
  926 + * @param position: camera mounted position
  927 + * @param zoomDirection: optical zoom direction, refer to E_DjiCameraZoomDirection.
  928 + * @param zoomSpeed: optical zoom direction, refer to E_DjiCameraZoomSpeed.
  929 + * @return Execution result.
  930 + */
  931 +T_DjiReturnCode DjiCameraManager_StartContinuousOpticalZoom(E_DjiMountPosition position,
  932 + E_DjiCameraZoomDirection zoomDirection,
  933 + E_DjiCameraZoomSpeed zoomSpeed);
  934 +
  935 +/**
  936 + * @brief Stop the ongoing optical zoom operation of the selected camera mounted position.
  937 + * @note Should be called to halt the focal length change initiated by
  938 + * DjiCameraManager_StartContinuousOpticalZoom.
  939 + * @param position: camera mounted position
  940 + * @return Execution result.
  941 + */
  942 +T_DjiReturnCode DjiCameraManager_StopContinuousOpticalZoom(E_DjiMountPosition position);
  943 +
  944 +/**
  945 + * @brief Set target zoom factor for optical zooming of the selected camera mounted position.
  946 + * @note This interface sets the zoom to the specified target value.
  947 + * @param position: camera mounted position
  948 + * @param zoomDirection: optical zoom direction, refer to E_DjiCameraZoomDirection.
  949 + * @param factor: target zoom factor.
  950 + * @return Execution result.
  951 + */
  952 +T_DjiReturnCode DjiCameraManager_SetOpticalZoomParam(E_DjiMountPosition position,
  953 + E_DjiCameraZoomDirection zoomDirection,
  954 + dji_f32_t factor);
  955 +
  956 +/**
  957 + * @brief Get parameters for camera optical zooming of the selected camera mounted position.
  958 + * @param position: camera mounted position
  959 + * @param opticalZoomParam: refer to T_DjiCameraManagerOpticalZoomParam.
  960 + * @return Execution result.
  961 + */
  962 +T_DjiReturnCode DjiCameraManager_GetOpticalZoomParam(E_DjiMountPosition position,
  963 + T_DjiCameraManagerOpticalZoomParam *opticalZoomParam);
  964 +
  965 +/**
  966 + * @brief Set target zoom factor for infrared zooming of the selected camera mounted position.
  967 + * @param position: camera mounted position
  968 + * @param factor: target zoom factor.
  969 + * @return Execution result.
  970 + */
  971 +T_DjiReturnCode DjiCameraManager_SetInfraredZoomParam(E_DjiMountPosition position,
  972 + dji_f32_t factor);
  973 +
  974 +/**
  975 + * @brief Enable/Disable the tap-zoom function for the selected camera mounted position.
  976 + * @note TapZoomAtTarget can only be called when tap-zoom is enabled.
  977 + * @param position: camera mounted position
  978 + * @param param: enable/disable
  979 + * @return Execution result.
  980 + */
  981 +T_DjiReturnCode DjiCameraManager_SetTapZoomEnabled(E_DjiMountPosition position,
  982 + bool param);
  983 +
  984 +/**
  985 + * @brief Get status of camera's tap-zoom function of the selected camera mounted position.
  986 + * @param position: camera mounted position
  987 + * @param param: enable/disable
  988 + * @return Execution result.
  989 + */
  990 +T_DjiReturnCode DjiCameraManager_GetTapZoomEnabled(E_DjiMountPosition position, bool *param);
  991 +
  992 +/**
  993 + * @brief Set camera's tap-zoom multiplier of the selected camera mounted position.
  994 + * @note The final zoom scale during a tap-zoom action will be:
  995 + * Current Zoom Scale x Multiplier.
  996 + * @param position: camera mounted position
  997 + * @param tapZoomMultiplier: The multiplier range is [1,5]. A multiplier of 1 will not change the zoom.
  998 + * hen the multiplier is 1, the zoom scale will not change during TapZoom.
  999 + * @return Execution result.
  1000 + */
  1001 +T_DjiReturnCode DjiCameraManager_SetTapZoomMultiplier(E_DjiMountPosition position, uint8_t tapZoomMultiplier);
  1002 +
  1003 +/**
  1004 + * @brief Get camera's tap-zoom multiplier of the selected camera mounted position.
  1005 + * @param position: camera mounted position
  1006 + * @param tapZoomMultiplier: The multiplier range is [1,5]. A multiplier of 1 will not change the zoom.
  1007 + * When the multiplier is 1, the zoom scale will not change during TapZoom.
  1008 + * @return Execution result.
  1009 + */
  1010 +T_DjiReturnCode DjiCameraManager_GetTapZoomMultiplier(E_DjiMountPosition position, uint8_t *tapZoomMultiplier);
  1011 +
  1012 +/**
  1013 + * @brief Set camera's tap-zoom point of the selected camera mounted position.
  1014 + * @note Only available when tap-zoom is enabled. Sets a new target,
  1015 + * reorienting the gimbal to locate the target on the screen center and
  1016 + * applying the tap-zoom multiplier.
  1017 + * @param position: camera mounted position
  1018 + * @param tapZoomPos: refer to T_DjiCameraManagerTapZoomPosData.
  1019 + * @return Execution result.
  1020 + */
  1021 +T_DjiReturnCode DjiCameraManager_TapZoomAtTarget(E_DjiMountPosition position,
  1022 + T_DjiCameraManagerTapZoomPosData tapZoomPos);
  1023 +
  1024 +/**
  1025 + * @brief Get camera focus ring value range.
  1026 + * @param position: camera mounted position
  1027 + * @param rangeList: returned value of range.
  1028 + * @return Execution result.
  1029 + */
  1030 +T_DjiReturnCode DjiCameraManager_GetFocusRingRange(E_DjiMountPosition position,
  1031 + T_DjiCameraManagerRangeList *rangeList);
  1032 +
  1033 +/**
  1034 + * @brief Set camera focus ring value.
  1035 + * @param position: camera mounted position
  1036 + * @param value: focus ring value.
  1037 + * @return Execution result.
  1038 + */
  1039 +T_DjiReturnCode DjiCameraManager_SetFocusRingValue(E_DjiMountPosition position,
  1040 + uint16_t value);
  1041 +
  1042 +/**
  1043 + * @brief Get camera focus ring value.
  1044 + * @param position: camera mounted position
  1045 + * @param value: focus ring value to be returned.
  1046 + * @return Execution result.
  1047 + */
  1048 +T_DjiReturnCode DjiCameraManager_GetFocusRingValue(E_DjiMountPosition position,
  1049 + uint16_t *value);
  1050 +
  1051 +/**
  1052 + * @brief Set camera's exposure mode of the selected camera mounted position.
  1053 + * @note Different exposure modes define whether settings like aperture, shutter
  1054 + * speed, and ISO are set automatically or manually. Exposure compensation is
  1055 + * adjustable in all modes except the manual mode.
  1056 + * @param position: camera mounted position
  1057 + * @param mode: refer to E_DjiCameraManagerExposureMode.
  1058 + * @return Execution result.
  1059 + */
  1060 +T_DjiReturnCode DjiCameraManager_SetExposureMode(E_DjiMountPosition position,
  1061 + E_DjiCameraManagerExposureMode mode);
  1062 +
  1063 +/**
  1064 + * @brief Get camera's exposure mode of the selected camera mounted position.
  1065 + * @note Different exposure modes define whether settings like aperture, shutter
  1066 + * speed, and ISO are set automatically or manually. Exposure compensation is
  1067 + * adjustable in all modes except the manual mode.
  1068 + * @param position: camera mounted position
  1069 + * @param mode: refer to E_DjiCameraManagerExposureMode.
  1070 + * @return Execution result.
  1071 + */
  1072 +T_DjiReturnCode DjiCameraManager_GetExposureMode(E_DjiMountPosition position,
  1073 + E_DjiCameraManagerExposureMode *mode);
  1074 +
  1075 +/**
  1076 + * @brief Set camera's iso value of the selected camera mounted position.
  1077 + * @note ISO value can only be set when the camera exposure mode is in
  1078 + * manual mode.
  1079 + * @param position: camera mounted position
  1080 + * @param iso: refer to E_DjiCameraManagerISO.
  1081 + * @return Execution result.
  1082 + */
  1083 +T_DjiReturnCode DjiCameraManager_SetISO(E_DjiMountPosition position,
  1084 + E_DjiCameraManagerISO iso);
  1085 +
  1086 +/**
  1087 + * @brief Get camera's iso value of the selected camera mounted position.
  1088 + * @param position: camera mounted position
  1089 + * @param iso: refer to E_DjiCameraManagerISO.
  1090 + * @return Execution result.
  1091 + */
  1092 +T_DjiReturnCode DjiCameraManager_GetISO(E_DjiMountPosition position,
  1093 + E_DjiCameraManagerISO *iso);
  1094 +
  1095 +/**
  1096 + * @brief Set camera's aperture size value of the selected camera mounted position.
  1097 + * @note The exposure mode must be on DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL or
  1098 + * DJI_CAMERA_MANAGER_EXPOSURE_MODE_APERTURE_PRIORITY.
  1099 + * @param position: camera mounted position
  1100 + * @param aperture: refer to E_DjiCameraManagerAperture.
  1101 + * @return Execution result.
  1102 + */
  1103 +T_DjiReturnCode DjiCameraManager_SetAperture(E_DjiMountPosition position,
  1104 + E_DjiCameraManagerAperture aperture);
  1105 +
  1106 +/**
  1107 + * @brief Get camera's aperture size value of the selected camera mounted position.
  1108 + * @param position: camera mounted position
  1109 + * @param aperture: refer to E_DjiCameraManagerAperture.
  1110 + * @return Execution result.
  1111 + */
  1112 +T_DjiReturnCode DjiCameraManager_GetAperture(E_DjiMountPosition position,
  1113 + E_DjiCameraManagerAperture *aperture);
  1114 +
  1115 +/**
  1116 + * @brief Set camera's shutter speed value of the selected camera mounted position.
  1117 + * @note Set the camera shutter speed. Ensure the shutter speed is not set
  1118 + * slower than the video frame rate when the camera's mode is RECORD_VIDEO.
  1119 + * For example, if the video frame rate is 30fps, the shutterSpeed must be <=
  1120 + * 1/30. Precondition: The shutter speed can be set only when the camera
  1121 + * exposure mode is DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL mode or
  1122 + * DJI_CAMERA_MANAGER_EXPOSURE_MODE_SHUTTER_PRIORITY
  1123 + * @param position: camera mounted position
  1124 + * @param shutterSpeed: refer to E_DjiCameraManagerShutterSpeed.
  1125 + * @return Execution result.
  1126 + */
  1127 +T_DjiReturnCode DjiCameraManager_SetShutterSpeed(E_DjiMountPosition position,
  1128 + E_DjiCameraManagerShutterSpeed shutterSpeed);
  1129 +
  1130 +/**
  1131 + * @brief Get camera's shutter value of the selected camera mounted position.
  1132 + * @param position: camera mounted position
  1133 + * @param shutterSpeed: refer to E_DjiCameraManagerShutterSpeed.
  1134 + * @return Execution result.
  1135 + */
  1136 +T_DjiReturnCode DjiCameraManager_GetShutterSpeed(E_DjiMountPosition position,
  1137 + E_DjiCameraManagerShutterSpeed *shutterSpeed);
  1138 +
  1139 +/**
  1140 + * @brief Set camera's EV value of the selected camera mounted position.
  1141 + * @note This function is available in program, shutter, or aperture
  1142 + * exposure modes. Enums are DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL,
  1143 + * DJI_CAMERA_MANAGER_EXPOSURE_MODE_SHUTTER_PRIORITY, and
  1144 + * DJI_CAMERA_MANAGER_EXPOSURE_APERTURE_PRIORITY
  1145 + * @param position: camera mounted position
  1146 + * @param ev: refer to E_DjiCameraManagerExposureCompensation.
  1147 + * @return Execution result.
  1148 + */
  1149 +T_DjiReturnCode DjiCameraManager_SetExposureCompensation(E_DjiMountPosition position,
  1150 + E_DjiCameraManagerExposureCompensation ev);
  1151 +
  1152 +/**
  1153 + * @brief Get camera's EV value of the selected camera mounted position.
  1154 + * @param position: camera mounted position
  1155 + * @param ev: refer to E_DjiCameraManagerExposureCompensation.
  1156 + * @return Execution result.
  1157 + */
  1158 +T_DjiReturnCode DjiCameraManager_GetExposureCompensation(E_DjiMountPosition position,
  1159 + E_DjiCameraManagerExposureCompensation *ev);
  1160 +
  1161 +/**
  1162 + * @brief Set AE lock mode.
  1163 + * @param position: camera mounted position
  1164 + * @param enable: true to enable, false to disable AE lock.
  1165 + * @return Execution result.
  1166 + */
  1167 +T_DjiReturnCode DjiCameraManager_SetAELockEnabled(E_DjiMountPosition position,
  1168 + bool enable);
  1169 +
  1170 +/**
  1171 + * @brief Get AE lock mode.
  1172 + * @note This API is not supported by L1/P1/M3D/M3TD models.
  1173 + * @param position: camera mounted position
  1174 + * @param enable: result of AE lock mode.
  1175 + * @return Execution result.
  1176 + */
  1177 +T_DjiReturnCode DjiCameraManager_GetAELockEnabled(E_DjiMountPosition position,
  1178 + bool *enable);
  1179 +
  1180 +/**
  1181 + * @brief Reset camera settings.
  1182 + * @param position: camera mounted position
  1183 + * @return Execution result.
  1184 + */
  1185 +T_DjiReturnCode DjiCameraManager_ResetCameraSettings(E_DjiMountPosition position);
  1186 +
  1187 +/**
  1188 + * @brief Start to take video of the selected camera mounted position.
  1189 + * @note Camera must be in RECORD_VIDEO mode. For thermal imaging camera,
  1190 + * user can take a single photo when recording video.
  1191 + * @param position: camera mounted position
  1192 + * @return Execution result.
  1193 + */
  1194 +T_DjiReturnCode DjiCameraManager_StartRecordVideo(E_DjiMountPosition position);
  1195 +
  1196 +/**
  1197 + * @brief Stop to take video of the selected camera mounted position.
  1198 + * @note Precondition: The camera is recording currently.
  1199 + * @param position: camera mounted position
  1200 + * @return Execution result.
  1201 + */
  1202 +T_DjiReturnCode DjiCameraManager_StopRecordVideo(E_DjiMountPosition position);
  1203 +
  1204 +/**
  1205 + * @brief Get camera recording state.
  1206 + * @param position: camera mounted position
  1207 + * @param recordingState: result of getting, see E_DjiCameraManagerRecordingState.
  1208 + * @return Execution result.
  1209 + */
  1210 +T_DjiReturnCode DjiCameraManager_GetRecordingState(E_DjiMountPosition position,
  1211 + E_DjiCameraManagerRecordingState *recordingState);
  1212 +
  1213 +/**
  1214 + * @brief Get camera recording time.
  1215 + * @note This API is not supported by L1/P1/M3D/M3TD models.
  1216 + * @param position: camera mounted position
  1217 + * @param recordingTime: result of getting, unit is seconds.
  1218 + * @return Execution result.
  1219 + */
  1220 +T_DjiReturnCode DjiCameraManager_GetRecordingTime(E_DjiMountPosition position,
  1221 + uint16_t *recordingTime);
  1222 +/**
  1223 + * @brief Get camera stream source range.
  1224 + * @param position: camera mounted position
  1225 + * @param rangeList: pointer to the result.
  1226 + * @return Execution result.
  1227 + */
  1228 +T_DjiReturnCode DjiCameraManager_GetStreamSourceRange(E_DjiMountPosition position,
  1229 + T_DjiCameraManagerRangeList *rangeList);
  1230 +
  1231 +/**
  1232 + * @brief Choose camera stream source.
  1233 + * @param position: camera mounted position
  1234 + * @param streamSource: stream source to be chose.
  1235 + * @return Execution result.
  1236 + */
  1237 +T_DjiReturnCode DjiCameraManager_SetStreamSource(E_DjiMountPosition position,
  1238 + E_DjiCameraManagerStreamSource streamSource);
  1239 +
  1240 +/**
  1241 + * @brief Get photo storage format range.
  1242 + * @param position: camera mounted position
  1243 + * @param rangeList: range list returned value
  1244 + * @return Execution result.
  1245 + */
  1246 +T_DjiReturnCode DjiCameraManager_GetPhotoStorageFormatRange(E_DjiMountPosition position,
  1247 + T_DjiCameraManagerRangeList *rangeList);
  1248 +
  1249 +/**
  1250 + * @brief Set photo storage format.
  1251 + * @param position: camera mounted position
  1252 + * @param format: storage format.
  1253 + * @return Execution result.
  1254 + */
  1255 +T_DjiReturnCode DjiCameraManager_SetPhotoFormat(E_DjiMountPosition position,
  1256 + E_DjiCameraManagerPhotoStorageFormat format);
  1257 +
  1258 +/**
  1259 + * @brief Get photo storage format.
  1260 + * @param position: camera mounted position
  1261 + * @param format: returned value of storage format.
  1262 + * @return Execution result.
  1263 + */
  1264 +T_DjiReturnCode DjiCameraManager_GetPhotoFormat(E_DjiMountPosition position,
  1265 + E_DjiCameraManagerPhotoStorageFormat *format);
  1266 +
  1267 +/**
  1268 + * @brief Get video storage format range.
  1269 + * @param position: camera mounted position
  1270 + * @param rangeList: range list returned value
  1271 + * @return Execution result.
  1272 + */
  1273 +T_DjiReturnCode DjiCameraManager_GetVideoFormatRange(E_DjiMountPosition position,
  1274 + T_DjiCameraManagerRangeList *rangeList);
  1275 +
  1276 +/**
  1277 + * @brief Set video storage format.
  1278 + * @param position: camera mounted position
  1279 + * @param format: storage format.
  1280 + * @return Execution result.
  1281 + */
  1282 +T_DjiReturnCode DjiCameraManager_SetVideoStorageFormat(E_DjiMountPosition position,
  1283 + E_DjiCameraManagerVideoStorageFormat format);
  1284 +
  1285 +/**
  1286 + * @brief Get video storage format.
  1287 + * @param position: camera mounted position
  1288 + * @param format: returned value of storage format.
  1289 + * @return Execution result.
  1290 + */
  1291 +T_DjiReturnCode DjiCameraManager_GetVideoFormat(E_DjiMountPosition position,
  1292 + E_DjiCameraManagerVideoStorageFormat *format);
  1293 +
  1294 +/**
  1295 + * @brief Get photo ratio range
  1296 + * @param position: camera mounted position
  1297 + * @param rangeList: range list returned value
  1298 + * @return Execution result.
  1299 + */
  1300 +T_DjiReturnCode DjiCameraManager_GetPhotoRatioRange(E_DjiMountPosition position,
  1301 + T_DjiCameraManagerRangeList *rangeList);
  1302 +
  1303 +/**
  1304 + * @brief Set camera photo ratio
  1305 + * @param position: camera mounted position
  1306 + * @param photoRatio: ratio to be set
  1307 + * @return Execution result.
  1308 + */
  1309 +T_DjiReturnCode DjiCameraManager_SetPhotoRatio(E_DjiMountPosition position,
  1310 + E_DjiCameraManagerPhotoRatio photoRatio);
  1311 +
  1312 +/**
  1313 + * @brief Get camera photo ratio
  1314 + * @param position: camera mounted position
  1315 + * @param photoRatio: returned value of photo ratio
  1316 + * @return Execution result.
  1317 + */
  1318 +T_DjiReturnCode DjiCameraManager_GetPhotoRatio(E_DjiMountPosition position,
  1319 + E_DjiCameraManagerPhotoRatio *photoRatio);
  1320 +
  1321 +/**
  1322 + * @brief Get camera video resolution and frame rate
  1323 + * @param position: camera mounted position
  1324 + * @param photoRatio: returned value of video resolution and frame rate
  1325 + * @return Execution result.
  1326 + */
  1327 +T_DjiReturnCode DjiCameraManager_GetVideoResolutionFrameRate(E_DjiMountPosition position,
  1328 + T_DjiCameraManagerVideoFormat *videoParam);
  1329 +
  1330 +/**
  1331 + * @brief Get night scene mode range.
  1332 + * @param position: camera mounted position.
  1333 + * @param tempRange: returned valued of night scene mode range.
  1334 + * @return Execution result.
  1335 + */
  1336 +T_DjiReturnCode DjiCameraManager_GetNightSceneModeRange(E_DjiMountPosition position,
  1337 + T_DjiCameraManagerRangeList *rangeList);
  1338 +
  1339 +/**
  1340 + * @brief Set night scene mode.
  1341 + * @note Make sure that stream source is zoom or wide camera.
  1342 + * @param position: camera mounted position
  1343 + * @param nightSceneMode: night scene mode.
  1344 + * @return Execution result.
  1345 + */
  1346 +T_DjiReturnCode DjiCameraManager_SetNightSceneMode(E_DjiMountPosition position,
  1347 + E_DjiCameraManagerNightSceneMode nightSceneMode);
  1348 +
  1349 +/**
  1350 + * @brief Get night scene mode.
  1351 + * @param position: camera mounted position
  1352 + * @param nightSceneMode: pointer to night scene mode.
  1353 + * @return Execution result.
  1354 + */
  1355 +T_DjiReturnCode DjiCameraManager_GetNightSceneMode(E_DjiMountPosition position,
  1356 + E_DjiCameraManagerNightSceneMode *nightSceneMode);
  1357 +
  1358 +/**
  1359 + * @brief Get range of stream source(s) can be stored when capturing or recording.
  1360 + * @param position: camera mounted position.
  1361 + * @param rangeList: returned value of range, in member streamStorage.
  1362 + * @return Execution result.
  1363 + */
  1364 +T_DjiReturnCode DjiCameraManager_GetStreamStorageRange(E_DjiMountPosition position,
  1365 + T_DjiCameraManagerRangeList *rangeList);
  1366 +
  1367 +/**
  1368 + * @brief Select capture or recording stream(s) to store.
  1369 + * @note Precondition: set camera's work corresponding to streamType
  1370 + * @param position: camera mounted position.
  1371 + * @param streamType: capture mode or recording mode.
  1372 + * @param streamStorageList: Pointer to the struct that contains stream list.
  1373 + * @return Execution result.
  1374 + */
  1375 +T_DjiReturnCode DjiCameraManager_SetCaptureRecordingStreams(E_DjiMountPosition position,
  1376 + E_DjiCameraManagerCaptureOrRecording streamType,
  1377 + T_DjiCameraManagerStreamList *streamStorageList);
  1378 +
  1379 +/**
  1380 + * @brief Get the stream(s) of capture or recording mode to be stored.
  1381 + * @param position: camera mounted position.
  1382 + * @param streamType: capture mode or recording mode.
  1383 + * @param streamSourceList: the real return value.
  1384 + * @return Execution result.
  1385 + */
  1386 +T_DjiReturnCode DjiCameraManager_GetCaptureRecordingStreams(E_DjiMountPosition position,
  1387 + E_DjiCameraManagerCaptureOrRecording streamType,
  1388 + T_DjiCameraManagerStreamList *streamStorageList);
  1389 +
  1390 +/**
  1391 + * @brief Turn on/off synchronized split screen zoom function.
  1392 + * @param position: camera mounted position.
  1393 + * @param enable: set true to turn on, false to turn off.
  1394 + * @return Execution result.
  1395 + */
  1396 +T_DjiReturnCode DjiCameraManager_SetSynchronizedSplitScreenZoomEnabled(E_DjiMountPosition position, bool enable);
  1397 +
  1398 +
  1399 +/**
  1400 + * @brief Set suffix name of directory or file.
  1401 + * @note This setting applies only once for file names.
  1402 + * @param position: camera mounted position.
  1403 + * @param nameType: see E_DjiCameraManagerExpandNameType, select to set name of directory or file.
  1404 + * @param nameSize: Length of the name string, between 1 and 239 characters.
  1405 + * @param nameStr: Content of custom suffix name.
  1406 + * @return Execution result.
  1407 + */
  1408 +T_DjiReturnCode DjiCameraManager_SetCustomExpandName(E_DjiMountPosition position,
  1409 + E_DjiCameraManagerExpandNameType nameType,
  1410 + const uint8_t *nameStr,
  1411 + uint32_t nameSize);
  1412 +
  1413 +/**
  1414 + * @brief Get the custom suffix of the most recent directory or file name.
  1415 + * @param position: camera mounted position
  1416 + * @param nameType: to choose directory or file to get custom name
  1417 + * @param nameStr: name string buffer
  1418 + * @param nameSize: On input, indicates the maximum size of nameStr; on output,
  1419 + * the actual size of the name string.
  1420 + * @return Execution result.
  1421 + */
  1422 +T_DjiReturnCode DjiCameraManager_GetCustomExpandName(E_DjiMountPosition position,
  1423 + E_DjiCameraManagerExpandNameType nameType,
  1424 + uint8_t *nameStr,
  1425 + uint32_t *nameSize);
  1426 +
  1427 +
  1428 +/**
  1429 + * @brief Downloads a list of media files from the selected camera.
  1430 + * @note This synchronous interface may lead to higher CPU usage.
  1431 + * Times out after 3 seconds if the download fails.
  1432 + * @param position: the mount position of the camera
  1433 + * @param fileList: the pointer to the downloaded camera file list
  1434 + * @return Execution result.
  1435 + */
  1436 +T_DjiReturnCode DjiCameraManager_DownloadFileList(E_DjiMountPosition position, T_DjiCameraManagerFileList *fileList);
  1437 +
  1438 +/**
  1439 + * @brief Download selected camera media file list by slices.
  1440 + * @note This synchronous interface may lead to higher CPU usage.
  1441 + * Times out after 3 seconds if the download fails.
  1442 + * @param position: the mount position of the camera
  1443 + * @param sliceConfig: the slices config for downloading file list
  1444 + * @param fileList: the pointer to the downloaded camera file list
  1445 + * @return Execution result.
  1446 + */
  1447 +T_DjiReturnCode DjiCameraManager_DownloadFileListBySlices(E_DjiMountPosition position,
  1448 + T_DjiCameraManagerSliceConfig sliceConfig,
  1449 + T_DjiCameraManagerFileList *fileList);
  1450 +/**
  1451 + * @brief Registers a callback for downloading file data.
  1452 + * @param position: the mount position of the camera
  1453 + * @param callback: the download file data callback
  1454 + * @return Execution result.
  1455 + */
  1456 +T_DjiReturnCode DjiCameraManager_RegDownloadFileDataCallback(E_DjiMountPosition position,
  1457 + DjiCameraManagerDownloadFileDataCallback callback);
  1458 +
  1459 +/**
  1460 + * @brief Downloads a media file specified by its index.
  1461 + * @note Supports downloading one file at a time. Wait for a download to finish before starting another.
  1462 + * This synchronous interface may lead to higher CPU usage.
  1463 + * Times out after 3 seconds if the download fails.
  1464 + * @param position: the mount position of the camera
  1465 + * @param fileIndex: the index of the camera media file
  1466 + * @return Execution result.
  1467 + */
  1468 +T_DjiReturnCode DjiCameraManager_DownloadFileByIndex(E_DjiMountPosition position, uint32_t fileIndex);
  1469 +
  1470 +/**
  1471 + * @brief Download selected camera media file by file index and file type.
  1472 + * @note This API only supports L2 camera.
  1473 + * Supports downloading one file at a time. Wait for a download to finish before starting another.
  1474 + * This synchronous interface may lead to higher CPU usage.
  1475 + * Times out after 3 seconds if the download fails.
  1476 + * @param position: the mount position of the camera
  1477 + * @param fileIndex: the index of the camera media file
  1478 + * @param fileType: the sub type of the camera media file
  1479 + * @return Execution result.
  1480 + */
  1481 +T_DjiReturnCode DjiCameraManager_DownloadSubFileByIndexAndSubType(E_DjiMountPosition position, uint32_t index, E_DjiCameraMediaFileSubType fileType);
  1482 +/**
  1483 + * @brief Obtains the rights to download media files before downloading media files
  1484 + * @param position: the mount position of the camera
  1485 + * @return Execution result.
  1486 + */
  1487 +T_DjiReturnCode DjiCameraManager_ObtainDownloaderRights(E_DjiMountPosition position);
  1488 +
  1489 +/**
  1490 + * @brief Releases the rights to download media files after downloading media files
  1491 + * @note Failure to release downloader rights may restrict access to the camera album
  1492 + * by the pilot app.
  1493 + * @param position: the mount position of the camera
  1494 + * @return Execution result.
  1495 + */
  1496 +T_DjiReturnCode DjiCameraManager_ReleaseDownloaderRights(E_DjiMountPosition position);
  1497 +
  1498 +/**
  1499 + * @brief Format SD card.
  1500 + * @param position: the mount position of the camera
  1501 + * @return Execution result.
  1502 + */
  1503 +T_DjiReturnCode DjiCameraManager_FormatStorage(E_DjiMountPosition position);
  1504 +
  1505 +/**
  1506 + * @brief Get storage info of SD card.
  1507 + * @note This API doesn't support L1/P1/M3D/M3TD models.
  1508 + * @param position: the mount position of the camera
  1509 + * @param storageInfo: Result of SD Card storage information
  1510 + * @return Execution result.
  1511 + */
  1512 +T_DjiReturnCode DjiCameraManager_GetStorageInfo(E_DjiMountPosition position,
  1513 + T_DjiCameraManagerStorageInfo *storageInfo);
  1514 +
  1515 +/**
  1516 + * @brief Delete selected camera media file by file index.
  1517 + * @param position: the mount position of the camera
  1518 + * @param fileIndex: the index of the camera media file
  1519 + * @return Execution result.
  1520 + */
  1521 +T_DjiReturnCode DjiCameraManager_DeleteFileByIndex(E_DjiMountPosition position, uint32_t fileIndex);
  1522 +
  1523 +/**
  1524 + * @brief Get the camera laser ranging info of the selected camera mounted position.
  1525 + * @note Maximum data update frequency: 5Hz.
  1526 + * @param position: the mount position of the camera
  1527 + * @param laserRangingInfo: the pointer to the camera laser ranging info
  1528 + * @return Execution result.
  1529 + */
  1530 +T_DjiReturnCode DjiCameraManager_GetLaserRangingInfo(E_DjiMountPosition position,
  1531 + T_DjiCameraManagerLaserRangingInfo *laserRangingInfo);
  1532 +
  1533 +/**
  1534 + * @brief Set point thermometry coordinates of the selected camera mounted position.
  1535 + * @param position: camera mounted position
  1536 + * @param pointCoordinate: point thermometry coordinates
  1537 + * @return Execution result.
  1538 + */
  1539 +T_DjiReturnCode DjiCameraManager_SetPointThermometryCoordinate(E_DjiMountPosition position,
  1540 + T_DjiCameraManagerPointThermometryCoordinate pointCoordinate);
  1541 +
  1542 +/**
  1543 + * @brief Get point thermometry result.
  1544 + * @note Before get point thermometry data from camera, DjiCameraManager_SetPointThermometryCoordinate()
  1545 + * function has to be called.
  1546 + * @param position: camera mounted position
  1547 + * @param pointThermometryData: point thermometry result
  1548 + * @return Execution result.
  1549 + */
  1550 +T_DjiReturnCode DjiCameraManager_GetPointThermometryData(E_DjiMountPosition position,
  1551 + T_DjiCameraManagerPointThermometryData *pointThermometryData);
  1552 +
  1553 +/**
  1554 + * @brief Set area thermometry coordinates of the selected camera mounted position.
  1555 + * @param position: camera mounted position
  1556 + * @param areaCoordinate: area thermometry coordinates
  1557 + * @return Execution result.
  1558 + */
  1559 +T_DjiReturnCode DjiCameraManager_SetAreaThermometryCoordinate(E_DjiMountPosition position,
  1560 + T_DjiCameraManagerAreaThermometryCoordinate areaCoordinate);
  1561 +
  1562 +/**
  1563 + * @brief Get area thermometry result.
  1564 + * @note Before get area thermometry data from camera, DjiCameraManager_SetAreaThermometryCoordinate()
  1565 + * function has to be called.
  1566 + * @param position: camera mounted position
  1567 + * @param areaThermometryData: area thermometry result
  1568 + * @return Execution result.
  1569 + */
  1570 +T_DjiReturnCode DjiCameraManager_GetAreaThermometryData(E_DjiMountPosition position,
  1571 + T_DjiCameraManagerAreaThermometryData *areaThermometryData);
  1572 +
  1573 +/**
  1574 + * @brief Set FFC mode.
  1575 + * @param position: camera mounted position.
  1576 + * @param ffcMode: mode to be set.
  1577 + * @return Execution result.
  1578 + */
  1579 +T_DjiReturnCode DjiCameraManager_SetFfcMode(E_DjiMountPosition position, E_DjiCameraManagerFfcMode ffcMode);
  1580 +
  1581 +/**
  1582 + * @brief Trigger FFC one time.
  1583 + * @param position: camera mounted position.
  1584 + * @return Execution result.
  1585 + */
  1586 +T_DjiReturnCode DjiCameraManager_TriggerFfc(E_DjiMountPosition position);
  1587 +
  1588 +/**
  1589 + * @brief Set infrared camera gain mode.
  1590 + * @param position: camera mounted position.
  1591 + * @param gainMode: gain mode to set.
  1592 + * @return Execution result.
  1593 + */
  1594 +T_DjiReturnCode DjiCameraManager_SetInfraredCameraGainMode(E_DjiMountPosition position,
  1595 + E_DjiCameraManagerIrGainMode gainMode);
  1596 +
  1597 +/**
  1598 + * @brief Get temperature range of infrared camera.
  1599 + * @param position: camera mounted position.
  1600 + * @param tempRange: returned valued of temperature range.
  1601 + * @return Execution result.
  1602 + */
  1603 +T_DjiReturnCode DjiCameraManager_GetInfraredCameraGainModeTemperatureRange(E_DjiMountPosition position,
  1604 + T_DjiCameraManagerIrTempMeterRange *tempRange);
  1605 +
  1606 +/**
  1607 + * @brief Set camera metering mode.
  1608 + * @param position: camera mounted position
  1609 + * @param meteringMode: metering mode
  1610 + * @return Execution result.
  1611 + */
  1612 +T_DjiReturnCode DjiCameraManager_SetMeteringMode(E_DjiMountPosition position,
  1613 + E_DjiCameraManagerMeteringMode meteringMode);
  1614 +
  1615 +/**
  1616 + * @brief Get camera metering mode.
  1617 + * @param position: camera mounted position
  1618 + * @param meteringMode: pointer to returned value of metering mode
  1619 + * @return Execution result.
  1620 + */
  1621 +T_DjiReturnCode DjiCameraManager_GetMeteringMode(E_DjiMountPosition position,
  1622 + E_DjiCameraManagerMeteringMode *meteringMode);
  1623 +
  1624 +/**
  1625 + * @brief Get range of metering point.
  1626 + * @param position: camera mounted position
  1627 + * @param hrzNum: returned value, horizontal range.
  1628 + * @param vtcNum: returned value, vertical range.
  1629 + * @return Execution result.
  1630 + */
  1631 +T_DjiReturnCode DjiCameraManager_GetMeteringPointRegionRange(E_DjiMountPosition position,
  1632 + uint8_t *hrzNum, uint8_t *vtcNum);
  1633 +/**
  1634 + * @brief Set metering point.
  1635 + * @param position: camera mounted position
  1636 + * @param x: Horizontal coordinate value, should be no greater than hrzNum - 1.
  1637 + * @param y: Horizontal coordinate value, should be no greater than vtcNum - 1.
  1638 + * @return Execution result.
  1639 + */
  1640 +T_DjiReturnCode DjiCameraManager_SetMeteringPoint(E_DjiMountPosition position,
  1641 + uint8_t x, uint8_t y);
  1642 +
  1643 +/**
  1644 + * @brief Get camera metering mode.
  1645 + * @param position: camera mounted position
  1646 + * @param x: returned valued, current metering point in horizontal coordinate.
  1647 + * @param y: returned valued, current metering point in vertical coordinate.
  1648 + * @return Execution result.
  1649 + */
  1650 +T_DjiReturnCode DjiCameraManager_GetMeteringPoint(E_DjiMountPosition position,
  1651 + uint8_t *x, uint8_t *y);
  1652 +
  1653 +
  1654 +/**
  1655 + * @brief Start to record point cloud of the selected camera mounted position.
  1656 + * @param position: camera mounted position
  1657 + * @return Execution result.
  1658 + */
  1659 +T_DjiReturnCode DjiCameraManager_StartRecordPointCloud(E_DjiMountPosition position);
  1660 +
  1661 +/**
  1662 + * @brief Stop to record point cloud of the selected camera mounted position.
  1663 + * @note Precondition: The camera is recording currently.
  1664 + * @param position: camera mounted position
  1665 + * @return Execution result.
  1666 + */
  1667 +T_DjiReturnCode DjiCameraManager_StopRecordPointCloud(E_DjiMountPosition position);
  1668 +
  1669 +#ifdef __cplusplus
  1670 +}
  1671 +#endif
  1672 +
  1673 +#endif // DJI_CAMERA_MANAGER_H
  1674 +/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
  1 +/**
  2 + ********************************************************************
  3 + * @file dij_core.h
  4 + * @brief This is the header file for "dij_core.c", defining the structure and
  5 + * (exported) function prototypes.
  6 + *
  7 + * @copyright (c) 2021 DJI. All rights reserved.
  8 + *
  9 + * All information contained herein is, and remains, the property of DJI.
  10 + * The intellectual and technical concepts contained herein are proprietary
  11 + * to DJI and may be covered by U.S. and foreign patents, patents in process,
  12 + * and protected by trade secret or copyright law. Dissemination of this
  13 + * information, including but not limited to data and other proprietary
  14 + * material(s) incorporated within the information, in any form, is strictly
  15 + * prohibited without the express written consent of DJI.
  16 + *
  17 + * If you receive this source code without DJI’s authorization, you may not
  18 + * further disseminate the information, and you must immediately remove the
  19 + * source code and notify DJI of its removal. DJI reserves the right to pursue
  20 + * legal actions against you for any loss(es) or damage(s) caused by your
  21 + * failure to do so.
  22 + *
  23 + *********************************************************************
  24 + */
  25 +
  26 +/* Define to prevent recursive inclusion -------------------------------------*/
  27 +#ifndef DJI_CORE_H
  28 +#define DJI_CORE_H
  29 +
  30 +/* Includes ------------------------------------------------------------------*/
  31 +#include "dji_platform.h"
  32 +
  33 +#ifdef __cplusplus
  34 +extern "C" {
  35 +#endif
  36 +
  37 +/* Exported constants --------------------------------------------------------*/
  38 +
  39 +/* Exported types ------------------------------------------------------------*/
  40 +typedef struct {
  41 + char appName[32]; /*!< Specifies DJI SDK app name. This info can be obtained by logging in to the
  42 + developer website https://developer.dji.com/user/apps/#all. End with '\0'. */
  43 + char appId[16]; /*!< Specifies DJI SDK app ID. This info can be obtained by logging in to the
  44 + developer website https://developer.dji.com/user/apps/#all. */
  45 + char appKey[32]; /*!< Specifies DJI SDK app key. This info can be obtained by logging in to the
  46 + developer website https://developer.dji.com/user/apps/#all. */
  47 + char appLicense[512]; /*!< Specifies DJI SDK app license. This info can be obtained by logging in to the
  48 + developer website https://developer.dji.com/user/apps/#all. */
  49 + char developerAccount[64]; /*!< Specifies DJI SDK developer account email. This info can be obtained by
  50 + logging in to the developer website https://developer.dji.com/user/apps/#all.
  51 + Developer's account and other related information need to be able to correspond.
  52 + End with '\0'. */
  53 + char baudRate[7]; /*!< Specifies DJI SDK communication serial port baud rate. */
  54 +} T_DjiUserInfo;
  55 +
  56 +/* Exported functions --------------------------------------------------------*/
  57 +/**
  58 + * @brief Initialize the Payload SDK core in blocking mode.
  59 + * @note The order of calling this call is crucial. It must be done after registering console/OSAL/HAL handler functions
  60 + * It must be done after registering console/OSAL/HAL handler functions and before using other functional module
  61 + * interfaces. Correctly fill in the developer information to ensure successful initialization. See the
  62 + * See the "PSDK Initialization" tutorial for more.
  63 + * This function does not return until the correct aircraft type and PSDK adapter type is obtained. The logic ensures
  64 + * that aircraft and PSDK adapter have been started up normally before PSDK functional module and user's program run.
  65 + * General execution time of this function is 2-4 seconds.
  66 + * @param userInfo: pointer to the PSDK application information.
  67 + * @return Execution result.
  68 + */
  69 +T_DjiReturnCode DjiCore_Init(const T_DjiUserInfo *userInfo);
  70 +
  71 +/**
  72 + * @brief Sets an alias for a DJI application or product that meets the condition for DJI application or product.
  73 + * If an alias exists, it will be displayed in DJI Pilot.
  74 + * @note Still need to pass in correct DJI APP name that is obtained from DJI SDK developer website to DjiCore_Init()
  75 + * interface. The DJI APP name will be used to bind and verification.
  76 + * The alias will take effect after a short delay, up to a maximum of 1 second.
  77 + * @param productAlias: A pointer to the product alias string, which must end with '\0'. The maximum length of the string is 31 characters.
  78 + * If the alias string exceeds 31 characters, it will be truncated before being passed in.
  79 + * @return Execution result.
  80 + */
  81 +T_DjiReturnCode DjiCore_SetAlias(const char *productAlias);
  82 +
  83 +/**
  84 + * @brief Set custom firmware version for DJI application or product.
  85 + * @details Payload firmware version will always display in DJI Pilot payload settings interface.
  86 + * @param version: the custom firmware version to be set.
  87 + * @return Execution result.
  88 + */
  89 +T_DjiReturnCode DjiCore_SetFirmwareVersion(T_DjiFirmwareVersion version);
  90 +
  91 +/**
  92 + * @brief Set custom serial number for DJI application or product.
  93 + * @details Payload custom serial number will always display in DJI Pilot payload settings interface.
  94 + * @param productSerialNumber: the custom serial number to be set, needs to be no larger than 32 bytes.
  95 + * @return Execution result.
  96 + */
  97 +T_DjiReturnCode DjiCore_SetSerialNumber(const char *productSerialNumber);
  98 +
  99 +/**
  100 + * @brief Notify that the Payload SDK core application starts.
  101 + * @note The order of calling this interface requires special attention, The call needs to be completed after all the
  102 + * module initialize and register interfaces.
  103 + * @return Execution result.
  104 + */
  105 +T_DjiReturnCode DjiCore_ApplicationStart(void);
  106 +
  107 +/**
  108 + * @brief DeInitialize the Payload SDK core in blocking mode.
  109 + * @return Execution result.
  110 + */
  111 +T_DjiReturnCode DjiCore_DeInit(void);
  112 +
  113 +#ifdef __cplusplus
  114 +}
  115 +#endif
  116 +
  117 +#endif // DIJ_CORE_H
  118 +/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
  1 +/**
  2 + ********************************************************************
  3 + * @file dji_fc_subscription.h
  4 + * @brief This is the header file for "dji_fc_subscription.c", defining the structure and
  5 + * (exported) function prototypes.
  6 + *
  7 + * @copyright (c) 2021 DJI. All rights reserved.
  8 + *
  9 + * All information contained herein is, and remains, the property of DJI.
  10 + * The intellectual and technical concepts contained herein are proprietary
  11 + * to DJI and may be covered by U.S. and foreign patents, patents in process,
  12 + * and protected by trade secret or copyright law. Dissemination of this
  13 + * information, including but not limited to data and other proprietary
  14 + * material(s) incorporated within the information, in any form, is strictly
  15 + * prohibited without the express written consent of DJI.
  16 + *
  17 + * If you receive this source code without DJI’s authorization, you may not
  18 + * further disseminate the information, and you must immediately remove the
  19 + * source code and notify DJI of its removal. DJI reserves the right to pursue
  20 + * legal actions against you for any loss(es) or damage(s) caused by your
  21 + * failure to do so.
  22 + *
  23 + *********************************************************************
  24 + */
  25 +
  26 +/* Define to prevent recursive inclusion -------------------------------------*/
  27 +#ifndef DJI_FC_SUBSCRIPTION_H
  28 +#define DJI_FC_SUBSCRIPTION_H
  29 +
  30 +/* Includes ------------------------------------------------------------------*/
  31 +#include "dji_typedef.h"
  32 +
  33 +#ifdef __cplusplus
  34 +extern "C" {
  35 +#endif
  36 +
  37 +/* Exported constants --------------------------------------------------------*/
  38 +
  39 +/* Exported types ------------------------------------------------------------*/
  40 +/**
  41 + * @brief Name of topics that can be subscribed. Topic is minimum data item subscribed.
  42 + */
  43 +typedef enum {
  44 + /*!
  45 + * @brief Quaternion of aircraft topic name. Quaternion topic provides aircraft body frame (FRD) to ground frame
  46 + * (NED) rotation. Please refer to ::T_DjiFcSubscriptionQuaternion for information about data structure.
  47 + * @details The DJI quaternion follows Hamilton convention (q0 = w, q1 = x, q2 = y, q3 = z).
  48 + * | Angle | Unit | Accuracy | Notes |
  49 + |--------------|------|------------|-------------------------------------------------|
  50 + | pitch, roll | deg | <1 | in NON-AHRS mode |
  51 + | yaw | deg | <3 | in well-calibrated compass with fine aligned |
  52 + | yaw with rtk | deg | around 1.2 | in RTK heading fixed mode with 1 meter baseline |
  53 + * @datastruct \ref T_DjiFcSubscriptionQuaternion
  54 + */
  55 + DJI_FC_SUBSCRIPTION_TOPIC_QUATERNION = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 0),
  56 + /*!
  57 + * @brief Provides aircraft's acceleration w.r.t a ground-fixed \b NEU frame @ up to 200Hz
  58 + * @warning Please note that this data is not in a conventional right-handed frame of reference.
  59 + * @details This is a fusion output from the flight control system. The output is in a right-handed NED frame, but the
  60 + * sign of the Z-axis acceleration is flipped before publishing to this topic. So if you are looking to get acceleration
  61 + * in an NED frame, simply flip the sign of the z-axis value. Beyond that, you can convert using rotations to
  62 + * any right-handed frame of reference.
  63 + * @units m/s<SUP>2</SUP>
  64 + * @datastruct \ref T_DjiFcSubscriptionAccelerationGround
  65 + */
  66 + DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_GROUND = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 1),
  67 + /*!
  68 + * @brief Provides aircraft's acceleration w.r.t a body-fixed \b FRU frame @ up to 200Hz
  69 + * @warning Please note that this data is not in a conventional right-handed frame of reference.
  70 + * @details This is a fusion output from the flight control system.
  71 + * @units m/s<SUP>2</SUP>
  72 + * @datastruct \ref T_DjiFcSubscriptionAccelerationBody
  73 + */
  74 + DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_BODY = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 2),
  75 + /*!
  76 + * @brief Provides aircraft's acceleration in an IMU-centered, body-fixed \b FRD frame @ up to 400Hz
  77 + * @details This is a filtered output from the IMU on board the flight control system.
  78 + * @sensors IMU
  79 + * @units m/s<SUP>2</SUP>
  80 + * @datastruct \ref T_DjiFcSubscriptionAccelerationRaw
  81 + */
  82 + DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_RAW = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 3),
  83 + /*!
  84 + * @brief Velocity of aircraft topic name. Velocity topic provides aircraft's velocity in a ground-fixed NEU frame.
  85 + * Please refer to ::T_DjiFcSubscriptionVelocity for information about data structure.
  86 + * @warning Please note that this data is not in a conventional right-handed frame of reference.
  87 + * @details This velocity data is a fusion output from the aircraft. Original output is in a right-handed NED frame, but the
  88 + * sign of the Z-axis velocity is flipped before publishing to this topic. So if you are looking to get velocity
  89 + * in an NED frame, simply flip the sign of the z-axis value. Beyond that, you can convert using rotations to
  90 + * any right-handed frame of reference.
  91 + * | Axis | Unit | Accuracy |
  92 + |----------|------|---------------------------------------------------------------------------------------------|
  93 + | vgx, vgy | m/s | Around 5cm/s for GNSS navigation. Around 3cm/s with VO at 1 meter height |
  94 + | vgz | m/s | 10cm/s only with barometer in steady air. 3cm/s with VO at 1 meter height with 8cm baseline |
  95 + * @datastruct \ref T_DjiFcSubscriptionVelocity
  96 + */
  97 + DJI_FC_SUBSCRIPTION_TOPIC_VELOCITY = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 4),
  98 + /*!
  99 + * @brief Provides aircraft's angular velocity in a ground-fixed \b NED frame @ up to 200Hz
  100 + * @details This is a fusion output from the flight control system.
  101 + * @units rad/s
  102 + * @datastruct \ref T_DjiFcSubscriptionAngularRateFusioned
  103 + */
  104 + DJI_FC_SUBSCRIPTION_TOPIC_ANGULAR_RATE_FUSIONED = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 5),
  105 + /*!
  106 + * @brief Provides aircraft's angular velocity in an IMU-centered, body-fixed \b FRD frame @ up to 400Hz
  107 + * @details This is a filtered output from the IMU on board the flight control system.
  108 + * @sensors IMU
  109 + * @units rad/s
  110 + * @datastruct \ref T_DjiFcSubscriptionAngularRateRaw
  111 + */
  112 + DJI_FC_SUBSCRIPTION_TOPIC_ANGULAR_RATE_RAW = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 6),
  113 + /*!
  114 + * @brief Fused altitude of aircraft topic name. Fused altitude topic provides aircraft's fused altitude from sea
  115 + * level. Please refer to ::T_DjiFcSubscriptionAltitudeFused for information about data structure.
  116 + * @units m
  117 + * @datastruct \ref T_DjiFcSubscriptionAltitudeFused
  118 + */
  119 + DJI_FC_SUBSCRIPTION_TOPIC_ALTITUDE_FUSED = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 7),
  120 + /*!
  121 + * @brief Provides aircraft's pressure altitude from sea level using the ICAO model @ up to 200Hz
  122 + * @details
  123 + * This is a filetered output from the barometer without any further fusion.
  124 + *
  125 + * The ICAO model gives an MSL altitude of 1013.25mBar at 15&deg; C and a temperature lapse rate of -6.5&deg; C
  126 + * per 1000m. In your case, it may be possible that the take off altitude of the aircraft is recording a higher pressure
  127 + * than 1013.25mBar. Let's take an example - a weather station shows that SFO (San Francisco International Airport) had
  128 + * recently recorded a pressure of 1027.1mBar. SFO is 4m above MSL, yet, if you calculate the Pressure Altitude using
  129 + * the ICAO model, it relates to -114m. You can use an online calculator to similarly calculate the Pressure Altitude
  130 + * in your area.
  131 + *
  132 + * Another factor that may affect your altitude reading is manufacturing differences in the barometer - it is not
  133 + * uncommon to have a variation of &plusmn;30m readings at the same physical location with two different aircraft. For a given
  134 + * aircraft, these readings will be consistent, so you will need to calibrate the offset of your system if your code
  135 + * relies on the accuracy of the absolute value of altitude.
  136 + * @sensors GPS, Barometer, IMU
  137 + * @units m
  138 + * @datastruct \ref T_DjiFcSubscriptionAltitudeBarometer
  139 + */
  140 + DJI_FC_SUBSCRIPTION_TOPIC_ALTITUDE_BAROMETER = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 8),
  141 + /*!
  142 + * @brief Provides the altitude from sea level when the aircraft last took off.
  143 + * @details
  144 + * This is a fusion output from the flight control system, and also uses the ICAO model.
  145 + *
  146 + * The ICAO model gives an MSL altitude of 1013.25mBar at 15&deg; C and a temperature lapse rate of -6.5&deg; C
  147 + * per 1000m. In your case, it may be possible that the take off altitude of the aircraft is recording a higher pressure
  148 + * than 1013.25mBar. Let's take an example - a weather station shows that SFO (San Francisco International Airport) had
  149 + * recently recorded a pressure of 1027.1mBar. SFO is 4m above MSL, yet, if you calculate the Pressure Altitude using
  150 + * the ICAO model, it relates to -114m. You can use an online calculator to similarly calculate the Pressure Altitude
  151 + * in your area.
  152 + *
  153 + * Another factor that may affect your altitude reading is manufacturing differences in the barometer - it is not
  154 + * uncommon to have a variation of &plusmn;30m readings at the same physical location with two different aircraft. For a given
  155 + * aircraft, these readings will be consistent, so you will need to calibrate the offset of your system if your code
  156 + * relies on the accuracy of the absolute value of altitude.
  157 + *
  158 + * @note This value is updated each time the drone takes off.
  159 + *
  160 + * @units m
  161 + * @datastruct \ref T_DjiFcSubscriptionAltitudeOfHomePoint
  162 + */
  163 + DJI_FC_SUBSCRIPTION_TOPIC_ALTITUDE_OF_HOMEPOINT = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 9),
  164 + /*!
  165 + * @brief Provides the relative height above ground at up to 100Hz.
  166 + * @details
  167 + * This is a fusion output from the flight control system. The height is a direct estimate of the closest large object below the aircraft's ultrasonic sensors.
  168 + * A large object is something that covers the ultrasonic sensor for an extended duration of time.
  169 + *
  170 + * @warning This topic does not come with a 'valid' flag - so if the aircraft is too far from an object for the
  171 + * ultrasonic sensors/VO to provide any meaningful data, the values will latch and there is no way for user code to
  172 + * determine if the data is valid or not. Use with caution.
  173 + * @sensors Visual Odometry, Ultrasonic
  174 + * @units m
  175 + * @datastruct \ref T_DjiFcSubscriptionHeightFusion
  176 + */
  177 + DJI_FC_SUBSCRIPTION_TOPIC_HEIGHT_FUSION = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 10),
  178 + /*!
  179 + * @brief Relative height above ground of aircraft topic name. Please refer to
  180 + * ::T_DjiFcSubscriptionHeightRelative for information about data structure.
  181 + * @details This data is a fusion output from aircraft. The height is a direct estimate of the closest large object
  182 + * below the aircraft's ultrasonic sensors.
  183 + * @warning This topic does not come with a 'valid' flag - so if the aircraft is too far from an object for the
  184 + * ultrasonic sensors/VO to provide any meaningful data, the values will latch and there is no way for user to
  185 + * determine if the data is valid or not. Please use with caution.
  186 + * @datastruct \ref T_DjiFcSubscriptionHeightRelative
  187 + */
  188 + DJI_FC_SUBSCRIPTION_TOPIC_HEIGHT_RELATIVE = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 11),
  189 +
  190 + /*!
  191 + * Fused position of aircraft topic name. Please refer to ::T_DjiFcSubscriptionPositionFused for information
  192 + * about data structure.
  193 + * @warning Please note that if GPS signal is weak (low visibleSatelliteNumber, see below), the
  194 + * latitude/longitude values won't be updated but the altitude might still be. There is currently no way to know if
  195 + * the lat/lon update is healthy.
  196 + * @details The most important component of this topic is the T_DjiFcSubscriptionPositionFused::visibleSatelliteNumber.
  197 + * Use this to track your GPS satellite coverage and build some heuristics for when you might expect to lose GPS updates.
  198 + * | Axis | Unit | Position Sensor | Accuracy |
  199 + |------|------|-----------------|--------------------------------------------------|
  200 + | x, y | m | GPS | <3m with open sky without multipath |
  201 + | z | m | GPS | <5m with open sky without multipath |
  202 + * @datastruct \ref T_DjiFcSubscriptionPositionFused
  203 + */
  204 + DJI_FC_SUBSCRIPTION_TOPIC_POSITION_FUSED = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 12),
  205 +
  206 + /*!
  207 + * @brief GPS date topic name. Please refer to ::T_DjiFcSubscriptionGpsDate for information about data structure.
  208 + * @datastruct \ref T_DjiFcSubscriptionGpsDate
  209 + */
  210 + DJI_FC_SUBSCRIPTION_TOPIC_GPS_DATE = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 13),
  211 +
  212 + /*!
  213 + * @brief GPS time topic name. Please refer to ::T_DjiFcSubscriptionGpsTime for information about data structure.
  214 + * @datastruct \ref T_DjiFcSubscriptionGpsTime
  215 + */
  216 + DJI_FC_SUBSCRIPTION_TOPIC_GPS_TIME = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 14),
  217 +
  218 + /*!
  219 + * @brief GPS position topic name. Please refer to ::T_DjiFcSubscriptionGpsPosition for information about data structure.
  220 + * @details
  221 + * | Axis | Accuracy |
  222 + |------|--------------------------------------------------|
  223 + | x, y | <3m with open sky without multipath |
  224 + | z | <5m with open sky without multipath |
  225 + * @datastruct \ref T_DjiFcSubscriptionGpsPosition
  226 + */
  227 + DJI_FC_SUBSCRIPTION_TOPIC_GPS_POSITION = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 15),
  228 +
  229 + /*!
  230 + * @brief GPS velocity topic name. Please refer to ::T_DjiFcSubscriptionGpsVelocity for information about data structure.
  231 + * @datastruct \ref T_DjiFcSubscriptionGpsVelocity
  232 + */
  233 + DJI_FC_SUBSCRIPTION_TOPIC_GPS_VELOCITY = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 16),
  234 +
  235 + /*!
  236 + * @brief GPS details topic name. GPS details topic provides GPS state and other detail information. Please refer
  237 + * to ::T_DjiFcSubscriptionGpsDetail for information about data structure.
  238 + * @datastruct \ref T_DjiFcSubscriptionGpsDetails
  239 + */
  240 + DJI_FC_SUBSCRIPTION_TOPIC_GPS_DETAILS = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 17),
  241 +
  242 + /*!
  243 + * @brief GPS signal level topic name. This topic provides a measure of the quality of GPS signal. Please refer to
  244 + * ::T_DjiFcSubscriptionGpsSignalLevel for information about data structure.
  245 + * @datastruct \ref T_DjiFcSubscriptionGpsSignalLevel
  246 + */
  247 + DJI_FC_SUBSCRIPTION_TOPIC_GPS_SIGNAL_LEVEL = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 18),
  248 +
  249 + /*!
  250 + * @brief RTK position topic name. Please refer to ::T_DjiFcSubscriptionRtkPosition for information about data structure.
  251 + * @details
  252 + * | Axis | Accuracy |
  253 + |------|--------------------------------------------------|
  254 + | x, y | ~2cm with fine alignment and fix condition |
  255 + | z | ~3cm with fine alignment and fix condition |
  256 + * @datastruct \ref T_DjiFcSubscriptionRtkPosition
  257 + */
  258 + DJI_FC_SUBSCRIPTION_TOPIC_RTK_POSITION = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 19),
  259 +
  260 + /*!
  261 + * @brief RTK velocity topic name. Please refer to ::T_DjiFcSubscriptionRtkVelocity for information about data structure.
  262 + * @datastruct \ref T_DjiFcSubscriptionRtkVelocity
  263 + */
  264 + DJI_FC_SUBSCRIPTION_TOPIC_RTK_VELOCITY = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 20),
  265 +
  266 + /*!
  267 + * @brief RTK yaw topic name. Please refer to ::T_DjiFcSubscriptionRtkYaw for information about data structure.
  268 + * @details The RTK yaw will provide the vector from ANT1 to ANT2 as configured in DJI Assistant 2. This
  269 + * means that the value of RTK yaw will be 90deg offset from the yaw of the aircraft.
  270 + * @datastruct \ref T_DjiFcSubscriptionRtkYaw
  271 + */
  272 + DJI_FC_SUBSCRIPTION_TOPIC_RTK_YAW = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 21),
  273 +
  274 + /*!
  275 + * @brief RTK position information topic name. RTK position information topic provides a state of RTK position
  276 + * solution. Please refer to ::T_DjiFcSubscriptionRtkPositionInfo for information about data structure.
  277 + * @datastruct \ref T_DjiFcSubscriptionRtkPositionInfo
  278 + */
  279 + DJI_FC_SUBSCRIPTION_TOPIC_RTK_POSITION_INFO = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 22),
  280 +
  281 + /*!
  282 + * @brief RTK yaw topic name. RTK yaw information topic provides a state of RTK yaw solution. Please refer to
  283 + * ::T_DjiFcSubscriptionRtkYawInfo for information about data structure.
  284 + * @datastruct \ref T_DjiFcSubscriptionRtkYawInfo
  285 + */
  286 + DJI_FC_SUBSCRIPTION_TOPIC_RTK_YAW_INFO = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 23),
  287 + /*!
  288 + * @brief Provides aircraft's magnetometer reading, fused with IMU and GPS @ up to 100Hz
  289 + * @details This reading is the magnetic field recorded by the magnetometer in x,y,z axis, calibrated such that
  290 + * 1000 < |m| < 2000, and fused with IMU and GPS for robustness
  291 + * @sensors Magnetometer, IMU, GPS
  292 + * @units N/A
  293 + * @datastruct \ref T_DjiFcSubscriptionCompass
  294 + */
  295 + DJI_FC_SUBSCRIPTION_TOPIC_COMPASS = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 24),
  296 + /*!
  297 + * @brief Provides remote controller stick inputs @ up to 100Hz
  298 + * @details This topic will give you:
  299 + * - Stick inputs (R,P,Y,Thr)
  300 + * - Mode switch (P/A/F)
  301 + * - Landing gear switch (Up/Down)
  302 + *
  303 + * @datastruct \ref T_DjiFcSubscriptionRC
  304 + * @also \ref TOPIC_RC_WITH_FLAG_DATA
  305 + */
  306 + DJI_FC_SUBSCRIPTION_TOPIC_RC = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 25),
  307 + /*!
  308 + * @brief Provides gimbal pitch, roll, yaw @ up to 50Hz
  309 + * @details
  310 + * The reference frame for gimbal angles is a NED frame attached to the gimbal.
  311 + * This topic uses a data structure, Vector3f, that is too generic for the topic. The order of angles is :
  312 + * |Data Structure Element| Meaning|
  313 + * |----------------------|--------|
  314 + * |Vector3f.x |pitch |
  315 + * |Vector3f.y |roll |
  316 + * |Vector3f.z |yaw |
  317 + *
  318 + * @perf
  319 + * 0.1 deg accuracy in all axes
  320 + *
  321 + * @sensors Gimbal Encoder, IMU, Magnetometer
  322 + * @units deg
  323 + * @datastruct \ref T_DjiFcSubscriptionGimbalAngles
  324 + * @also \ref TOPIC_GIMBAL_STATUS, \ref TOPIC_GIMBAL_CONTROL_MODE
  325 + */
  326 + DJI_FC_SUBSCRIPTION_TOPIC_GIMBAL_ANGLES = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 26),
  327 + /*!
  328 + * @brief Provides gimbal status and error codes @ up to 50Hz
  329 + * @details Please see the \ref GimbalStatus struct for the details on what data you can receive.
  330 + *
  331 + * @datastruct \ref T_DjiFcSubscriptionGimbalStatus
  332 + * @also \ref TOPIC_GIMBAL_ANGLES, \ref TOPIC_GIMBAL_CONTROL_MODE
  333 + */
  334 + DJI_FC_SUBSCRIPTION_TOPIC_GIMBAL_STATUS = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 27),
  335 + /*!
  336 + * @brief Flight status topic name. Please refer to ::T_DjiFcSubscriptionFlightStatus for information about data structure.
  337 + * @datastruct \ref T_DjiFcSubscriptionFlightStatus
  338 + */
  339 + DJI_FC_SUBSCRIPTION_TOPIC_STATUS_FLIGHT = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 28),
  340 + /*!
  341 + * @brief Provides a granular state representation for various tasks/flight modes @ up to 50Hz
  342 + * @details Typically, use this topic together with \ref TOPIC_STATUS_FLIGHT to get a
  343 + * better understanding of the overall status of the aircraft.
  344 + *
  345 + * @datastruct \ref T_DjiFcSubscriptionDisplaymode
  346 + * @also \ref TOPIC_STATUS_FLIGHT
  347 + */
  348 + DJI_FC_SUBSCRIPTION_TOPIC_STATUS_DISPLAYMODE = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 29),
  349 + /*!
  350 + * @brief Provides status for the landing gear state @ up to 50Hz
  351 + *
  352 + * @datastruct \ref T_DjiFcSubscriptionLandinggear
  353 + */
  354 + DJI_FC_SUBSCRIPTION_TOPIC_STATUS_LANDINGGEAR = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 30),
  355 + /*!
  356 + * @brief If motors failed to start, this topic provides reasons why. Available @ up to 50Hz
  357 + * @datastruct \ref T_DjiFcSubscriptionMotorStartError
  358 + * \note These enumerations show up in the ErrorCode class because they can also be returned as acknowledgements
  359 + * for APIs that start the motors, such as \ref Control::takeoff "Takeoff" or \ref Control::armMotors "Arm"
  360 + */
  361 + DJI_FC_SUBSCRIPTION_TOPIC_STATUS_MOTOR_START_ERROR = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC,
  362 + 31),
  363 + /*!
  364 + * @brief Battery information topic name. Please refer to ::T_DjiFcSubscriptionWholeBatteryInfo for information about data structure.
  365 + * @datastruct \ref T_DjiFcSubscriptionWholeBatteryInfo
  366 + */
  367 + DJI_FC_SUBSCRIPTION_TOPIC_BATTERY_INFO = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 32),
  368 + /*!
  369 + * @brief Provides states of the aircraft related to SDK/RC control
  370 + * @details The following information is available in this topic:
  371 + * |Data Structure Element| Meaning|
  372 + * |----------------------|--------|
  373 + * |controlMode |The modes in which the aircraft is being controlled (control loops being applied on horizontal, vertical and yaw axes of the aircraft)|
  374 + * |deviceStatus |Which device is controlling the motion of the aircraft: RC (Manual control), MSDK (Missions kicked off through mobile), OSDK (Missions kicked off through onboard/ low-level flight control) |
  375 + * |flightStatus |Has the OSDK been granted control authority? Since MSDK and RC have precedence, it is possible that deviceStatus shows RC or MSDK actually controlling the aircraft but this value is 1. |
  376 + * |vrcStatus |Deprecated|
  377 + * @datastruct \ref T_DjiFcSubscriptionControlDevice
  378 + */
  379 + DJI_FC_SUBSCRIPTION_TOPIC_CONTROL_DEVICE = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 33),
  380 + /*!
  381 + * @brief Provides IMU and quaternion data time-synced with a hardware clock signal @ up to 400Hz.
  382 + * @details This is the only data which can be synchronized with external software or hardware systems. If you want to
  383 + * fuse an external sensor's data with the aircraft's IMU, this data along with a hardware trigger from the A3/N3's
  384 + * expansion ports is how you would do it. You can see detailed documentation on how this process works in the [Hardware
  385 + * Sync Guide](https://developer.dji.com/onboard-sdk/documentation/guides/component-guide-hardware-sync.html).
  386 + * @sensors IMU, sensor fusion output
  387 + * @units
  388 + * |Data Structure Element| Units|
  389 + * |----------------------|--------|
  390 + * |Timestamp |2.5ms, 1ns (See \ref SyncTimestamp)|
  391 + * |Quaternion |rad (after converting to rotation matrix)|
  392 + * |Acceleration |g|
  393 + * |Gyroscope |rad/sec|
  394 + * @datastruct \ref T_DjiFcSubscriptionHardSync
  395 + */
  396 + DJI_FC_SUBSCRIPTION_TOPIC_HARD_SYNC = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 34),
  397 + /*!
  398 + * @brief Provides a measure of the quality of GPS signal, with a mechanism for guarding against unset homepoint @ up to 50Hz
  399 + * @details The level varies from 0 to 5, with 0 being the worst and 5 the best GPS signal. The key difference between
  400 + * this and TOPIC_GPS_SIGNAL_LEVEL is that this topic always returns 0 if the homepoint is not set. Once the home point is
  401 + * set, the behavior is exactly the same as TOPIC_GPS_SIGNAL_LEVEL.
  402 + * @sensors GPS
  403 + * @datastruct \ref T_DjiFcSubscriptionGpsControlLevel
  404 + * @also \ref TOPIC_GPS_SIGNAL_LEVEL
  405 + */
  406 + DJI_FC_SUBSCRIPTION_TOPIC_GPS_CONTROL_LEVEL = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 35),
  407 + /*!
  408 + * @brief Provides normalized remote controller stick input data, along with connection status @ up to 50Hz
  409 + * @note This topic was added in August 2018. Your aircraft may require a FW update to enable this feature.
  410 + * @details This topic will give you:
  411 + * - Stick inputs (R,P,Y,Thr)
  412 + * - Mode switch (P/A/F)
  413 + * - Landing gear switch (Up/Down)
  414 + * - Connection status for air system, ground system and MSDK apps. The connection status also includes a
  415 + * logicConnected element, which will change to false if either the air system or the ground system radios
  416 + * are disconnected for >3s.
  417 + * - Deadzones near the center of the stick positions are also handled in this topic.
  418 + *
  419 + * @datastruct \ref T_DjiFcSubscriptionRCWithFlagData
  420 + * @also \ref TOPIC_RC
  421 + */
  422 + DJI_FC_SUBSCRIPTION_TOPIC_RC_WITH_FLAG_DATA = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 36),
  423 + /*!
  424 + * @brief Provides raw data from the ESCs @ up to 50Hz
  425 + * @note This topic was added in August 2018. Your aircraft may require a FW update to enable this feature.
  426 + * @details This topic supports reporting data for up to 8 ESCs; note that only DJI Intelligent ESCs are supported
  427 + * for this reporting feature. Use this topic to get data on elements close to the hardware - e.g. motor speeds,
  428 + * ESC current and voltage, error flags at the ESC level etc.
  429 + * @datastruct \ref T_DjiFcSubscriptionEscData
  430 + */
  431 + DJI_FC_SUBSCRIPTION_TOPIC_ESC_DATA = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 37),
  432 + /*!
  433 + * @brief Provides RTK connection status @ up to 50Hz
  434 + * @note This topic was added in August 2018. Your aircraft may require a FW update to enable this feature.
  435 + * @details This topic will update in real time whether the RTK GPS system is connected or not; typical uses
  436 + * include app-level logic to switch between GPS and RTK sources of positioning based on this flag.
  437 + * @datastruct \ref T_DjiFcSubscriptionRTKConnectStatus
  438 + */
  439 + DJI_FC_SUBSCRIPTION_TOPIC_RTK_CONNECT_STATUS = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 38),
  440 + /*!
  441 + * @brief Provides the mode in which the gimbal will interpret control commands @ up to 50Hz
  442 + * @note This topic was added in August 2018. Your aircraft may require a FW update to enable this feature.
  443 + * @details This topic will report the current control mode which can be set in the
  444 + * DJI Go app, MSDK apps, or through Onboard SDK gimbal control APIs (see \ref Gimbal::AngleData "AngleData" struct
  445 + * for more information)
  446 + * @datastruct \ref T_DjiFcSubscriptionGimbalControlMode
  447 + */
  448 + DJI_FC_SUBSCRIPTION_TOPIC_GIMBAL_CONTROL_MODE = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 39),
  449 + /*!
  450 + * @brief Provides a number of flags which report different errors the aircraft may encounter in flight @ up to 50Hz
  451 + * @note This topic was added in August 2018. Your aircraft may require a FW update to enable this feature.
  452 + * @warning Most of the errors reported by this topic are cases where immediate action is required; you can use these
  453 + * as a baseline for implementing safety-related error-handling routines.
  454 + * @datastruct \ref T_DjiFcSubscriptionFlightAnomaly
  455 + */
  456 + DJI_FC_SUBSCRIPTION_TOPIC_FLIGHT_ANOMALY = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 40),
  457 + /*!
  458 + * @brief Provides aircraft's position in a Cartesian frame @ up to 50Hz, without the need for GPS
  459 + * @warning This topic does not follow a standard co-ordinate convention. Please read the details below for usage.
  460 + * @details This is the only topic which can provide positioning information without having a GPS fix; though this
  461 + * can be a big enabler please note the caveats of using this topic:
  462 + * - The topic will use an origin that does not have a global reference, and is not published to the SDK.
  463 + * - The topic uses a combination of VO and compass heading to identify the X-Y axes of its reference frame. This means
  464 + * that if your compass performance is not good in an environment, there is no guarantee the X-Y axes will point to
  465 + * North and East.
  466 + * - The actual directions of the X-Y axes are currently not published to the SDK.
  467 + * - If during a flight the compass performance were to change dramatically, the orientation of the X-Y axes may change
  468 + * to re-align with North-East. The aircraft's position in X and Y may exhibit discontinuities in these cases.
  469 + * - The reference frame is referred to as the Navigation Frame - Cartesian X,Y axes aligned with N,E directions on a best-effort
  470 + * basis, and Z aligned to D (down) direction.
  471 + * - A health flag for each axis provides some granularity on whether this data is valid or not.
  472 + *
  473 + * The key takeaway from these details is that this topic provides a best-effort attempt at providing position
  474 + * information in the absence of absolute references (GPS, compass etc.), without guarantees of consistency if
  475 + * environmental conditions change. So if your application is confined to a stable environment, or if you will
  476 + * have GPS and compass available at all times, this topic can still provide useful data that cannot be otherwise
  477 + * had. If using for control, make sure to have guards checking for the continuity of data.
  478 + *
  479 + * @note Since this topic relies on visual features and/or GPS, if your environment does not provide any of these
  480 + * sources of data, the quality of this topic will reduce significantly. VO data quality will reduce if you are too high
  481 + * above the ground. Make sure that the Vision Positioning System is enabled in DJI Go 4 before using this topic
  482 + * (by default it is enabled).
  483 + * @sensors IMU, VO, GPS(if available), RTK (if available), ultrasonic, magnetometer, barometer
  484 + * @units m
  485 + * @datastruct \ref T_DjiFcSubscriptionPositionVO
  486 + */
  487 + DJI_FC_SUBSCRIPTION_TOPIC_POSITION_VO = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 41),
  488 + /*!
  489 + * @brief Provides obstacle info around the vehicle @ up to 100Hz
  490 + * @datastruct \ref T_DjiFcSubscriptionAvoidData
  491 + */
  492 + DJI_FC_SUBSCRIPTION_TOPIC_AVOID_DATA = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 42),
  493 + /*!
  494 + * @brief Provides status of whether the home point was set or not
  495 + * @datastruct \ref T_DjiFcSubscriptionHomePointSetStatus
  496 + */
  497 + DJI_FC_SUBSCRIPTION_TOPIC_HOME_POINT_SET_STATUS = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 43),
  498 + /*!
  499 + * @brief Provides homepoint information, the valid of the home point infomation can ref to the
  500 + * topic DJI_FC_SUBSCRIPTION_TOPIC_HOME_POINT_SET_STATUS
  501 + * @datastruct \ref T_DjiFcSubscriptionHomePointInfo
  502 + */
  503 + DJI_FC_SUBSCRIPTION_TOPIC_HOME_POINT_INFO = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 44),
  504 + /*!
  505 + * @brief Provides three gimbal information, used for M300
  506 + * @datastruct \ref T_DjiFcSubscriptionThreeGimbalData
  507 + */
  508 + DJI_FC_SUBSCRIPTION_TOPIC_THREE_GIMBAL_DATA = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 45),
  509 +
  510 + /*!
  511 + * @brief Battery information topic name. Please refer to ::T_DjiFcSubscriptionSingleBatteryInfo for information about data structure.
  512 + * @datastruct \ref T_DjiFcSubscriptionSingleBatteryInfo
  513 + */
  514 + DJI_FC_SUBSCRIPTION_TOPIC_BATTERY_SINGLE_INFO_INDEX1 = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC,
  515 + 46),
  516 + /*!
  517 + * @brief Battery information topic name. Please refer to ::T_DjiFcSubscriptionSingleBatteryInfo for information about data structure.
  518 + * @datastruct \ref T_DjiFcSubscriptionSingleBatteryInfo
  519 + */
  520 + DJI_FC_SUBSCRIPTION_TOPIC_BATTERY_SINGLE_INFO_INDEX2 = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC,
  521 + 47),
  522 +
  523 + /*!
  524 + * @brief Please refer to ::T_DjiFcSubscriptionImuAttiNaviDataWithTimestamp for information about data structure.
  525 + * @datastruct \ref T_DjiFcSubscriptionImuAttiNaviDataWithTimestamp
  526 + */
  527 + DJI_FC_SUBSCRIPTION_TOPIC_IMU_ATTI_NAVI_DATA_WITH_TIMESTAMP = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 48),
  528 +
  529 + /*! Total number of topics that can be subscribed. */
  530 + DJI_FC_SUBSCRIPTION_TOPIC_TOTAL_NUMBER,
  531 +} E_DjiFcSubscriptionTopic;
  532 +
  533 +/**
  534 + * @brief Health state of data subscribed.
  535 + */
  536 +typedef enum {
  537 + DJI_FC_SUBSCRIPTION_DATA_NOT_HEALTH = 0, /*!< Data subscribed is healthy and can be used. */
  538 + DJI_FC_SUBSCRIPTION_DATA_HEALTH = 1, /*!< Data subscribed is not healthy and recommend not to use it. */
  539 +} E_DjiFcSubscriptionDataHealthFlag;
  540 +
  541 +/**
  542 + * @brief Position solution property.
  543 + */
  544 +typedef enum {
  545 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_NOT_AVAILABLE = 0, /*!< Position solution is not available. */
  546 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_FIX_POSITION = 1, /*!< Position has been fixed by the FIX POSITION command. */
  547 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_FIX_HEIGHT_AUTO = 2, /*!< Position has been fixed by the FIX HEIGHT/AUTO command. */
  548 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_INSTANTANEOUS_DOPPLER_COMPUTE_VELOCITY = 8, /*!< Velocity computed using instantaneous Doppler. */
  549 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_SINGLE_PNT_SOLUTION = 16, /*!< Single point position solution. */
  550 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_PSEUDORANGE_DIFFERENTIAL_SOLUTION = 17, /*!< Pseudorange differential solution. */
  551 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_SBAS_CORRECTION_CALCULATED = 18, /*!< Solution calculated using corrections from an SBAS. */
  552 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_KALMAN_FILTER_WITHOUT_OBSERVATION_PROPAGATED = 19, /*!< Propagated by a Kalman filter without new observations. */
  553 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_OMNISTAR_VBS_POSITION = 20, /*!< OmniSTAR VBS position (L1 sub-metre). */
  554 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_FLOAT_L1_AMBIGUITY = 32, /*!< Floating L1 ambiguity solution. */
  555 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_FLOAT_IONOSPHERIC_FREE_AMBIGUITY = 33, /*!< Floating ionospheric-free ambiguity solution. */
  556 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_FLOAT_SOLUTION = 34, /*!< Float position solution. */
  557 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_L1_AMBIGUITY_INT = 48, /*!< Integer L1 ambiguity solution. */
  558 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_WIDE_LANE_AMBIGUITY_INT = 49, /*!< Integer wide-lane ambiguity solution. */
  559 + DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_NARROW_INT = 50, /*!< Narrow fixed point position solution. */
  560 +} E_DjiFcSubscriptionPositionSolutionProperty;
  561 +
  562 +/**
  563 + * @brief GPS fix state.
  564 + */
  565 +typedef enum {
  566 + DJI_FC_SUBSCRIPTION_GPS_FIX_STATE_NO_FIX = 0, /*!< GPS position has not been fixed. */
  567 + DJI_FC_SUBSCRIPTION_GPS_FIX_STATE_DEAD_RECKONING_ONLY = 1, /*!< GPS position is dead reckoned only. */
  568 + DJI_FC_SUBSCRIPTION_GPS_FIX_STATE_2D_FIX = 2, /*!< The horizontal position with latitude/longitude (or northing/easting or X/Y) is fixed. */
  569 + DJI_FC_SUBSCRIPTION_GPS_FIX_STATE_3D_FIX = 3, /*!< The horizontal and vertical position with latitude/longitude/altitude (northing/easting/altitude or X/Y/Z) is fixed. */
  570 + DJI_FC_SUBSCRIPTION_GPS_FIX_STATE_GPS_PLUS_DEAD_RECKONING = 4, /*!< Position is calculated by GPS and combined with dead reckoning. */
  571 + DJI_FC_SUBSCRIPTION_GPS_FIX_STATE_TIME_ONLY_FIX = 5, /*!< Only time is fixed. */
  572 +} E_DjiFcSubscriptionGpsFixState;
  573 +
  574 +/**
  575 + * @brief Flight status of aircraft.
  576 + */
  577 +typedef enum {
  578 + DJI_FC_SUBSCRIPTION_FLIGHT_STATUS_STOPED = 0, /*!< Aircraft is on ground and motors are still. */
  579 + DJI_FC_SUBSCRIPTION_FLIGHT_STATUS_ON_GROUND = 1, /*!< Aircraft is on ground but motors are rotating. */
  580 + DJI_FC_SUBSCRIPTION_FLIGHT_STATUS_IN_AIR = 2, /*!< Aircraft is in air. */
  581 +} E_DjiFcSubscriptionFlightStatus;
  582 +
  583 +/*!
  584 + * @brief "Mode" of the vehicle's state machine, as displayed on DJI Go
  585 + * @details Available through Telemetry::TOPIC_STATUS_DISPLAYMODE
  586 + */
  587 +typedef enum {
  588 + /*! This mode requires the user to manually
  589 + * control the aircraft to remain stable in air. */
  590 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_MANUAL_CTRL = 0,
  591 + /*! In this mode, the aircraft can keep
  592 + * attitude stabilization and only use the
  593 + * barometer for positioning to control the altitude. <br>
  594 + * The aircraft can not autonomously locate and hover stably.*/
  595 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_ATTITUDE = 1,
  596 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_2 = 2,
  597 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_3 = 3,
  598 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_4 = 4,
  599 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_5 = 5,
  600 + /*! The aircraft is in normal GPS mode. <br>
  601 + * In normal GPS mode, the aircraft can
  602 + * autonomously locate and hover stably. <br>
  603 + * The sensitivity of the aircraft to the
  604 + * command response is moderate.
  605 + */
  606 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_P_GPS = 6,
  607 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_7 = 7,
  608 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_8 = 8,
  609 + /*! In hotpoint mode */
  610 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_HOTPOINT_MODE = 9,
  611 + /*! In this mode, user can push the throttle
  612 + * stick to complete stable take-off. */
  613 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_ASSISTED_TAKEOFF = 10,
  614 + /*! In this mode, the aircraft will autonomously
  615 + * start motor, ascend and finally hover. */
  616 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_AUTO_TAKEOFF = 11,
  617 + /*! In this mode, the aircraft can land autonomously. */
  618 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_AUTO_LANDING = 12,
  619 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_13 = 13,
  620 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_14 = 14,
  621 + /*! In this mode, the aircraft can antonomously return the
  622 + * last recorded Home Point. <br>
  623 + * There are three types of this mode: Smart RTH(Return-to-Home),
  624 + * Low Batterry RTH, and Failsafe RTTH. */
  625 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_NAVI_GO_HOME = 15,
  626 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_16 = 16,
  627 + /*! In this mode, the aircraft is controled by SDK API. <br>
  628 + * User can directly define the control mode of horizon
  629 + * and vertical directions and send control datas to aircraft. */
  630 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_NAVI_SDK_CTRL = 17,
  631 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_18 = 18,
  632 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_19 = 19,
  633 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_20 = 20,
  634 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_21 = 21,
  635 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_22 = 22,
  636 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_23 = 23,
  637 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_24 = 24,
  638 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_25 = 25,
  639 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_26 = 26,
  640 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_27 = 27,
  641 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_28 = 28,
  642 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_29 = 29,
  643 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_30 = 30,
  644 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_31 = 31,
  645 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_32 = 32,
  646 + /*! drone is forced to land, might due to low battery */
  647 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_FORCE_AUTO_LANDING = 33,
  648 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_34 = 34,
  649 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_35 = 35,
  650 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_36 = 36,
  651 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_37 = 37,
  652 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_38 = 38,
  653 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_39 = 39,
  654 + /*! drone will search for the last position where the rc is not lost */
  655 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_SEARCH_MODE = 40,
  656 + /*! Mode for motor starting. <br>
  657 + * Every time user unlock the motor, this will be the first mode. */
  658 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_ENGINE_START = 41,
  659 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_42 = 42,
  660 + DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_43 = 42,
  661 +} E_DjiFcSubscriptionDisplayMode;
  662 +
  663 +/**
  664 + * @brief Setting status of homepoint.
  665 + */
  666 +typedef enum {
  667 + DJI_FC_SUBSCRIPTION_HOME_POINT_SET_STATUS_FAILED = 0, /*!< The home point was not set yet. */
  668 + DJI_FC_SUBSCRIPTION_HOME_POINT_SET_STATUS_SUCCESS = 1, /*!< The home point was set successfully. */
  669 +} E_DjiFcSubscriptionHomePointSetStatus;
  670 +
  671 +/**
  672 + * @brief Smart battery self-check result.
  673 + */
  674 +typedef enum {
  675 + DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_NORMAL = 0, /*!< Battery self-check is normal. */
  676 + DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_NTC_ABNORMAL = 1, /*!< Battery self-check NTC is abnormal. */
  677 + DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_MOS_ABNORMAL = 2, /*!< Battery self-check MOS is abnormal. */
  678 + DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_R_ABNORMAL = 3, /*!< Battery self-check sampling resistance is abnormal. */
  679 + DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_CELL_DAMAGE = 4, /*!< Battery cell self-check is damaged. */
  680 + DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_CAL_EXP = 5, /*!< Battery self-check is not calibrated. */
  681 + DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_GAUGE_PARM_EXP = 6, /*!< Battery self-check fuel gauge parameters is abnormal. */
  682 +} E_DJIFcSubscriptionBatterySelfCheck;
  683 +
  684 +/**
  685 + * @brief Smart battery closed reason.
  686 + */
  687 +typedef enum {
  688 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_NORMAL = 0, /*!< Battery closed reason is normal shutdown. */
  689 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_FORCED = 1, /*!< Battery closed reason is forced by flight controller shutdown. */
  690 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_SCD = 2, /*!< Battery closed reason is discharge short circuit shutdown. */
  691 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_OLD = 3, /*!< Battery closed reason is discharge overload shutdown. */
  692 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_OCD = 4, /*!< Battery closed reason is discharge over current shutdown. */
  693 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_UVD = 5, /*!< Battery closed reason is discharge under voltage shutdown. */
  694 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_OTD = 6, /*!< Battery closed reason is discharge over temperature shutdown. */
  695 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_SCC = 16, /*!< Battery closed reason is charging short circuit shutdown. */
  696 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_OCC = 17, /*!< Battery closed reason is charging over current shutdown. */
  697 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_OVC = 18, /*!< Battery closed reason is charging over voltage shutdown. */
  698 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_CHARGER_OVC = 19, /*!< Battery closed reason is charger over voltage shutdown. */
  699 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_LTC = 20, /*!< Battery closed reason is charging low temperature shutdown. */
  700 + DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_HTC = 21, /*!< Battery closed reason is charging high temperature shutdown. */
  701 +} E_DJIFcSubscriptionBatteryClosedReason;
  702 +
  703 +/**
  704 + * @brief Smart battery SOH state.
  705 + */
  706 +typedef enum {
  707 + DJI_FC_SUBSCRIPTION_BATTERY_SOH_NORMAL = 0, /*!< Battery SOH state is normal. */
  708 + DJI_FC_SUBSCRIPTION_BATTERY_SOH_ALERT = 1, /*!< Battery SOH state is alert. */
  709 + DJI_FC_SUBSCRIPTION_BATTERY_SOH_SAFE = 2, /*!< Battery SOH state is safe. */
  710 +} E_DJIFcSubscriptionBatterySohState;
  711 +
  712 +/**
  713 + * @brief Smart battery heart state.
  714 + */
  715 +typedef enum {
  716 + DJI_FC_SUBSCRIPTION_BATTERY_NO_HEAT = 0, /*!< Battery is in no heat state. */
  717 + DJI_FC_SUBSCRIPTION_BATTERY_IN_HEAT = 1, /*!< Battery is in heat state. */
  718 + DJI_FC_SUBSCRIPTION_BATTERY_KEEP_WARM = 2, /*!< Battery is in keep warm state. */
  719 +} E_DJIFcSubscriptionBatteryHeatState;
  720 +
  721 +/**
  722 + * @brief Smart battery SOC state.
  723 + */
  724 +typedef enum {
  725 + DJI_FC_SUBSCRIPTION_BATTERY_SOC_NORMAL = 0, /*!< Battery SOC state is normal. */
  726 + DJI_FC_SUBSCRIPTION_BATTERY_SOC_ABNORMAL_HIGH = 1, /*!< Battery SOC state is abnormal high. */
  727 + DJI_FC_SUBSCRIPTION_BATTERY_SOC_JUMP_DOWN = 2, /*!< Battery SOC state is jump down. */
  728 + DJI_FC_SUBSCRIPTION_BATTERY_SOC_JUMP_UP = 3, /*!< Battery SOC state is jump up. */
  729 + DJI_FC_SUBSCRIPTION_BATTERY_SOC_INVALID = 4, /*!< Battery SOC state is invalid. */
  730 +} E_DJIFcSubscriptionBatterySocState;
  731 +
  732 +/**
  733 + * @brief Flight control mode.
  734 + */
  735 +typedef enum {
  736 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_UNKNOWN = 0,
  737 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_VEL_YAW_ANG = 1, /*!< Horizontal mode is angle, vertical mode is velocity, yaw mode is angle. */
  738 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_VEL_YAW_RAT = 2, /*!< Horizontal mode is angle, vertical mode is velocity, yaw mode is rate. */
  739 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_VEL_YAW_ANG = 3, /*!< Horizontal mode is velocity, vertical mode is velocity, yaw mode is angle. */
  740 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_VEL_YAW_RAT = 4, /*!< Horizontal mode is velocity, vertical mode is velocity, yaw mode is rate. */
  741 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_VEL_YAW_ANG = 5, /*!< Horizontal mode is position, vertical mode is velocity, yaw mode is angle. */
  742 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_VEL_YAW_RAT = 6, /*!< Horizontal mode is position, vertical mode is velocity, yaw mode is rate. */
  743 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_POS_YAW_ANG = 7, /*!< Horizontal mode is angle, vertical mode is position, yaw mode is angle. */
  744 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_POS_YAW_RAT = 8, /*!< Horizontal mode is angle, vertical mode is position, yaw mode is rate. */
  745 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_POS_YAW_ANG = 9, /*!< Horizontal mode is velocity, vertical mode is position, yaw mode is angle. */
  746 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_POS_YAW_RAT = 10, /*!< Horizontal mode is velocity, vertical mode is position, yaw mode is rate. */
  747 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_POS_YAW_ANG = 11, /*!< Horizontal mode is position, vertical mode is position, yaw mode is angle. */
  748 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_POS_YAW_RAT = 12, /*!< Horizontal mode is position, vertical mode is position, yaw mode is rate. */
  749 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_THR_YAW_ANG = 13, /*!< Horizontal mode is angle, vertical mode is thrust, yaw mode is angle. */
  750 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_THR_YAW_RAT = 14, /*!< Horizontal mode is angle, vertical mode is thrust, yaw mode is rate. */
  751 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_THR_YAW_ANG = 15, /*!< Horizontal mode is velocity, vertical mode is thrust, yaw mode is angle. */
  752 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_THR_YAW_RAT = 16, /*!< Horizontal mode is velocity, vertical mode is thrust, yaw mode is rate. */
  753 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_THR_YAW_ANG = 17, /*!< Horizontal mode is position, vertical mode is thrust, yaw mode is angle. */
  754 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_THR_YAW_RAT = 18, /*!< Horizontal mode is position, vertical mode is thrust, yaw mode is rate. */
  755 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_AEL_VER_VEL_YAW_RAT = 19, /*!< Horizontal mode is angle-rate, vertical mode is velocity, yaw mode is rate. */
  756 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_AEL_VER_POS_YAW_RAT = 20, /*!< Horizontal mode is angle-rate, vertical mode is thrust, yaw mode is rate. */
  757 + DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_AEL_VER_THR_YAW_RAT = 21, /*!< Horizontal mode is angle-rate, vertical mode is velocity, yaw mode is rate. */
  758 +} E_DJIFcSubscriptionControlMode;
  759 +
  760 +/**
  761 + * @brief Flight control authority.
  762 + */
  763 +typedef enum {
  764 + DJI_FC_SUBSCRIPTION_CONTROL_AUTHORITY_RC = 0, /*!< Authority is in remote control */
  765 + DJI_FC_SUBSCRIPTION_CONTROL_AUTHORITY_MSDK = 1, /*!< Authority is in MSDK */
  766 + DJI_FC_SUBSCRIPTION_CONTROL_AUTHORITY_PSDK = 4, /*!< Authority is in PSDK */
  767 + DJI_FC_SUBSCRIPTION_CONTROL_AUTHORITY_DOCK = 5, /*!< Authority is in dock */
  768 +} E_DJIFcSubscriptionControlAuthority;
  769 +
  770 +/**
  771 + * @brief Flight control authority change reason.
  772 + */
  773 +typedef enum {
  774 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_UNKNOWN = 0, /*!< Reason unknown */
  775 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_MSDK_REQUEST = 1, /*!< Contro authority changed by MSDK request. */
  776 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_USER_REQUEST = 2, /*!< Contro authority changed by user request. */
  777 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_PSDK_REQUEST = 3, /*!< Contro authority changed by PSDK request. */
  778 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_RC_LOST = 4, /*!< Contro authority changed for remote control lost. */
  779 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_RC_NOT_P_MODE = 5, /*!< Contro authority changed for remote control not in P mode. */
  780 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_RC_SWITCH = 6, /*!< Contro authority changed for remote control switching mode. */
  781 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_RC_PAUSE_STOP = 7, /*!< Contro authority changed for remote control stop key paused. */
  782 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_RC_ONE_KEY_GO_HOME = 8, /*!< Contro authority changed for remote control go-home key paused. */
  783 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_BATTERY_LOW_GO_HOME = 9, /*!< Contro authority changed for remote control go-home key paused. */
  784 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_BATTERY_SUPER_LOW_LANDING = 10, /*!< Contro authority changed for going home caused by low batter power. */
  785 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_PSDK_LOST = 11, /*!< Contro authority changed for PSDK lost. */
  786 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_NEAR_BOUNDARY = 13, /*!< Contro authority changed for nearing boundary. */
  787 + DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_AIRPORT_REQUEST = 14, /*!< Contro authority changed by airport request. */
  788 +} E_DJIFcSubscriptionAuthorityChangeReason;
  789 +
  790 +#pragma pack(1)
  791 +
  792 +/**
  793 + * @brief Quaternion topic data structure.
  794 + */
  795 +typedef struct Quaternion {
  796 + dji_f32_t q0; /*!< w, rad (when converted to a rotation matrix or Euler angles). */
  797 + dji_f32_t q1; /*!< x, rad (when converted to a rotation matrix or Euler angles). */
  798 + dji_f32_t q2; /*!< y, rad (when converted to a rotation matrix or Euler angles). */
  799 + dji_f32_t q3; /*!< z, rad (when converted to a rotation matrix or Euler angles). */
  800 +} T_DjiFcSubscriptionQuaternion;
  801 +
  802 +/**
  803 + * @brief DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_GROUND topic data structure.
  804 + */
  805 +typedef T_DjiVector3f T_DjiFcSubscriptionAccelerationGround;
  806 +
  807 +/**
  808 + * @brief DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_BODY topic data structure.
  809 + */
  810 +typedef T_DjiVector3f T_DjiFcSubscriptionAccelerationBody;
  811 +
  812 +/**
  813 + * @brief DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_RAW topic data structure.
  814 + */
  815 +typedef T_DjiVector3f T_DjiFcSubscriptionAccelerationRaw;
  816 +
  817 +/**
  818 + * @brief DJI_FC_SUBSCRIPTION_TOPIC_VELOCITY topic data structure.
  819 + */
  820 +typedef struct Velocity {
  821 + /*! Velocity of aircraft. */
  822 + T_DjiVector3f data;
  823 + /*! Health state of aircraft velocity data. It can be any value of ::E_DjiFcSubscriptionDataHealthFlag. */
  824 + uint8_t health: 1;
  825 + /*! Reserved. */
  826 + uint8_t reserve: 7;
  827 +} T_DjiFcSubscriptionVelocity;
  828 +
  829 +/**
  830 + * @brief DJI_FC_SUBSCRIPTION_TOPIC_ANGULAR_RATE_FUSIONED topic data structure.
  831 + */
  832 +typedef T_DjiVector3f T_DjiFcSubscriptionAngularRateFusioned;
  833 +
  834 +/**
  835 + * @brief DJI_FC_SUBSCRIPTION_TOPIC_ANGULAR_RATE_RAW topic data structure.
  836 + */
  837 +typedef T_DjiVector3f T_DjiFcSubscriptionAngularRateRaw;
  838 +
  839 +/**
  840 + * @brief DJI_FC_SUBSCRIPTION_TOPIC_ANGULAR_RATE_RAW topic data structure.
  841 + */
  842 +typedef dji_f32_t T_DjiFcSubscriptionAltitudeFused;
  843 +
  844 +/**
  845 + * @brief DJI_FC_SUBSCRIPTION_TOPIC_ALTITUDE_BAROMETER topic data structure.
  846 + */
  847 +typedef dji_f32_t T_DjiFcSubscriptionAltitudeBarometer;
  848 +
  849 +/**
  850 + * @brief DJI_FC_SUBSCRIPTION_TOPIC_ALTITUDE_OF_HOMEPOINT topic data structure.
  851 + */
  852 +typedef dji_f32_t T_DjiFcSubscriptionAltitudeOfHomePoint;
  853 +
  854 +/**
  855 + * @brief DJI_FC_SUBSCRIPTION_TOPIC_HEIGHT_FUSION topic data structure.
  856 + */
  857 +typedef dji_f32_t T_DjiFcSubscriptionHeightFusion;
  858 +
  859 +/**
  860 + * @brief Relative height above ground topic data structure, unit: m.
  861 + */
  862 +typedef dji_f32_t T_DjiFcSubscriptionHeightRelative;
  863 +
  864 +/**
  865 + * @brief Fused position topic data structure.
  866 + */
  867 +typedef struct PositionFused {
  868 + dji_f64_t longitude; /*!< Longitude, unit: rad. */
  869 + dji_f64_t latitude; /*!< Latitude, unit: rad. */
  870 + dji_f32_t altitude; /*!< Altitude, WGS 84 reference ellipsoid, unit: m. */
  871 + uint16_t visibleSatelliteNumber; /*!< Number of visible satellites. */
  872 +} T_DjiFcSubscriptionPositionFused;
  873 +
  874 +/**
  875 + * @brief GPS date topic data structure, format: yyyymmdd.
  876 + */
  877 +typedef uint32_t T_DjiFcSubscriptionGpsDate;
  878 +
  879 +/**
  880 + * @brief GPS time topic data structure, format: hhmmss.
  881 + */
  882 +typedef uint32_t T_DjiFcSubscriptionGpsTime;
  883 +
  884 +/**
  885 + * @brief GPS position topic data structure. x = Longitude, y = Latitude, z = Altitude, unit: deg*10<SUP>-7</SUP>
  886 + * (Lat,Lon), mm (Alt)
  887 + */
  888 +typedef T_DjiVector3d T_DjiFcSubscriptionGpsPosition;
  889 +
  890 +/**
  891 + * @brief GPS velocity topic data structure, unit: cm/s.
  892 + */
  893 +typedef T_DjiVector3f T_DjiFcSubscriptionGpsVelocity;
  894 +
  895 +/**
  896 + * @brief GPS details topic data structure.
  897 + */
  898 +typedef struct GpsDetail {
  899 + dji_f32_t hdop; /*!< Horizontal dilution of precision, unit: 0.01, eg: 100 = 1.00, <1: ideal, 1-2: excellent, 2-5: good, 5-10: moderate, 10-20: fair, >20: poor. */
  900 + dji_f32_t pdop; /*!< Position dilution of precision, unit: 0.01, eg: 100 = 1.00, <1: ideal, 1-2: excellent, 2-5: good, 5-10: moderate, 10-20: fair, >20: poor. */
  901 + dji_f32_t fixState; /*!< GPS fix state, and can be any value of ::E_DjiFcSubscriptionGpsFixState. Value other than ::E_DjiFcSubscriptionGpsFixState is invalid. */
  902 + dji_f32_t vacc; /*!< Vertical position accuracy (mm), the smaller, the better. */
  903 + dji_f32_t hacc; /*!< Horizontal position accuracy (mm), the smaller, the better. */
  904 + dji_f32_t sacc; /*!< Speed accuracy (cm/s), the smaller, the better. */
  905 + uint32_t gpsSatelliteNumberUsed; /*!< Number of GPS satellites used for fixing position. */
  906 + uint32_t glonassSatelliteNumberUsed; /*!< Number of GLONASS satellites used for fixing position. */
  907 + uint16_t totalSatelliteNumberUsed; /*!< Total number of satellites used for fixing position. */
  908 + uint16_t gpsCounter; /*!< Accumulated times of sending GPS data. */
  909 +} T_DjiFcSubscriptionGpsDetails;
  910 +
  911 +/**
  912 + * @brief GPS signal level topic data structure. Signal level of GPS. The level varies from 0 to 5, with 0 being the
  913 + * worst and 5 the best GPS signal.
  914 + */
  915 +typedef uint8_t T_DjiFcSubscriptionGpsSignalLevel;
  916 +
  917 +/**
  918 + * @brief RTK position topic data structure.
  919 + */
  920 +typedef struct PositionData {
  921 + dji_f64_t longitude; /*!< Longitude, unit: deg. */
  922 + dji_f64_t latitude; /*!< Latitude, unit: deg. */
  923 + dji_f32_t hfsl; /*!< Height above mean sea level, unit: m. */
  924 +} T_DjiFcSubscriptionRtkPosition;
  925 +
  926 +/**
  927 + * @brief RTK velocity topic data structure, unit: cm/s.
  928 + */
  929 +typedef T_DjiVector3f T_DjiFcSubscriptionRtkVelocity;
  930 +
  931 +/**
  932 + * @brief RTK yaw topic data structure, unit: deg.
  933 + */
  934 +typedef int16_t T_DjiFcSubscriptionRtkYaw;
  935 +
  936 +/**
  937 + * @brief RTK position information topic data structure. Specifies RTK position solution state, it can be any value of
  938 + * ::E_DjiFcSubscriptionPositionSolutionProperty.
  939 + */
  940 +typedef uint8_t T_DjiFcSubscriptionRtkPositionInfo;
  941 +
  942 +/**
  943 + * @brief RTK yaw information topic data structure. Specifies RTK yaw solution state, it can be any value of
  944 + * ::E_DjiFcSubscriptionPositionSolutionProperty.
  945 + */
  946 +typedef uint8_t T_DjiFcSubscriptionRtkYawInfo;
  947 +
  948 +/*!
  949 + * @brief struct for data broadcast, return magnetometer reading
  950 + *
  951 + * @note returned value is calibrated mag data,
  952 + * 1000 < |mag| < 2000 for normal operation
  953 + */
  954 +typedef struct Mag {
  955 + int16_t x;
  956 + int16_t y;
  957 + int16_t z;
  958 +} T_DjiFcSubscriptionCompass;
  959 +
  960 +/*!
  961 + * @brief struct for data broadcast and data subscription, return RC reading
  962 + */
  963 +typedef struct RC {
  964 + int16_t roll; /*!< [-10000,10000] */
  965 + int16_t pitch; /*!< [-10000,10000] */
  966 + int16_t yaw; /*!< [-10000,10000] */
  967 + int16_t throttle; /*!< [-10000,10000] */
  968 + int16_t mode; /*!< [-10000,10000] */
  969 + /*!< M100 [P: -8000, A: 0, F: 8000] */
  970 + int16_t gear; /*!< [-10000,10000] */
  971 + /*!< M100 [Up: -10000, Down: -4545] */
  972 +} T_DjiFcSubscriptionRC;
  973 +
  974 +typedef T_DjiVector3f T_DjiFcSubscriptionGimbalAngles;
  975 +
  976 +/*!
  977 + * @brief struct for TOPIC_GIMBAL_STATUS
  978 + */
  979 +typedef struct GimbalStatus {
  980 + uint32_t mountStatus: 1; /*!< 1 - gimbal mounted, 0 - gimbal not mounted*/
  981 + uint32_t isBusy: 1;
  982 + uint32_t pitchLimited: 1; /*!< 1 - axis reached limit, 0 - no */
  983 + uint32_t rollLimited: 1; /*!< 1 - axis reached limit, 0 - no */
  984 + uint32_t yawLimited: 1; /*!< 1 - axis reached limit, 0 - no */
  985 + uint32_t calibrating: 1; /*!< 1 - calibrating, 0 - no */
  986 + uint32_t prevCalibrationgResult: 1; /*!< 1 - success, 0 - fail */
  987 + uint32_t installedDirection: 1; /*!< 1 - reversed for OSMO, 0 - normal */
  988 + uint32_t disabled_mvo: 1;
  989 + uint32_t gear_show_unable: 1;
  990 + uint32_t gyroFalut: 1; /*!< 1 - fault, 0 - normal */
  991 + uint32_t escPitchStatus: 1; /*!< 1 - Pitch data is normal, 0 - fault */
  992 + uint32_t escRollStatus: 1; /*!< 1 - Roll data is normal, 0 - fault */
  993 + uint32_t escYawStatus: 1; /*!< 1 - Yaw data is normal , 0 - fault */
  994 + uint32_t droneDataRecv: 1; /*!< 1 - normal , 0 - at fault */
  995 + uint32_t initUnfinished: 1; /*!< 1 - init complete, 0 - not complete */
  996 + uint32_t FWUpdating: 1; /*!< 1 - updating, 0 - not updating */
  997 + uint32_t reserved2: 15;
  998 +} T_DjiFcSubscriptionGimbalStatus;
  999 +
  1000 +/**
  1001 + * @brief Flight status information topic data structure. It can be any value of ::E_DjiFcSubscriptionFlightStatus.
  1002 + */
  1003 +typedef uint8_t T_DjiFcSubscriptionFlightStatus;
  1004 +
  1005 +typedef uint8_t T_DjiFcSubscriptionDisplaymode;
  1006 +
  1007 +typedef uint8_t T_DjiFcSubscriptionLandinggear;
  1008 +
  1009 +typedef uint16_t T_DjiFcSubscriptionMotorStartError;
  1010 +
  1011 +typedef struct {
  1012 + uint32_t reserved: 12;
  1013 + uint32_t cellBreak: 5; /*!< 0: normal; other: under voltage core index(0x01-0x1F). */
  1014 + uint32_t selfCheckError: 3; /*!< enum-type: E_DJIFcSubscriptionBatterySelfCheck. */
  1015 + uint32_t reserved1: 7;
  1016 + uint32_t batteryClosedReason: 5; /*!< enum-type: E_DJIFcSubscriptionBatteryClosedReason. */
  1017 + uint8_t reserved2: 6; /*!< 0: CHG state; 1: DSG state; 2: ORING state. */
  1018 + uint8_t batSOHState: 2; /*!< enum-type: E_DJIFcSubscriptionBatterySohState. */
  1019 + uint8_t maxCycleLimit: 6; /*!< APP: cycle_limit*10. */
  1020 + uint8_t reserved3: 2;
  1021 + uint16_t lessBattery: 1;
  1022 + uint16_t batteryCommunicationAbnormal: 1;
  1023 + uint16_t reserved4: 3;
  1024 + uint16_t hasCellBreak: 1;
  1025 + uint16_t reserved5: 4;
  1026 + uint16_t isBatteryEmbed: 1; /*!< 0:embed; 1:not embed. */
  1027 + uint16_t heatState: 2; /*!< enum-type: E_DJIFcSubscriptionBatteryHeatState. */
  1028 + uint16_t socState: 3; /*!< enum-type: E_DJIFcSubscriptionBatterySocState. */
  1029 +} T_DjiFcSubscriptionSingleBatteryState;
  1030 +
  1031 +/**
  1032 + * @brief Battery information topic data structure.
  1033 + */
  1034 +typedef struct BatteryWholeInfo {
  1035 + uint32_t capacity; /*!< Battery capacity, unit: mAh. */
  1036 + int32_t voltage; /*!< Battery voltage, unit: mV. */
  1037 + int32_t current; /*!< Battery current, unit: mA. */
  1038 + uint8_t percentage; /*!< Battery capacity percentage, unit: 1%. */
  1039 +} T_DjiFcSubscriptionWholeBatteryInfo;
  1040 +
  1041 +typedef struct BatterySingleInfo {
  1042 + uint8_t reserve;
  1043 + uint8_t batteryIndex;
  1044 + int32_t currentVoltage; /*!< uint: mV. */
  1045 + int32_t currentElectric; /*!< uint: mA. */
  1046 + uint32_t fullCapacity; /*!< uint: mAh. */
  1047 + uint32_t remainedCapacity; /*!< uint: mAh. */
  1048 + int16_t batteryTemperature; /*!< uint: 0.1℃. */
  1049 + uint8_t cellCount;
  1050 + uint8_t batteryCapacityPercent; /*!< uint: %. */
  1051 + T_DjiFcSubscriptionSingleBatteryState batteryState;
  1052 + uint8_t reserve1;
  1053 + uint8_t reserve2;
  1054 + uint8_t SOP; /*!< Relative power percentage. */
  1055 +} T_DjiFcSubscriptionSingleBatteryInfo;
  1056 +
  1057 +/*!
  1058 + * @brief struct for TOPIC_CONTROL_DEVICE and data broadcast, return SDK info
  1059 + */
  1060 +typedef struct SDKCtrlInfo {
  1061 + union {
  1062 + /* Used by M300 & M350 */
  1063 + struct {
  1064 + uint8_t controlMode; /*!< enum-type: E_DJIFcSubscriptionControlMode. */
  1065 + uint8_t deviceStatus: 3; /*!< 0->rc 1->app 4->psdk */
  1066 + uint8_t flightStatus: 1; /*!< 1->open 0->closed */
  1067 + uint8_t vrcStatus: 1;
  1068 + uint8_t reserved: 3;
  1069 + };
  1070 +
  1071 + /* Used by other aircrafts */
  1072 + struct {
  1073 + uint8_t controlAuthority; /*!< enum-type: E_DJIFcSubscriptionControlAuthority. */
  1074 + uint8_t controlAuthorityChangeReason; /*!< enum-type: E_DJIFcSubscriptionAuthorityChangeReason. */
  1075 + };
  1076 + };
  1077 +} T_DjiFcSubscriptionControlDevice; // pack(1)
  1078 +
  1079 +/*!
  1080 + * @brief sub struct for TOPIC_HARD_SYNC
  1081 + */
  1082 +typedef struct SyncTimestamp {
  1083 + uint32_t time2p5ms; /*!< clock time in multiples of 2.5ms. Sync timer runs at
  1084 + 400Hz, this field increments in integer steps */
  1085 + uint32_t time1ns; /*!< nanosecond time offset from the 2.5ms pulse */
  1086 + uint32_t resetTime2p5ms; /*!< clock time in multiple of 2.5ms elapsed since the
  1087 + hardware sync started */
  1088 + uint16_t index; /*!< This is the tag field you filled out when using the
  1089 + setSyncFreq API above; use it to identify the packets that
  1090 + have sync data. This is useful when you call the
  1091 + setSyncFreq API with freqInHz = 0, so you get a single
  1092 + pulse that can be uniquely identified with a tag - allowing
  1093 + you to create your own pulse train with uniquely
  1094 + identifiable pulses. */
  1095 + uint8_t flag; /*!< This is true when the packet corresponds to a hardware
  1096 + pulse and false otherwise. This is useful because you can
  1097 + request the software packet to be sent at a higher frequency
  1098 + that the hardware line.*/
  1099 +} SyncTimestamp; // pack(1)
  1100 +
  1101 +/*!
  1102 + * @brief struct for TOPIC_HARD_SYNC
  1103 + */
  1104 +typedef struct HardSyncData {
  1105 + SyncTimestamp ts; /*!< time stamp for the incoming data */
  1106 + struct Quaternion q; /*!< quaternion */
  1107 + T_DjiVector3f a; /*!< accelerometer reading unit: g */
  1108 + T_DjiVector3f w; /*!< gyro reading unit: rad/sec */
  1109 +} T_DjiFcSubscriptionHardSync;
  1110 +
  1111 +typedef uint8_t T_DjiFcSubscriptionGpsControlLevel;
  1112 +
  1113 +/*!
  1114 + * @brief struct for TOPIC_RC_WITH_FLAG_DATA
  1115 + */
  1116 +typedef struct RCWithFlagData {
  1117 + dji_f32_t pitch; /*!< down = -0.999, middle = 0.000, up =0.999 */
  1118 + dji_f32_t roll; /*!< left = -0.999, middle = 0.000, right=0.999 */
  1119 + dji_f32_t yaw; /*!< left = -0.999, middle = 0.000, right=0.999 */
  1120 + dji_f32_t throttle; /*!< down = -0.999, middle = 0.000, up =0.999 */
  1121 + struct {
  1122 + uint8_t logicConnected: 1; /*!< 0 if sky or ground side is disconnected for 3 seconds */
  1123 + uint8_t skyConnected: 1; /*!< Sky side is connected, i.e., receiver is connected to FC */
  1124 + uint8_t groundConnected: 1; /*!< Ground side is connected, i.e., RC is on and connected to FC */
  1125 + uint8_t appConnected: 1; /*!< Mobile App is connected to RC */
  1126 + uint8_t reserved: 4;
  1127 + } flag;
  1128 +} T_DjiFcSubscriptionRCWithFlagData;
  1129 +
  1130 +/*!
  1131 + * @brief struct for status of each individual esc
  1132 + */
  1133 +typedef struct ESCStatusIndividual {
  1134 + int16_t current; /*!< ESC current, unit: mA */
  1135 + int16_t speed; /*!< ESC speed, unit: rpm */
  1136 + uint16_t voltage; /*!< Input power from battery to ESC, unit: mV */
  1137 + int16_t temperature; /*!< ESC temperature, unit: degree C */
  1138 + uint16_t stall: 1; /*!< Motor is stall */
  1139 + uint16_t empty: 1; /*!< Motor has no load */
  1140 + uint16_t unbalanced: 1; /*!< Motor speed is unbalanced */
  1141 + uint16_t escDisconnected: 1; /*!< ESC is disconnected */
  1142 + uint16_t temperatureHigh: 1; /*!< Temperature is high */
  1143 + uint16_t reserved: 11;
  1144 +} ESCStatusIndividual;
  1145 +
  1146 +/*!
  1147 + * @brief struct for TOPIC_ESC_DATA
  1148 + */
  1149 +typedef struct EscData {
  1150 + ESCStatusIndividual esc[8];
  1151 +} T_DjiFcSubscriptionEscData;
  1152 +
  1153 +/*!
  1154 + * @brief struct indicating RTK GPS Connection
  1155 + */
  1156 +typedef struct RTKConnectStatus {
  1157 + uint16_t rtkConnected: 1;
  1158 + uint16_t reserve: 15;
  1159 +} T_DjiFcSubscriptionRTKConnectStatus;
  1160 +
  1161 +typedef uint8_t T_DjiFcSubscriptionGimbalControlMode;
  1162 +
  1163 +/*!
  1164 + * @brief struct for TOPIC_FLIGHT_ANOMALY
  1165 + */
  1166 +typedef struct FlightAnomaly {
  1167 + uint32_t impactInAir: 1; /*!< 0: No impact, 1: Impact happens in Air */
  1168 + uint32_t randomFly: 1; /*!< 0: Normal, 1: Randomly fly in GPS mode without stick input*/
  1169 + uint32_t heightCtrlFail: 1; /*!< 0: Height control normal, 1: Height control failed */
  1170 + uint32_t rollPitchCtrlFail: 1; /*!< 0: Tilt control normal, 1: Tilt control failed */
  1171 + uint32_t yawCtrlFail: 1; /*!< 0: Yaw control normal, 1: Yaw control failed */
  1172 + uint32_t aircraftIsFalling: 1; /*!< 0: Aircraft is not falling, 1: Aircraft is falling */
  1173 + uint32_t strongWindLevel1: 1; /*!< 0: Wind is under big wind level 1, 1: wind is stronger than big wind level 1*/
  1174 + uint32_t strongWindLevel2: 1; /*!< 0: Wind is under big wind level 2, 1: wind is stronger than big wind level 2*/
  1175 + uint32_t compassInstallationError: 1; /*!< 0: Compass install right, 1: Compass install error */
  1176 + uint32_t imuInstallationError: 1; /*!< 0: IMU install right, 1: IMU install error */
  1177 + uint32_t escTemperatureHigh: 1; /*!< 0: ESC temperature is normal, 1: ESC temperature is high */
  1178 + uint32_t atLeastOneEscDisconnected: 1; /*!< 0: No ESC disconnected, 1: At least one ESC is disconnected */
  1179 + uint32_t gpsYawError: 1; /*!< 0: No GPS yaw error, 1: GPS yaw error */
  1180 + uint32_t reserved: 19;
  1181 +} T_DjiFcSubscriptionFlightAnomaly;
  1182 +
  1183 +/*!
  1184 + * @brief struct for TOPIC_POSITION_VO
  1185 + */
  1186 +typedef struct PositionVO {
  1187 + dji_f32_t x; /*!< North (best effort), unit: m */
  1188 + dji_f32_t y; /*!< East (best effort), unit: m */
  1189 + dji_f32_t z; /*!< Down, unit: m */
  1190 + uint8_t xHealth: 1;
  1191 + uint8_t yHealth: 1;
  1192 + uint8_t zHealth: 1;
  1193 + uint8_t reserved: 5;
  1194 +} T_DjiFcSubscriptionPositionVO;
  1195 +
  1196 +/*!
  1197 + * @brief struct for data broadcast and subscription, return obstacle info around the vehicle
  1198 + *
  1199 + */
  1200 +typedef struct RelativePosition {
  1201 + dji_f32_t down; /*!< distance from obstacle (m) */
  1202 + dji_f32_t front; /*!< distance from obstacle (m) */
  1203 + dji_f32_t right; /*!< distance from obstacle (m) */
  1204 + dji_f32_t back; /*!< distance from obstacle (m) */
  1205 + dji_f32_t left; /*!< distance from obstacle (m) */
  1206 + dji_f32_t up; /*!< distance from obstacle (m) */
  1207 + uint8_t downHealth: 1; /*!< Down sensor flag: 0 - not working, 1 - working */
  1208 + uint8_t frontHealth: 1; /*!< Front sensor flag: 0 - not working, 1 - working */
  1209 + uint8_t rightHealth: 1; /*!< Right sensor flag: 0 - not working, 1 - working */
  1210 + uint8_t backHealth: 1; /*!< Back sensor flag: 0 - not working, 1 - working */
  1211 + uint8_t leftHealth: 1; /*!< Left sensor flag: 0 - not working, 1 - working */
  1212 + uint8_t upHealth: 1; /*!< Up sensor health flag: 0 - not working, 1 - working */
  1213 + uint8_t reserved: 2; /*!< Reserved sensor health flag*/
  1214 +} T_DjiFcSubscriptionAvoidData;
  1215 +
  1216 +/**
  1217 + * @brief Struct for the topic DJI_FC_SUBSCRIPTION_TOPIC_HOME_POINT_SET_STATUS. Specifies homepoint was set or not,
  1218 + * it can be any value of ::E_DjiFcSubscriptionHomePointSetStatus.
  1219 + */
  1220 +typedef uint8_t T_DjiFcSubscriptionHomePointSetStatus;
  1221 +
  1222 +/**
  1223 + * @brief Struct for the topic DJI_FC_SUBSCRIPTION_TOPIC_HOME_POINT_INFO. Specifies homepoint.
  1224 + */
  1225 +typedef struct HomeLocationData {
  1226 + dji_f64_t latitude; /*!< unit: rad */
  1227 + dji_f64_t longitude; /*!< unit: rad */
  1228 +} T_DjiFcSubscriptionHomePointInfo; // pack(1)
  1229 +
  1230 +typedef struct GimbalSingleData {
  1231 + dji_f32_t roll;
  1232 + dji_f32_t pitch;
  1233 + dji_f32_t yaw;
  1234 +} GimbalAnglesData;
  1235 +
  1236 +/**
  1237 + * @brief Struct for the topic DJI_FC_SUBSCRIPTION_TOPIC_THREE_GIMBAL_DATA. Used in M300
  1238 + */
  1239 +typedef struct GimbalThreeData {
  1240 + GimbalAnglesData anglesData[3];
  1241 +} T_DjiFcSubscriptionThreeGimbalData;
  1242 +
  1243 +/**
  1244 + * @brief Struct for the topic DJI_FC_SUBSCRIPTION_TOPIC_IMU_ATTI_NAVI_DATA_WITH_TIMESTAMP. Used in M300
  1245 + */
  1246 +typedef struct ImuAttiNaviDataWithTimestamp {
  1247 + uint16_t version;
  1248 + uint16_t flag;
  1249 + dji_f32_t pn_x;
  1250 + dji_f32_t pn_y;
  1251 + dji_f32_t pn_z;
  1252 + dji_f32_t vn_x;
  1253 + dji_f32_t vn_y;
  1254 + dji_f32_t vn_z;
  1255 + dji_f32_t an_x;
  1256 + dji_f32_t an_y;
  1257 + dji_f32_t an_z;
  1258 + dji_f32_t q[4];
  1259 + uint16_t resv;
  1260 + uint16_t cnt;
  1261 + uint32_t timestamp;
  1262 +} T_DjiFcSubscriptionImuAttiNaviDataWithTimestamp;
  1263 +
  1264 +#pragma pack()
  1265 +
  1266 +/* Exported functions --------------------------------------------------------*/
  1267 +/**
  1268 + * @brief Initialise data subscription module in blocking mode. This function has to be called before subscribing any
  1269 + * data, to initialize run environment of data subscription module, if need to subscribe data from aircraft.
  1270 + * @note Max execution time of this function is slightly larger than 500ms.
  1271 + * @note This function has to be called in user task, rather than main() function, and after scheduler being started.
  1272 + * @return Execution result.
  1273 + */
  1274 +T_DjiReturnCode DjiFcSubscription_Init(void);
  1275 +
  1276 +/**
  1277 + * @brief Deinitialize data subscription module. When data subscription will no longer be used, can call this function
  1278 + * to deinitialize the data subscription module. Deinitialization function will help to release all system resource data
  1279 + * subscription has occupied.
  1280 + * @return Execution result.
  1281 + */
  1282 +T_DjiReturnCode DjiFcSubscription_DeInit(void);
  1283 +
  1284 +/**
  1285 + * @brief Subscribe a topic in blocking mode. Before subscribing any data from aircraft, DjiFcSubscription_Init()
  1286 + * function has to be called.
  1287 + * @details User can subscribe a topic by specifying topic name, push frequency and callback function used to receive
  1288 + * data of topic (if needed). After subscribing successfully, the user can call
  1289 + * DjiFcSubscription_GetLatestValueOfTopic() function to get the latest data of the topic have been
  1290 + * subscribed and the corresponding timestamp when aircraft sends the data out, and the callback function will be called to
  1291 + * push data of the topic and corresponding timestamp if the callback function is specified.
  1292 + * @note Max execution time of this function is slightly larger than 1200ms.
  1293 + * @note Topic to be subscribed can not have been subscribed, that is, one topic can not be subscribed repeatedly.
  1294 + * @note User must ensure that types of subscription frequency of all topics have been subscribed is less than or
  1295 + * equal to 4. Otherwise, the subscribing topic will fail.
  1296 + * @note User must ensure that the data length sum of all topics of the same subscription frequency is less than or equal to 242.
  1297 + * @param topic: topic name to be subscribed.
  1298 + * @param frequency: subscription frequency of topic to be subscribed. Subscription frequency can not beyond max
  1299 + * frequency limitation of the topic and must be the value of enum E_DjiFcSubscriptionTopicFreq. And, subscription
  1300 + * frequency has to be larger than 0. Users can find max frequency of topics in data subscription part of documentation
  1301 + * on developer website (developer.dji.com).
  1302 + * @param callback: callback function used to receive data of topic to be subscribed. If the callback function is not needed,
  1303 + * this item can be set as NULL.
  1304 + * @return Execution result.
  1305 + */
  1306 +T_DjiReturnCode DjiFcSubscription_SubscribeTopic(E_DjiFcSubscriptionTopic topic,
  1307 + E_DjiDataSubscriptionTopicFreq frequency,
  1308 + DjiReceiveDataOfTopicCallback callback);
  1309 +
  1310 +/**
  1311 + * @brief Unsubscribe a topic in blocking mode. Before unsubscribing any data from aircraft, DjiFcSubscription_Init()
  1312 + * and DjiFcSubscription_SubscribeTopic() function has to be called,
  1313 + * @details User can unsubscribe a topic by specifying topic name, but the topic must be unsubscribed in the order of subscription.
  1314 + * @note Topic to be unsubscribed must have been subscribed.
  1315 + * @note Topic to be unsubscribed must be in the order of subscription, similar to a queue, subscription is similar to enqueue,
  1316 + * unsubscription is similar to dequeue.
  1317 + * @param topic: topic name to be unsubscribed.
  1318 + * @return Execution result.
  1319 + */
  1320 +T_DjiReturnCode DjiFcSubscription_UnSubscribeTopic(E_DjiFcSubscriptionTopic topic);
  1321 +
  1322 +/**
  1323 + * @brief Get the latest data value and timestamp in aircraft time system when sending the data from aircraft of specified
  1324 + * topic. If the specified topic has not been subscribed successfully, this function will return the error code.
  1325 + * @note After calling this function, user need transfer type of data pointer that pointer to data of topic to
  1326 + * corresponding data structure pointer for getting every item of the topic conveniently.
  1327 + * @param topicName: topic name to be gotten value.
  1328 + * @param data: pointer to memory space used to store data of the topic. The memory space used to store data of topic
  1329 + * have to have been allocated correctly and should ensure its size is equal to data structure size corresponding to
  1330 + * the topic, otherwise, this function will not be able to return data and timestamp (return error code).
  1331 + * @param dataSizeOfTopic: the size of memory space used to store data of topic. Normally, this size is equal to data
  1332 + * structure size corresponding to the topic. If this size is not equal to the size of the memory space, may cause memory
  1333 + * overflow event
  1334 + * @param timestamp: pointer to memory space used to store timestamps. The memory space used to store timestamps
  1335 + * have to have been allocated correctly, and should ensure its size is equal to data structure size of timestamp,
  1336 + * otherwise, this function will not be able to return data and timestamp (return error code) or even cause memory
  1337 + * overflow event. If the user does not need timestamp information, can fill in NULL. Use flight controller power-on
  1338 + * timestamp on M300 RTK. Use payload local timestamp on M30/M30T.
  1339 + * @return Execution result.
  1340 + */
  1341 +T_DjiReturnCode DjiFcSubscription_GetLatestValueOfTopic(E_DjiFcSubscriptionTopic topic,
  1342 + uint8_t *data, uint16_t dataSizeOfTopic,
  1343 + T_DjiDataTimestamp *timestamp);
  1344 +#ifdef __cplusplus
  1345 +}
  1346 +#endif
  1347 +
  1348 +#endif // DJI_FC_SUBSCRIPTION_H
  1349 +/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/