作者 潘浩彬

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

新振膜音量修改

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

查看合并请求 !24

要显示太多修改。

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

... ... @@ -7,27 +7,73 @@ linux_kernel
project_build/AUTEL_道通PSDK
project_build/GDU_普宙PSDK
project_build/ZY_珠海紫燕PSDK
project_build/Only_Serial/*
!project_build/Only_Serial/application
!project_build/Only_Serial/CMakeLists.txt
# project_build/Only_Serial/*
# !project_build/Only_Serial/application
# !project_build/Only_Serial/CMakeLists.txt
project_build/DJI_大疆PSDK/*
!project_build/DJI_大疆PSDK/samples
project_build/DJI_大疆PSDK/samples/sample_c++
# project_build/DJI_大疆PSDK/*
# !project_build/DJI_大疆PSDK/samples
# project_build/DJI_大疆PSDK/samples/sample_c++
project_build/DJI_大疆PSDK/samples/sample_c/platform/*
!project_build/DJI_大疆PSDK/samples/sample_c/platform/linux
# project_build/DJI_大疆PSDK/samples/sample_c/platform/*
# !project_build/DJI_大疆PSDK/samples/sample_c/platform/linux
project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/*
!project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/application
!project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/hal
!project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/CMakeLists.txt
# project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/*
# !project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/application
# !project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/hal
# !project_build/DJI_大疆PSDK/samples/sample_c/platform/linux/all/CMakeLists.txt
project_build/Payload-SDK-release-v3.11.0/*
project_build/Attention_提示程序
\ No newline at end of file
# project_build/Attention_提示程序
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
*.so*
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# 执行程序
*.exe
*.out
*.app
build
# 编译文件
*.bin
*.dir
Upgrade_Package
# 存档文件
*.png
*.jpg
*.mp4
*.h264
*.pdf
\ No newline at end of file
... ...
... ... @@ -138,7 +138,10 @@
"jzsdk_smt_code.h": "c",
"volume.h": "c",
"jzsdk_data_transmisson.h": "c",
"jzsdk_monitor.h": "c"
"jzsdk_monitor.h": "c",
"*.bak": "c",
"ziyan_sdk_config.h": "c",
"test_payload_cam_emu_base.h": "c"
},
"Codegeex.GenerationPreference": "automatic",
"C_Cpp.dimInactiveRegions": false,
... ...
# 编译链的配置
#1、编译链与设备类型的选择
set(DEVICE_NAME JZ_U3S)
set(DEVICE_NAME JZ_U3D)
#上一行为禁止修改行
message("**************************JZSDK构建编译开始***************************\n")
... ...
... ... @@ -7,7 +7,7 @@
#define VERSION_CHOOSE_H
#include "JZsdk_Base/JZsdk_Code/JZsdk_DeviceCode.h"
//1~10行 除了D可以修改版本选择 禁止动任何东西
#define DEVICE_VERSION JZ_U3S
#define DEVICE_VERSION JZ_U3D
//禁止修改行 选择是串口程序 还是 psdk程序
#define APP_VERSION APP_PSDK
... ...
... ... @@ -80,7 +80,7 @@ extern "C" {
// #define MAX_TTS_VOLUME (81)
//2025 4 10 改滤波 降低到u53%
#define MAX_VOLUME (63)
#define MAX_VOLUME (63)
#define MAX_TTS_VOLUME (70)
#elif DEVICE_VERSION == JZ_U30
... ...
... ... @@ -373,7 +373,7 @@ static T_JZsdkReturnCode Megaphone_MaxVolume_Init()
g_TTS_Max_volume = MAX_TTS_VOLUME;
}
#elif DEVICE_VERSION == JZ_U3S || DEVICE_VERSION == JZ_U3
#elif DEVICE_VERSION == JZ_U3S || DEVICE_VERSION == JZ_U3 || DEVICE_VERSION == JZ_U30 || DEVICE_VERSION == JZ_U3D
//检索版本号,振膜更换版本
if (HardwareInfo_GetVersion(0) == 25
... ... @@ -389,26 +389,7 @@ static T_JZsdkReturnCode Megaphone_MaxVolume_Init()
}
else
{
g_Max_volume = MAX_VOLUME;
g_TTS_Max_volume = MAX_TTS_VOLUME;
}
#elif DEVICE_VERSION == JZ_U3D || DEVICE_VERSION == JZ_U30
//检索版本号,振膜更换版本
if (HardwareInfo_GetVersion(0) == 25
&& HardwareInfo_GetVersion(1) == 5
&& HardwareInfo_GetVersion(2) == 15
&& HardwareInfo_GetVersion(3) == 0
)
{
JZSDK_LOG_INFO("音量为振膜更换版本");
g_Max_volume = MAX_VOLUME * 95 / 100;
g_TTS_Max_volume = MAX_TTS_VOLUME * 95 / 100;
}
else
{
JZSDK_LOG_INFO("音量为最初硬件");
g_Max_volume = MAX_VOLUME;
g_TTS_Max_volume = MAX_TTS_VOLUME;
}
... ...
cmake_minimum_required(VERSION 2.8)
if (NOT USE_SYSTEM_ARCH)
# select use platform 'LINUX' or 'RTOS' here, reset cache and reload cmake project
set(USE_SYSTEM_ARCH LINUX)
endif ()
if (USE_SYSTEM_ARCH MATCHES RTOS)
cmake_minimum_required(VERSION 3.15)
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
set(CMAKE_ASM_COMPILER arm-none-eabi-gcc)
set(CMAKE_AR arm-none-eabi-ar)
set(CMAKE_OBJCOPY arm-none-eabi-objcopy)
set(CMAKE_OBJDUMP arm-none-eabi-objdump)
set(SIZE arm-none-eabi-size)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
endif ()
project(entry)
# Disable in-source builds to prevent source tree corruption.
if (" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "FATAL: In-source builds are not allowed.
You should create a separate directory for build files.")
endif ()
if (USE_SYSTEM_ARCH MATCHES LINUX)
add_definitions(-DSYSTEM_ARCH_LINUX)
add_subdirectory(samples/sample_c/platform/linux/manifold2)
add_subdirectory(samples/sample_c++/platform/linux/manifold2)
execute_process(COMMAND uname -m OUTPUT_VARIABLE DEVICE_SYSTEM_ID)
if (DEVICE_SYSTEM_ID MATCHES x86_64)
set(LIBRARY_PATH psdk_lib/lib/x86_64-linux-gnu-gcc)
elseif (DEVICE_SYSTEM_ID MATCHES aarch64)
set(LIBRARY_PATH psdk_lib/lib/aarch64-linux-gnu-gcc)
else ()
message(FATAL_ERROR "FATAL: Please confirm your platform.")
endif ()
install(FILES ${LIBRARY_PATH}/libpayloadsdk.a
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
)
install(DIRECTORY psdk_lib/include
DESTINATION "${CMAKE_INSTALL_PREFIX}"
)
elseif (USE_SYSTEM_ARCH MATCHES RTOS)
add_definitions(-DSYSTEM_ARCH_RTOS)
add_subdirectory(samples/sample_c/platform/rtos_freertos/stm32f4_discovery/project/armgcc)
endif ()
add_custom_target(${PROJECT_NAME} ALL)
... ...
END USER LICENSE AGREEMENT
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.
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.
1. About This Agreement.
1.1 Generally. This Agreement applies to the SDK made available by DJI to you.
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.
2. Definitions
“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.
“Application” means a software program that is developed by you using the SDK for use with DJI Products.
“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.
“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.
“DJI” means SZ DJI TECHNOLOGY CO., LTD. and its affiliates.
“DJI Products” means DJI hardware, software, and services, such as unmanned aerial vehicles (UAVs), flight controllers, sensors, cameras, gimbals, remote controllers, accessories, etc.
“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.
“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.).
“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.
“Privacy Policy” means DJI’s privacy policy located at https://developer.dji.com/policies/privacy/.
“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/).
“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.
“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.
“Updates” means bug fixes, service packs, hot fixes, updates, upgrades, enhancements, modifications, and new releases of versions of the SDK.
“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.).
3. License.
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.
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.
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.
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.
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.
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.
5. Your Applications and Use of the SDK.
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.
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.
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.
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.
6. Privacy and Automatically Collected Information.
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.
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/.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
This End User License Agreement was last modified on December 11, 2017.
... ...
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.
.
├── CMakeLists.txt
├── doc
│   ├── dji_sdk_code_style
│   │   ├── dji_sdk_template.c
│   │   └── dji_sdk_template.h
│   ├── reference_designs
│   │   ├── E-Port Lite Schematic Reference.pdf
│   │   └── E-Port Schematic Reference.pdf
│   └── simple_model
│   ├── H20.stp
│   ├── H20T.stp
│   ├── M300_OSDK_Adapter.stp
│   ├── M300_RTK_1.stp
│   ├── M300_RTK_2.stp
│   ├── M300_RTK_3.stp
│   ├── M30T.stp
│   ├── M3E.stp
│   ├── PSDK Mounting Bracket(Payload).stp
│   ├── Readme.txt
│   ├── Skyport_Adapter_2.stp
│   └── X-Port 80mm.stp
├── EULA.txt
├── LICENSE.txt
├── psdk_lib
│   ├── include
│   │   ├── dji_aircraft_info.h
│   │   ├── dji_camera_manager.h
│   │   ├── dji_core.h
│   │   ├── dji_error.h
│   │   ├── dji_fc_subscription.h
│   │   ├── dji_flight_controller.h
│   │   ├── dji_gimbal.h
│   │   ├── dji_gimbal_manager.h
│   │   ├── dji_high_speed_data_channel.h
│   │   ├── dji_hms_customization.h
│   │   ├── dji_hms.h
│   │   ├── dji_hms_info_table.h
│   │   ├── dji_hms_manager.h
│   │   ├── dji_interest_point.h
│   │   ├── dji_liveview.h
│   │   ├── dji_logger.h
│   │   ├── dji_low_speed_data_channel.h
│   │   ├── dji_mop_channel.h
│   │   ├── dji_payload_camera.h
│   │   ├── dji_perception.h
│   │   ├── dji_platform.h
│   │   ├── dji_positioning.h
│   │   ├── dji_power_management.h
│   │   ├── dji_time_sync.h
│   │   ├── dji_typedef.h
│   │   ├── dji_upgrade.h
│   │   ├── dji_version.h
│   │   ├── dji_waypoint_v2.h
│   │   ├── dji_waypoint_v2_type.h
│   │   ├── dji_waypoint_v3.h
│   │   ├── dji_widget.h
│   │   ├── dji_xport.h
│   │   └── legacy_psdk2.x
│   │   ├── psdk_aircraft_info.h
│   │   ├── psdk_core.h
│   │   ├── psdk_data_channel.h
│   │   ├── psdk_data_subscription.h
│   │   ├── psdk_data_transmission.h
│   │   ├── psdk_error.h
│   │   ├── psdk_gimbal.h
│   │   ├── psdk_logger.h
│   │   ├── psdk_mop_channel.h
│   │   ├── psdk_payload_camera.h
│   │   ├── psdk_payload_collaboration.h
│   │   ├── psdk_platform.h
│   │   ├── psdk_positioning.h
│   │   ├── psdk_power_management.h
│   │   ├── psdk_product_info.h
│   │   ├── psdk_time_sync.h
│   │   ├── psdk_typedef.h
│   │   ├── psdk_upgrade.h
│   │   ├── psdk_version.h
│   │   ├── psdk_widget.h
│   │   └── psdk_xport.h
│   └── lib
│   ├── aarch64-linux-gnu-gcc
│   │   └── libpayloadsdk.a
│   ├── armcc_cortex-m4
│   │   └── libpayload.lib
│   ├── arm-linux-gnueabi-gcc
│   │   └── libpayloadsdk.a
│   ├── arm-linux-gnueabihf-gcc
│   │   └── libpayloadsdk.a
│   └── x86_64-linux-gnu-gcc
│   └── libpayloadsdk.a
├── README.md
├── samples
│   ├── sample_c
│   │   ├── module_sample
│   │   │   ├── camera_emu
│   │   │   │   ├── dji_media_file_manage
│   │   │   │   │   ├── dji_media_file_core.c
│   │   │   │   │   ├── dji_media_file_core.h
│   │   │   │   │   ├── dji_media_file_jpg.c
│   │   │   │   │   ├── dji_media_file_jpg.h
│   │   │   │   │   ├── dji_media_file_mp4.c
│   │   │   │   │   └── dji_media_file_mp4.h
│   │   │   │   ├── media_file
│   │   │   │   │   ├── PSDK_0001_ORG.jpg
│   │   │   │   │   ├── PSDK_0002_ORG.jpg
│   │   │   │   │   ├── PSDK_0003_ORG.jpg
│   │   │   │   │   ├── PSDK_0004_ORG.mp4
│   │   │   │   │   └── PSDK_0005.h264
│   │   │   │   ├── test_payload_cam_emu_base.c
│   │   │   │   ├── test_payload_cam_emu_base.h
│   │   │   │   ├── test_payload_cam_emu_media.c
│   │   │   │   └── test_payload_cam_emu_media.h
│   │   │   ├── camera_manager
│   │   │   │   ├── test_camera_manager.c
│   │   │   │   └── test_camera_manager.h
│   │   │   ├── data_transmission
│   │   │   │   ├── test_data_transmission.c
│   │   │   │   └── test_data_transmission.h
│   │   │   ├── fc_subscription
│   │   │   │   ├── test_fc_subscription.c
│   │   │   │   └── test_fc_subscription.h
│   │   │   ├── flight_control
│   │   │   │   ├── test_flight_control.c
│   │   │   │   └── test_flight_control.h
│   │   │   ├── gimbal_emu
│   │   │   │   ├── test_payload_gimbal_emu.c
│   │   │   │   └── test_payload_gimbal_emu.h
│   │   │   ├── gimbal_manager
│   │   │   │   ├── test_gimbal_manager.c
│   │   │   │   └── test_gimbal_manager.h
│   │   │   ├── hms
│   │   │   │   ├── data
│   │   │   │   │   └── hms.json
│   │   │   │   ├── hms_text
│   │   │   │   │   ├── cn
│   │   │   │   │   │   └── hms_text_config.json
│   │   │   │   │   └── en
│   │   │   │   │   └── hms_text_config.json
│   │   │   │   ├── hms_text_c
│   │   │   │   │   └── en
│   │   │   │   │   └── hms_text_config_json.h
│   │   │   │   ├── test_hms.c
│   │   │   │   └── test_hms.h
│   │   │   ├── interest_point
│   │   │   │   ├── test_interest_point.c
│   │   │   │   └── test_interest_point.h
│   │   │   ├── liveview
│   │   │   │   ├── test_liveview.c
│   │   │   │   └── test_liveview.h
│   │   │   ├── mop_channel
│   │   │   │   ├── mop_channel_test_file
│   │   │   │   │   └── mop_send_test_file.mp4
│   │   │   │   ├── test_mop_channel.c
│   │   │   │   └── test_mop_channel.h
│   │   │   ├── payload_collaboration
│   │   │   │   ├── test_payload_collaboration.c
│   │   │   │   └── test_payload_collaboration.h
│   │   │   ├── perception
│   │   │   │   ├── test_perception.c
│   │   │   │   └── test_perception.h
│   │   │   ├── positioning
│   │   │   │   ├── test_positioning.c
│   │   │   │   └── test_positioning.h
│   │   │   ├── power_management
│   │   │   │   ├── test_power_management.c
│   │   │   │   └── test_power_management.h
│   │   │   ├── time_sync
│   │   │   │   ├── test_time_sync.c
│   │   │   │   └── test_time_sync.h
│   │   │   ├── upgrade
│   │   │   │   ├── test_upgrade.c
│   │   │   │   ├── test_upgrade_common_file_transfer.c
│   │   │   │   ├── test_upgrade_common_file_transfer.h
│   │   │   │   ├── test_upgrade.h
│   │   │   │   ├── test_upgrade_platform_opt.c
│   │   │   │   └── test_upgrade_platform_opt.h
│   │   │   ├── utils
│   │   │   │   ├── cJSON.c
│   │   │   │   ├── cJSON.h
│   │   │   │   ├── dji_config_manager.c
│   │   │   │   ├── dji_config_manager.h
│   │   │   │   ├── util_buffer.c
│   │   │   │   ├── util_buffer.h
│   │   │   │   ├── util_file.c
│   │   │   │   ├── util_file.h
│   │   │   │   ├── util_link_list.c
│   │   │   │   ├── util_link_list.h
│   │   │   │   ├── util_md5.c
│   │   │   │   ├── util_md5.h
│   │   │   │   ├── util_misc.c
│   │   │   │   ├── util_misc.h
│   │   │   │   ├── util_time.c
│   │   │   │   └── util_time.h
│   │   │   ├── waypoint_v2
│   │   │   │   ├── test_waypoint_v2.c
│   │   │   │   └── test_waypoint_v2.h
│   │   │   ├── waypoint_v3
│   │   │   │   ├── test_waypoint_v3.c
│   │   │   │   ├── test_waypoint_v3.h
│   │   │   │   ├── waypoint_file
│   │   │   │   │   └── waypoint_v3_test_file.kmz
│   │   │   │   └── waypoint_file_c
│   │   │   │   └── waypoint_v3_test_file_kmz.h
│   │   │   ├── widget
│   │   │   │   ├── file_binary_array_list_en.c
│   │   │   │   ├── file_binary_array_list_en.h
│   │   │   │   ├── test_widget.c
│   │   │   │   ├── test_widget.h
│   │   │   │   ├── test_widget_speaker.c
│   │   │   │   ├── test_widget_speaker.h
│   │   │   │   ├── widget_file
│   │   │   │   │   ├── cn_big_screen
│   │   │   │   │   │   ├── icon_button1.png
│   │   │   │   │   │   ├── icon_button2.png
│   │   │   │   │   │   ├── icon_list_item1.png
│   │   │   │   │   │   ├── icon_list_item2.png
│   │   │   │   │   │   ├── icon_scale.png
│   │   │   │   │   │   ├── icon_switch_select.png
│   │   │   │   │   │   ├── icon_switch_unselect.png
│   │   │   │   │   │   └── widget_config.json
│   │   │   │   │   └── en_big_screen
│   │   │   │   │   ├── icon_button1.png
│   │   │   │   │   ├── icon_button2.png
│   │   │   │   │   ├── icon_list_item1.png
│   │   │   │   │   ├── icon_list_item2.png
│   │   │   │   │   ├── icon_scale.png
│   │   │   │   │   ├── icon_switch_select.png
│   │   │   │   │   ├── icon_switch_unselect.png
│   │   │   │   │   └── widget_config.json
│   │   │   │   └── widget_file_c
│   │   │   │   └── en_big_screen
│   │   │   │   ├── icon_button1_png.h
│   │   │   │   ├── icon_button2_png.h
│   │   │   │   ├── icon_list_item1_png.h
│   │   │   │   ├── icon_list_item2_png.h
│   │   │   │   ├── icon_scale_png.h
│   │   │   │   ├── icon_switch_select_png.h
│   │   │   │   ├── icon_switch_unselect_png.h
│   │   │   │   └── widget_config_json.h
│   │   │   ├── widget_interaction_test
│   │   │   │   ├── file_binary_array_list_en.c
│   │   │   │   ├── file_binary_array_list_en.h
│   │   │   │   ├── test_widget_interaction.c
│   │   │   │   ├── test_widget_interaction.h
│   │   │   │   ├── widget_file
│   │   │   │   │   ├── cn_big_screen
│   │   │   │   │   │   ├── icon_button1.png
│   │   │   │   │   │   ├── icon_button2.png
│   │   │   │   │   │   ├── icon_list_item1.png
│   │   │   │   │   │   ├── icon_list_item2.png
│   │   │   │   │   │   ├── icon_scale.png
│   │   │   │   │   │   ├── icon_switch_select.png
│   │   │   │   │   │   ├── icon_switch_unselect.png
│   │   │   │   │   │   └── widget_config.json
│   │   │   │   │   └── en_big_screen
│   │   │   │   │   ├── icon_button1.png
│   │   │   │   │   ├── icon_button2.png
│   │   │   │   │   ├── icon_list_item1.png
│   │   │   │   │   ├── icon_list_item2.png
│   │   │   │   │   ├── icon_scale.png
│   │   │   │   │   ├── icon_switch_select.png
│   │   │   │   │   ├── icon_switch_unselect.png
│   │   │   │   │   └── widget_config.json
│   │   │   │   └── widget_file_c
│   │   │   │   └── en_big_screen
│   │   │   │   ├── icon_button1_png.h
│   │   │   │   ├── icon_button2_png.h
│   │   │   │   ├── icon_list_item1_png.h
│   │   │   │   ├── icon_list_item2_png.h
│   │   │   │   ├── icon_scale_png.h
│   │   │   │   ├── icon_switch_select_png.h
│   │   │   │   ├── icon_switch_unselect_png.h
│   │   │   │   └── widget_config_json.h
│   │   │   └── xport
│   │   │   ├── test_payload_xport.c
│   │   │   └── test_payload_xport.h
│   │   └── platform
│   │   ├── linux
│   │   │   ├── common
│   │   │   │   ├── 3rdparty
│   │   │   │   │   ├── FindFFMPEG.cmake
│   │   │   │   │   ├── FindLIBUSB.cmake
│   │   │   │   │   └── FindOPUS.cmake
│   │   │   │   ├── monitor
│   │   │   │   │   ├── sys_monitor.c
│   │   │   │   │   └── sys_monitor.h
│   │   │   │   ├── osal
│   │   │   │   │   ├── osal.c
│   │   │   │   │   ├── osal_fs.c
│   │   │   │   │   ├── osal_fs.h
│   │   │   │   │   ├── osal.h
│   │   │   │   │   ├── osal_socket.c
│   │   │   │   │   └── osal_socket.h
│   │   │   │   └── upgrade_platform_opt
│   │   │   │   ├── upgrade_platform_opt_linux.c
│   │   │   │   └── upgrade_platform_opt_linux.h
│   │   │   ├── manifold2
│   │   │   │   ├── application
│   │   │   │   │   ├── dji_sdk_app_info.h
│   │   │   │   │   ├── dji_sdk_config.h
│   │   │   │   │   └── main.c
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   └── hal
│   │   │   │   ├── hal_network.c
│   │   │   │   ├── hal_network.h
│   │   │   │   ├── hal_uart.c
│   │   │   │   ├── hal_uart.h
│   │   │   │   ├── hal_usb_bulk.c
│   │   │   │   └── hal_usb_bulk.h
│   │   │   ├── nvidia_jetson
│   │   │   │   ├── application
│   │   │   │   │   ├── dji_sdk_app_info.h
│   │   │   │   │   ├── dji_sdk_config.h
│   │   │   │   │   └── main.c
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   └── hal
│   │   │   │   ├── hal_i2c.c
│   │   │   │   ├── hal_i2c.h
│   │   │   │   ├── hal_network.c
│   │   │   │   ├── hal_network.h
│   │   │   │   ├── hal_uart.c
│   │   │   │   ├── hal_uart.h
│   │   │   │   ├── hal_usb_bulk.c
│   │   │   │   └── hal_usb_bulk.h
│   │   │   ├── raspberry_pi
│   │   │   │   ├── application
│   │   │   │   │   ├── dji_sdk_app_info.h
│   │   │   │   │   ├── dji_sdk_config.h
│   │   │   │   │   └── main.c
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   └── hal
│   │   │   │   ├── hal_i2c.c
│   │   │   │   ├── hal_i2c.h
│   │   │   │   ├── hal_network.c
│   │   │   │   ├── hal_network.h
│   │   │   │   ├── hal_uart.c
│   │   │   │   ├── hal_uart.h
│   │   │   │   ├── hal_usb_bulk.c
│   │   │   │   └── hal_usb_bulk.h
│   │   └── rtos_freertos
│   │   ├── common
│   │   │   └── osal
│   │   │   ├── osal.c
│   │   │   └── osal.h
│   │   └── stm32f4_discovery
│   │   ├── application
│   │   │   ├── application.c
│   │   │   ├── application.h
│   │   │   ├── dji_sdk_app_info.h
│   │   │   ├── dji_sdk_config.h
│   │   │   ├── FreeRTOSConfig.h
│   │   │   └── main.c
│   │   ├── bootloader
│   │   │   ├── common.c
│   │   │   ├── common.h
│   │   │   ├── main.c
│   │   │   ├── main.h
│   │   │   ├── menu.c
│   │   │   ├── menu.h
│   │   │   └── ymodem.c
│   │   ├── drivers
│   │   │   ├── BSP
│   │   │   │   ├── apply_high_power.c
│   │   │   │   ├── apply_high_power.h
│   │   │   │   ├── button.c
│   │   │   │   ├── button.h
│   │   │   │   ├── dji_ringbuffer.c
│   │   │   │   ├── dji_ringbuffer.h
│   │   │   │   ├── flash_if.c
│   │   │   │   ├── flash_if.h
│   │   │   │   ├── freertos.c
│   │   │   │   ├── led.c
│   │   │   │   ├── led.h
│   │   │   │   ├── pps.c
│   │   │   │   ├── pps.h
│   │   │   │   ├── startup_stm32f407vgtx.s
│   │   │   │   ├── stm32f4xx_hal_conf.h
│   │   │   │   ├── stm32f4xx_hal_msp.c
│   │   │   │   ├── stm32f4xx_hal_timebase_tim.c
│   │   │   │   ├── stm32f4xx_it.c
│   │   │   │   ├── stm32f4xx_it.h
│   │   │   │   ├── syscalls.c
│   │   │   │   ├── sysmem.c
│   │   │   │   ├── sysmem.h
│   │   │   │   ├── system_stm32f4xx.c
│   │   │   │   ├── uart.c
│   │   │   │   ├── uart.h
│   │   │   │   ├── upgrade_platform_opt_stm32.c
│   │   │   │   └── upgrade_platform_opt_stm32.h
│   │   │   ├── CMSIS
│   │   │   │   ├── Device
│   │   │   │   │   └── ST
│   │   │   │   │   └── STM32F4xx
│   │   │   │   │   ├── Include
│   │   │   │   │   │   ├── stm32f407xx.h
│   │   │   │   │   │   ├── stm32f4xx.h
│   │   │   │   │   │   └── system_stm32f4xx.h
│   │   │   │   │   └── Source
│   │   │   │   │   └── Templates
│   │   │   │   │   ├── arm
│   │   │   │   │   │   ├── startup_stm32f401xc.s
│   │   │   │   │   │   ├── startup_stm32f401xe.s
│   │   │   │   │   │   ├── startup_stm32f405xx.s
│   │   │   │   │   │   ├── startup_stm32f407xx.s
│   │   │   │   │   │   ├── startup_stm32f410cx.s
│   │   │   │   │   │   ├── startup_stm32f410rx.s
│   │   │   │   │   │   ├── startup_stm32f410tx.s
│   │   │   │   │   │   ├── startup_stm32f411xe.s
│   │   │   │   │   │   ├── startup_stm32f412cx.s
│   │   │   │   │   │   ├── startup_stm32f412rx.s
│   │   │   │   │   │   ├── startup_stm32f412vx.s
│   │   │   │   │   │   ├── startup_stm32f412zx.s
│   │   │   │   │   │   ├── startup_stm32f413xx.s
│   │   │   │   │   │   ├── startup_stm32f415xx.s
│   │   │   │   │   │   ├── startup_stm32f417xx.s
│   │   │   │   │   │   ├── startup_stm32f423xx.s
│   │   │   │   │   │   ├── startup_stm32f427xx.s
│   │   │   │   │   │   ├── startup_stm32f429xx.s
│   │   │   │   │   │   ├── startup_stm32f437xx.s
│   │   │   │   │   │   ├── startup_stm32f439xx.s
│   │   │   │   │   │   ├── startup_stm32f446xx.s
│   │   │   │   │   │   ├── startup_stm32f469xx.s
│   │   │   │   │   │   └── startup_stm32f479xx.s
│   │   │   │   │   ├── gcc
│   │   │   │   │   │   ├── startup_stm32f401xc.s
│   │   │   │   │   │   ├── startup_stm32f401xe.s
│   │   │   │   │   │   ├── startup_stm32f405xx.s
│   │   │   │   │   │   ├── startup_stm32f407xx.s
│   │   │   │   │   │   ├── startup_stm32f410cx.s
│   │   │   │   │   │   ├── startup_stm32f410rx.s
│   │   │   │   │   │   ├── startup_stm32f410tx.s
│   │   │   │   │   │   ├── startup_stm32f411xe.s
│   │   │   │   │   │   ├── startup_stm32f412cx.s
│   │   │   │   │   │   ├── startup_stm32f412rx.s
│   │   │   │   │   │   ├── startup_stm32f412vx.s
│   │   │   │   │   │   ├── startup_stm32f412zx.s
│   │   │   │   │   │   ├── startup_stm32f413xx.s
│   │   │   │   │   │   ├── startup_stm32f415xx.s
│   │   │   │   │   │   ├── startup_stm32f417xx.s
│   │   │   │   │   │   ├── startup_stm32f423xx.s
│   │   │   │   │   │   ├── startup_stm32f427xx.s
│   │   │   │   │   │   ├── startup_stm32f429xx.s
│   │   │   │   │   │   ├── startup_stm32f437xx.s
│   │   │   │   │   │   ├── startup_stm32f439xx.s
│   │   │   │   │   │   ├── startup_stm32f446xx.s
│   │   │   │   │   │   ├── startup_stm32f469xx.s
│   │   │   │   │   │   └── startup_stm32f479xx.s
│   │   │   │   │   └── iar
│   │   │   │   │   ├── linker
│   │   │   │   │   │   ├── stm32f401xc_flash.icf
│   │   │   │   │   │   ├── stm32f401xc_sram.icf
│   │   │   │   │   │   ├── stm32f401xe_flash.icf
│   │   │   │   │   │   ├── stm32f401xe_sram.icf
│   │   │   │   │   │   ├── stm32f405xx_flash.icf
│   │   │   │   │   │   ├── stm32f405xx_sram.icf
│   │   │   │   │   │   ├── stm32f407xx_flash.icf
│   │   │   │   │   │   ├── stm32f407xx_sram.icf
│   │   │   │   │   │   ├── stm32f410cx_flash.icf
│   │   │   │   │   │   ├── stm32f410cx_sram.icf
│   │   │   │   │   │   ├── stm32f410rx_flash.icf
│   │   │   │   │   │   ├── stm32f410rx_sram.icf
│   │   │   │   │   │   ├── stm32f410tx_flash.icf
│   │   │   │   │   │   ├── stm32f410tx_sram.icf
│   │   │   │   │   │   ├── stm32f411xe_flash.icf
│   │   │   │   │   │   ├── stm32f411xe_sram.icf
│   │   │   │   │   │   ├── stm32f412cx_flash.icf
│   │   │   │   │   │   ├── stm32f412cx_sram.icf
│   │   │   │   │   │   ├── stm32f412rx_flash.icf
│   │   │   │   │   │   ├── stm32f412rx_sram.icf
│   │   │   │   │   │   ├── stm32f412vx_flash.icf
│   │   │   │   │   │   ├── stm32f412vx_sram.icf
│   │   │   │   │   │   ├── stm32f412zx_flash.icf
│   │   │   │   │   │   ├── stm32f412zx_sram.icf
│   │   │   │   │   │   ├── stm32f413xx_flash.icf
│   │   │   │   │   │   ├── stm32f413xx_sram.icf
│   │   │   │   │   │   ├── stm32f415xx_flash.icf
│   │   │   │   │   │   ├── stm32f415xx_sram.icf
│   │   │   │   │   │   ├── stm32f417xx_flash.icf
│   │   │   │   │   │   ├── stm32f417xx_sram.icf
│   │   │   │   │   │   ├── stm32f423xx_flash.icf
│   │   │   │   │   │   ├── stm32f423xx_sram.icf
│   │   │   │   │   │   ├── stm32f427xx_flash.icf
│   │   │   │   │   │   ├── stm32f427xx_sram.icf
│   │   │   │   │   │   ├── stm32f429xx_flash.icf
│   │   │   │   │   │   ├── stm32f429xx_sram.icf
│   │   │   │   │   │   ├── stm32f437xx_flash.icf
│   │   │   │   │   │   ├── stm32f437xx_sram.icf
│   │   │   │   │   │   ├── stm32f439xx_flash.icf
│   │   │   │   │   │   ├── stm32f439xx_sram.icf
│   │   │   │   │   │   ├── stm32f446xx_flash.icf
│   │   │   │   │   │   ├── stm32f446xx_sram.icf
│   │   │   │   │   │   ├── stm32f469xx_flash.icf
│   │   │   │   │   │   ├── stm32f469xx_sram.icf
│   │   │   │   │   │   ├── stm32f479xx_flash.icf
│   │   │   │   │   │   └── stm32f479xx_sram.icf
│   │   │   │   │   ├── startup_stm32f401xc.s
│   │   │   │   │   ├── startup_stm32f401xe.s
│   │   │   │   │   ├── startup_stm32f405xx.s
│   │   │   │   │   ├── startup_stm32f407xx.s
│   │   │   │   │   ├── startup_stm32f410cx.s
│   │   │   │   │   ├── startup_stm32f410rx.s
│   │   │   │   │   ├── startup_stm32f410tx.s
│   │   │   │   │   ├── startup_stm32f411xe.s
│   │   │   │   │   ├── startup_stm32f412cx.s
│   │   │   │   │   ├── startup_stm32f412rx.s
│   │   │   │   │   ├── startup_stm32f412vx.s
│   │   │   │   │   ├── startup_stm32f412zx.s
│   │   │   │   │   ├── startup_stm32f413xx.s
│   │   │   │   │   ├── startup_stm32f415xx.s
│   │   │   │   │   ├── startup_stm32f417xx.s
│   │   │   │   │   ├── startup_stm32f423xx.s
│   │   │   │   │   ├── startup_stm32f427xx.s
│   │   │   │   │   ├── startup_stm32f429xx.s
│   │   │   │   │   ├── startup_stm32f437xx.s
│   │   │   │   │   ├── startup_stm32f439xx.s
│   │   │   │   │   ├── startup_stm32f446xx.s
│   │   │   │   │   ├── startup_stm32f469xx.s
│   │   │   │   │   └── startup_stm32f479xx.s
│   │   │   │   └── Include
│   │   │   │   ├── cmsis_armcc.h
│   │   │   │   ├── cmsis_armclang.h
│   │   │   │   ├── cmsis_compiler.h
│   │   │   │   ├── cmsis_gcc.h
│   │   │   │   ├── cmsis_iccarm.h
│   │   │   │   ├── cmsis_version.h
│   │   │   │   ├── core_armv8mbl.h
│   │   │   │   ├── core_armv8mml.h
│   │   │   │   ├── core_cm0.h
│   │   │   │   ├── core_cm0plus.h
│   │   │   │   ├── core_cm1.h
│   │   │   │   ├── core_cm23.h
│   │   │   │   ├── core_cm33.h
│   │   │   │   ├── core_cm3.h
│   │   │   │   ├── core_cm4.h
│   │   │   │   ├── core_cm7.h
│   │   │   │   ├── core_sc000.h
│   │   │   │   ├── core_sc300.h
│   │   │   │   ├── mpu_armv7.h
│   │   │   │   ├── mpu_armv8.h
│   │   │   │   └── tz_context.h
│   │   │   ├── STM32F4xx_HAL_Driver
│   │   │   │   ├── Inc
│   │   │   │   │   ├── Legacy
│   │   │   │   │   │   └── stm32_hal_legacy.h
│   │   │   │   │   ├── stm32f4xx_hal_cortex.h
│   │   │   │   │   ├── stm32f4xx_hal_def.h
│   │   │   │   │   ├── stm32f4xx_hal_dma_ex.h
│   │   │   │   │   ├── stm32f4xx_hal_dma.h
│   │   │   │   │   ├── stm32f4xx_hal_exti.h
│   │   │   │   │   ├── stm32f4xx_hal_flash_ex.h
│   │   │   │   │   ├── stm32f4xx_hal_flash.h
│   │   │   │   │   ├── stm32f4xx_hal_flash_ramfunc.h
│   │   │   │   │   ├── stm32f4xx_hal_gpio_ex.h
│   │   │   │   │   ├── stm32f4xx_hal_gpio.h
│   │   │   │   │   ├── stm32f4xx_hal.h
│   │   │   │   │   ├── stm32f4xx_hal_hcd.h
│   │   │   │   │   ├── stm32f4xx_hal_pwr_ex.h
│   │   │   │   │   ├── stm32f4xx_hal_pwr.h
│   │   │   │   │   ├── stm32f4xx_hal_rcc_ex.h
│   │   │   │   │   ├── stm32f4xx_hal_rcc.h
│   │   │   │   │   ├── stm32f4xx_hal_tim_ex.h
│   │   │   │   │   ├── stm32f4xx_hal_tim.h
│   │   │   │   │   ├── stm32f4xx_hal_uart.h
│   │   │   │   │   └── stm32f4xx_ll_usb.h
│   │   │   │   └── Src
│   │   │   │   ├── stm32f4xx_hal.c
│   │   │   │   ├── stm32f4xx_hal_cortex.c
│   │   │   │   ├── stm32f4xx_hal_dma.c
│   │   │   │   ├── stm32f4xx_hal_dma_ex.c
│   │   │   │   ├── stm32f4xx_hal_exti.c
│   │   │   │   ├── stm32f4xx_hal_flash.c
│   │   │   │   ├── stm32f4xx_hal_flash_ex.c
│   │   │   │   ├── stm32f4xx_hal_flash_ramfunc.c
│   │   │   │   ├── stm32f4xx_hal_gpio.c
│   │   │   │   ├── stm32f4xx_hal_hcd.c
│   │   │   │   ├── stm32f4xx_hal_pwr.c
│   │   │   │   ├── stm32f4xx_hal_pwr_ex.c
│   │   │   │   ├── stm32f4xx_hal_rcc.c
│   │   │   │   ├── stm32f4xx_hal_rcc_ex.c
│   │   │   │   ├── stm32f4xx_hal_tim.c
│   │   │   │   ├── stm32f4xx_hal_tim_ex.c
│   │   │   │   ├── stm32f4xx_hal_uart.c
│   │   │   │   └── stm32f4xx_ll_usb.c
│   │   │   └── USB_HOST
│   │   │   ├── App
│   │   │   │   ├── usb_host.c
│   │   │   │   └── usb_host.h
│   │   │   └── Target
│   │   │   ├── usbh_conf.c
│   │   │   └── usbh_conf.h
│   │   ├── hal
│   │   │   ├── hal_uart.c
│   │   │   └── hal_uart.h
│   │   ├── middlewares
│   │   │   ├── ST
│   │   │   │   └── STM32_USB_Host_Library
│   │   │   │   ├── Class
│   │   │   │   │   └── CDC
│   │   │   │   │   ├── Inc
│   │   │   │   │   │   └── usbh_cdc.h
│   │   │   │   │   └── Src
│   │   │   │   │   └── usbh_cdc.c
│   │   │   │   └── Core
│   │   │   │   ├── Inc
│   │   │   │   │   ├── usbh_core.h
│   │   │   │   │   ├── usbh_ctlreq.h
│   │   │   │   │   ├── usbh_def.h
│   │   │   │   │   ├── usbh_ioreq.h
│   │   │   │   │   └── usbh_pipes.h
│   │   │   │   └── Src
│   │   │   │   ├── usbh_core.c
│   │   │   │   ├── usbh_ctlreq.c
│   │   │   │   ├── usbh_ioreq.c
│   │   │   │   └── usbh_pipes.c
│   │   │   └── Third_Party
│   │   │   └── FreeRTOS
│   │   │   └── Source
│   │   │   ├── CMSIS_RTOS
│   │   │   │   ├── cmsis_os.c
│   │   │   │   └── cmsis_os.h
│   │   │   ├── croutine.c
│   │   │   ├── event_groups.c
│   │   │   ├── include
│   │   │   │   ├── atomic.h
│   │   │   │   ├── croutine.h
│   │   │   │   ├── deprecated_definitions.h
│   │   │   │   ├── event_groups.h
│   │   │   │   ├── FreeRTOS.h
│   │   │   │   ├── list.h
│   │   │   │   ├── message_buffer.h
│   │   │   │   ├── mpu_prototypes.h
│   │   │   │   ├── mpu_wrappers.h
│   │   │   │   ├── portable.h
│   │   │   │   ├── projdefs.h
│   │   │   │   ├── queue.h
│   │   │   │   ├── semphr.h
│   │   │   │   ├── stack_macros.h
│   │   │   │   ├── StackMacros.h
│   │   │   │   ├── stream_buffer.h
│   │   │   │   ├── task.h
│   │   │   │   └── timers.h
│   │   │   ├── list.c
│   │   │   ├── portable
│   │   │   │   ├── GCC
│   │   │   │   │   └── ARM_CM4F
│   │   │   │   │   ├── port.c
│   │   │   │   │   └── portmacro.h
│   │   │   │   ├── MemMang
│   │   │   │   │   └── heap_4.c
│   │   │   │   └── RVDS
│   │   │   │   ├── ARM7_LPC21xx
│   │   │   │   │   ├── portASM.s
│   │   │   │   │   ├── port.c
│   │   │   │   │   ├── portmacro.h
│   │   │   │   │   └── portmacro.inc
│   │   │   │   ├── ARM_CA9
│   │   │   │   │   ├── portASM.s
│   │   │   │   │   ├── port.c
│   │   │   │   │   ├── portmacro.h
│   │   │   │   │   └── portmacro.inc
│   │   │   │   ├── ARM_CM0
│   │   │   │   │   ├── port.c
│   │   │   │   │   └── portmacro.h
│   │   │   │   ├── ARM_CM3
│   │   │   │   │   ├── port.c
│   │   │   │   │   └── portmacro.h
│   │   │   │   ├── ARM_CM4F
│   │   │   │   │   ├── port.c
│   │   │   │   │   └── portmacro.h
│   │   │   │   ├── ARM_CM4_MPU
│   │   │   │   │   ├── port.c
│   │   │   │   │   └── portmacro.h
│   │   │   │   └── ARM_CM7
│   │   │   │   ├── r0p1
│   │   │   │   │   ├── port.c
│   │   │   │   │   └── portmacro.h
│   │   │   │   └── ReadMe.txt
│   │   │   ├── queue.c
│   │   │   ├── stream_buffer.c
│   │   │   ├── tasks.c
│   │   │   └── timers.c
│   │   ├── project
│   │   │   ├── armgcc
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── STM32F407VGTX_FLASH.ld
│   │   │   │   └── stm32f4discovery.cfg
│   │   │   ├── mdk
│   │   │   │   ├── mdk_app.sct
│   │   │   │   └── mdk_app.uvprojx
│   │   │   └── mdk_bootloader
│   │   │   └── mdk_bootloader.uvprojx
│   │   └── readme.txt
│   └── sample_c++
│   ├── module_sample
│   │   ├── camera_manager
│   │   │   ├── test_camera_manager_entry.cpp
│   │   │   └── test_camera_manager_entry.h
│   │   ├── flight_controller
│   │   │   ├── config
│   │   │   │   └── flying_config.json
│   │   │   ├── test_flight_controller_command_flying.cpp
│   │   │   ├── test_flight_controller_command_flying.h
│   │   │   ├── test_flight_controller_entry.cpp
│   │   │   └── test_flight_controller_entry.h
│   │   ├── gimbal
│   │   │   ├── test_gimbal_entry.cpp
│   │   │   └── test_gimbal_entry.hpp
│   │   ├── hms_manager
│   │   │   ├── hms_manager_entry.cpp
│   │   │   └── hms_manager_entry.h
│   │   ├── liveview
│   │   │   ├── data
│   │   │   │   ├── haarcascade_frontalface_alt.xml
│   │   │   │   └── tensorflow
│   │   │   │   ├── frozen_inference_graph.pb
│   │   │   │   └── ssd_inception_v2_coco_2017_11_17.pbtxt
│   │   │   ├── dji_camera_image_handler.cpp
│   │   │   ├── dji_camera_image_handler.hpp
│   │   │   ├── dji_camera_stream_decoder.cpp
│   │   │   ├── dji_camera_stream_decoder.hpp
│   │   │   ├── test_liveview.cpp
│   │   │   ├── test_liveview_entry.cpp
│   │   │   ├── test_liveview_entry.hpp
│   │   │   └── test_liveview.hpp
│   │   └── perception
│   │   ├── test_perception.cpp
│   │   ├── test_perception_entry.cpp
│   │   ├── test_perception_entry.hpp
│   │   └── test_perception.hpp
│   └── platform
│   └── linux
│   ├── common
│   │   ├── 3rdparty
│   │   │   ├── FindFFMPEG.cmake
│   │   │   ├── FindLIBUSB.cmake
│   │   │   └── FindOPUS.cmake
│   │   └── osal
│   │   ├── osal.c
│   │   ├── osal_fs.c
│   │   ├── osal_fs.h
│   │   ├── osal.h
│   │   ├── osal_socket.c
│   │   └── osal_socket.h
│   ├── manifold2
│   │   ├── application
│   │   │   ├── application.cpp
│   │   │   ├── application.hpp
│   │   │   ├── dji_sdk_app_info.h
│   │   │   ├── dji_sdk_config.h
│   │   │   ├── dji_sdk_config.json
│   │   │   └── main.cpp
│   │   ├── CMakeLists.txt
│   │   └── hal
│   │   ├── hal_network.c
│   │   ├── hal_network.h
│   │   ├── hal_uart.c
│   │   ├── hal_uart.h
│   │   ├── hal_usb_bulk.c
│   │   └── hal_usb_bulk.h
│   └── nvidia_jetson
│   ├── application
│   │   ├── application.cpp
│   │   ├── application.hpp
│   │   ├── dji_sdk_app_info.h
│   │   ├── dji_sdk_config.h
│   │   └── main.cpp
│   ├── CMakeLists.txt
│   └── hal
│   ├── hal_network.c
│   ├── hal_network.h
│   ├── hal_uart.c
│   ├── hal_uart.h
│   ├── hal_usb_bulk.c
│   └── hal_usb_bulk.h
└── tools
└── file2c
├── file2c.exe
└── readme.txt
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/.
-------------------------------------------------------------
Copyright (c) 2021 DJI.
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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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.
===============================================================
DJI’s Payload SDK uses libraries of List and MD5, whose license is as below.
-------------------------------------------------------------
crypto-algorithms
=================
About
---
These are basic implementations of standard cryptography algorithms, written by Brad Conte (brad@bradconte.com) from
scratch and without any cross-licensing. They exist to provide publically accessible, restriction-free implementations
of popular cryptographic algorithms, like AES and SHA-1. These are primarily intended for educational and pragmatic
purposes (such as comparing a specification to actual implementation code, or for building an internal application
that computes test vectors for a product). The algorithms have been tested against standard test vectors.
This code is released into the public domain free of any restrictions. The author requests acknowledgement if the code
is used, but does not require it. This code is provided free of any liability and without any quality claims by the
author.
Note that these are *not* cryptographically secure implementations. They have no resistence to side-channel attacks
and should not be used in contexts that need cryptographically secure implementations.
These algorithms are not optimized for speed or space. They are primarily designed to be easy to read, although some
basic optimization techniques have been employed.
Building
The source code for each algorithm will come in a pair of a source code file and a header file. There should be no
inter-header file dependencies, no additional libraries, no platform-specific header files, or any other complicating
matters. Compiling them should be as easy as adding the relevent source code to the project.
===============================================================
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.
-------------------------------------------------------------
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"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.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"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.
"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).
"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.
"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."
"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.
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.
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.
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:
You must give any other recipients of the Work or Derivative Works a copy of this License; and
You must cause any modified files to carry prominent notices stating that You changed the files; and
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
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.
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.
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.
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.
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.
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.
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.
END OF TERMS AND CONDITIONS
===============================================================
DJI’s Payload SDK uses unmodified libraries of cJSON, whose license is as below.
-------------------------------------------------------------
Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
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:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
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.
===============================================================
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.
-------------------------------------------------------------
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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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.
===============================================================
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.
-------------------------------------------------------------
Note: This license has also been called the "New BSD License" or "Modified BSD License". See also the 2-clause BSD License.
Copyright <YEAR> <COPYRIGHT HOLDER>
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
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.
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.
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.
===============================================================
DJI’s Payload SDK uses unmodified libraries of STM32_USB_Host_Library, whose license is as below.
-------------------------------------------------------------
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:
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.
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.
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.
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.
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.
6. STMicroelectronics has no obligation to provide any maintenance, support or updates for the software.
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.
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.
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.
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.
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.
... ...
# DJI Payload SDK (PSDK)
![](https://img.shields.io/badge/version-V3.10.0-red.svg)
![](https://img.shields.io/badge/platform-linux_|_rtos-blue.svg)
![](https://img.shields.io/badge/license-MIT-purple.svg)
## What is the DJI Payload SDK?
The DJI Payload SDK(PSDK), is a development kit provided by DJI to support developers to develop payload that can be
mounted on DJI drones. Combined with the X-Port, SkyPort or extension port adapter, developers can obtain the
information or other resource from the drone. According to the software logic and algorithm framework designed by the
developer, users could develop payload that can be mounted on DJI Drone, to perform actions they need, such as Automated
Flight Controller, Payload Controller, Video Image Analysis Platform, Mapping Camera, Megaphone And Searchlight, etc.
## Documentation
For full documentation, please visit
the [DJI Developer Documentation](https://developer.dji.com/doc/payload-sdk-tutorial/en/). Documentation regarding the
code can be found in the [PSDK API Reference](https://developer.dji.com/doc/payload-sdk-api-reference/en/)
section of the developer's website. Please visit
the [Latest Version Information](https://developer.dji.com/doc/payload-sdk-tutorial/en/)
to get the latest version information.
## Latest Release
The latest release version of PSDK is 3.10.0. This version of Payload SDK mainly add some new features support and fixed some
bugs. Please refer to the release notes for detailed changes list.
* Supports Matrice 4T/4E models
* Supports DJI SDK Certified Chip (DJI SDK CC).
## License
Payload SDK codebase is MIT-licensed. Please refer to the LICENSE file for detailed information.
## Support
You can get official support from DJI and the community with the following methods:
- Post questions on Developer Forum
* [DJI SDK Developer Forum(Cn)](https://djisdksupport.zendesk.com/hc/zh-cn/community/topics)
* [DJI SDK Developer Forum(En)](https://djisdksupport.zendesk.com/hc/en-us/community/topics)
- Submit a request describing your problem on Developer Support
* [DJI SDK Developer Support(Cn)](https://djisdksupport.zendesk.com/hc/zh-cn/requests/new)
* [DJI SDK Developer Support(En)](https://djisdksupport.zendesk.com/hc/en-us/requests/new)
You can also communicate with other developers by the following methods:
- Post questions on [**Stackoverflow**](http://stackoverflow.com) using [**
dji-sdk**](http://stackoverflow.com/questions/tagged/dji-sdk) tag
## About Pull Request
As always, the DJI Dev Team is committed to improving your developer experience, and we also welcome your contribution,
but the code review of any pull request maybe not timely, when you have any questionplease send an email to dev@dji.com.
... ...
/**
********************************************************************
* @file dji_sdk_template.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJI’s authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "dji_sdk_template.h"
/* Private constants ---------------------------------------------------------*/
#define MAX_PACKAGE_LEN 256
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static uint8_t s_SendBuffer[DJI_TEMPLATE_MAX_BUFFER_SIZE];
/* Private functions declaration ---------------------------------------------*/
static int DjiTemplate_PrivateSend(const uint8_t *buffer, uint16_t len);
/* Exported functions definition ---------------------------------------------*/
/**
* @brief DJI protocol initialization.
* @param None.
* @return None.
*/
void DjiSdkTemplate_Init(void)
{
/* NOTE : This function should be implemented in the user file. */
}
/**
* @brief Send data function.
* @param buffer : the buffer point send data
* @param len : send data length
* @return if >= 0, indicate the real send data length; if < 0, indicate the -ErrorCode for send failure reason.
*/
int DjiSdkTemplate_Send(const uint8_t *buffer, uint16_t len)
{
uint16_t realLen;
if (len > MAX_PACKAGE_LEN) {
realLen = MAX_PACKAGE_LEN;
} else {
realLen = len;
}
DjiTemplate_PrivateSend(buffer, len);
return realLen;
}
/* Private functions definition-----------------------------------------------*/
/**
* @brief DJI low level send function.
* @param buffer Pointer to send data buffer.
* @param len Size of data to be sent.
* @return Size of data to be sent.
*/
static int DjiTemplate_PrivateSend(const uint8_t *buffer, uint16_t len)
{
/* NOTE : This function should be implemented in the user file. */
return len;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/
... ...
/**
********************************************************************
* @file dji_sdk_template.h
* @brief This is the header file for "dji_sdk_template.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJI’s authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef DJI_SDK_TEMPLATE_H
#define DJI_SDK_TEMPLATE_H
/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
#define DJI_TEMPLATE_MAX_BUFFER_SIZE 256
/**
* @defgroup psdk_some_flag
* @{
*/
#define DJI_TEMPLATE_SUCCESS (0)
#define DJI_TEMPLATE_FAILURE (-1)
#define DJI_SOME_FLAG_AAA 1 /*!< Define line comment. */
#define DJI_SOME_FLAG_BBB 2 /*!< Define line comment,
if comment is too long, split line. */
#define DJI_SOME_FLAG_CCC 3
#define IS_DJI_SOME_FLAG(FLAG) (((FLAG) == DJI_SOME_FLAG_AAA) || \
((FLAG) == DJI_SOME_FLAG_BBB) || \
((FLAG) == DJI_SOME_FLAG_CCC))
/**
* @}
*/
#define DJI_TEMPLATE_MIN(a, b) (((a)<(b))?(a):(b))
/* Exported types ------------------------------------------------------------*/
/**
* @brief Enum brief comment.
*/
typedef enum {
TEMPLATE_COLOR_RED = 0,
TEMPLATE_COLOR_GREED = 1,
TEMPLATE_COLOR_BLUE = 2,
} E_TemplateColor;
/**
* @brief Struct brief comment.
*/
typedef struct {
uint8_t structMember1; /*!< structure member comment. */
uint8_t longStructMember2; /*!< structure member comment. */
uint8_t someFlag; /*!< if this value use marco define ,must use defgroup to indicate, and comment here
use ref. for example:
someFlag of DJI template. This parameter can be a value of @ref psdk_some_flag */
} T_StructDefine;
typedef void (*DjiTemplateFunc)(void);
typedef int Inttype;
/* Use pack(1) to transfer structure. */
#pragma pack(1)
typedef struct {
uint8_t structMember1;
uint32_t structMember2;
} T_StructProtocolCommunication;
#pragma pack()
/* Exported functions --------------------------------------------------------*/
void DjiSdkTemplate_Init(void);
int DjiSdkTemplate_Send(const uint8_t *buffer, uint16_t len);
#ifdef __cplusplus
}
#endif
#endif // DJI_SDK_TEMPLATE_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
... ...
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.
For more details, please visit: https://developer.dji.com/doc/payload-sdk-tutorial/en/model-instruction/payload-develop-criterion.html#structural-design-standards
... ...
/**
********************************************************************
* @file dji_aircraft_info.h
* @brief This is the header file for "dji_aircraft_info.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJI’s authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef DJI_AIRCRAFT_INFO_H
#define DJI_AIRCRAFT_INFO_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/**
* @brief Information related to mobile APP.
*/
typedef struct {
E_DjiMobileAppLanguage appLanguage; /*!< Mobile APP system language */
E_DjiMobileAppScreenType appScreenType; /*!< Mobile APP screen size type. */
} T_DjiMobileAppInfo;
/**
* @brief Basic information about the aircraft system, mainly including some constant parameters information.
*/
typedef struct {
E_DjiAircraftSeries aircraftSeries; /*!< Aircraft series. */
E_DjiMountPositionType mountPositionType; /*!< Mount position type. */
E_DjiAircraftType aircraftType; /*!< Aircraft type. */
E_DjiSdkAdapterType djiAdapterType; /*!< DJI adapter type. */
E_DjiMountPosition mountPosition; /*!< Payload mount position. */
} T_DjiAircraftInfoBaseInfo;
/**
* @brief Aircraft version information.
*/
typedef struct {
uint8_t debugVersion;
uint8_t modifyVersion;
uint8_t minorVersion;
uint8_t majorVersion;
} T_DjiAircraftVersion;
/* Exported functions --------------------------------------------------------*/
/**
* @brief Basic information about the aircraft system, including aircraft type and DJI adapter type.
* @param baseInfo: Pointer to a memory space where the aircraft's basic information will be stored.
* @return Execution result.
*/
T_DjiReturnCode DjiAircraftInfo_GetBaseInfo(T_DjiAircraftInfoBaseInfo *baseInfo);
/**
* @brief Get information related to mobile app.
* @note Returns unknown for app language and screen type if the RC or app is not connected to the aircraft system.
* @param mobileAppInfo: Pointer to a memory space where the mobile app information will be stored.
* @return Execution result.
*/
T_DjiReturnCode DjiAircraftInfo_GetMobileAppInfo(T_DjiMobileAppInfo *mobileAppInfo);
/**
* @brief Get connection status between the payload and the aircraft.
* @note Update period: 1Hz
* @param isConnected: Pointer to connection status.
* @return Execution result.
*/
T_DjiReturnCode DjiAircraftInfo_GetConnectionStatus(bool *isConnected);
/**
* @brief Get version of the aircraft.
* @param aircraftVersion: Pointer to aircraft version.
* @return Execution result.
*/
T_DjiReturnCode DjiAircraftInfo_GetAircraftVersion(T_DjiAircraftVersion *aircraftVersion);
#ifdef __cplusplus
}
#endif
#endif //DJI_AIRCRAFT_INFO_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
... ...
/**
********************************************************************
* @file dji_camera_manager.h
* @brief This is the header file for "dji_camera_manager.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJI’s authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef DJI_CAMERA_MANAGER_H
#define DJI_CAMERA_MANAGER_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/*! @brief CameraModule work modes.
*/
typedef enum {
/*!
- Capture mode. In this mode, the user can capture pictures.
*/
DJI_CAMERA_MANAGER_WORK_MODE_SHOOT_PHOTO = 0,
/*!
- Record mode. In this mode, the user can record videos.
*/
DJI_CAMERA_MANAGER_WORK_MODE_RECORD_VIDEO = 1,
/*!
- Playback mode. In this mode, the user can preview photos and videos, and
can delete files. It is supported by Phantom 3 Professional camera, X3, X5
and X5R cameras on aircraft and Phantom 4 camera. Playback mode is not
supported by Z30, X5S, X4S, Phantom 4 Pro, Mavic Pro, Phantom 3 Standard,
Phantom 3 Advanced, Phantom 3 4K and Osmo series.
*/
DJI_CAMERA_MANAGER_WORK_MODE_PLAYBACK = 2,
/*!
- In this mode, the user can download media to the Mobile Device. Not
supported by X5 camera nor X5R camera while mounted on aircraft.
*/
DJI_CAMERA_MANAGER_WORK_MODE_MEDIA_DOWNLOAD = 3,
/*!
- In this mode, live stream resolution and frame rate will be 1080i50 (PAL)
or 720p60 (NTSC). In this mode videos can be recorded. Still photos can
also be taken only when video is recording. The only way to exit broadcast
mode is to change modes to RECORD_VIDEO. Only supported by Inspire 2.
*/
DJI_CAMERA_MANAGER_WORK_MODE_BROADCAST = 4,
/*!
* The camera work mode is unknown.
*/
DJI_CAMERA_MANAGER_WORK_MODE_WORK_MODE_UNKNOWN = 0xFF,
} E_DjiCameraManagerWorkMode;
/*! @brief The ShootPhoto mode itself can have several modes. The default
* value is SINGLE.
*/
typedef enum {
/*!
- Sets the camera to take a single photo.
*/
DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_SINGLE = 0x01,
/*!
- Sets the camera to take an HDR photo. X5 camera, X5R camera, XT camera,
Z30 camera, Phantom 4 Pro camera, X4S camera and X5S camera do not support
HDR mode.
*/
DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_HDR = 0x02,
/*!
- Set the camera to take multiple photos at once. XT camera does not
support Burst mode.
*/
DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_BURST = 0x04,
/*!
- Automatic Exposure Bracketing (AEB) capture. In this mode you can quickly
take multiple shots (the default is 3) at different exposures without
having to manually change any settings between frames. XT camera and Z30
camera does not support AEB mode.
*/
DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_AEB = 0x05,
/*!
- Sets the camera to take a picture (or multiple pictures) continuously at
a set time interval. The minimum interval for JPEG format of any quality is
2s. For all cameras except X4S, X5S and Phantom 4 Pro camera: The minimum
interval for RAW or RAW+JPEG format is 10s. For the X4S, X5S and Phantom 4
Pro cameras the minimum interval for RAW or RAW+JPEG dformat is 5s.
*/
DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_INTERVAL = 0x06,
/*!
- Sets the camera to take a burst of RAW photos. Use getRAWPhotoBurstCount
to check how many photos have been shot. Only supported by X5S.
*/
DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_RAW_BURST = 0x09,
/*!
- Sets the camera to take an regional photos. It is supported by H20/H20T.
*/
DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_REGIONAL_SR = 0x16,
/*!
- The shoot photo mode is unknown.
*/
DJI_CAMERA_MANAGER_SHOOT_PHOTO_MODE_UNKNOWN = 0xFF,
} E_DjiCameraManagerShootPhotoMode;
/*! @brief the photo action of INTERVAL shooting photo mode
*/
typedef enum {
DJI_CAMERA_MANAGER_EXPOSURE_MODE_PROGRAM_AUTO = 1, /*!< Program mode */
DJI_CAMERA_MANAGER_EXPOSURE_MODE_SHUTTER_PRIORITY = 2, /*!< Shutter priority mode */
DJI_CAMERA_MANAGER_EXPOSURE_MODE_APERTURE_PRIORITY = 3, /*!< Aperture priority mode */
DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL = 4, /*!< Manual mode */
DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_UNKNOWN = 0xFF /*!< The camera exposure mode is unknown. */
} E_DjiCameraManagerExposureMode;
/*! @brief CameraModule focus mode. If the physical AF switch on the camera is
* set to auto.
*/
typedef enum {
/*!
- The camera's focus mode is set to manual. In this mode, user sets the
focus ring value to adjust the focal distance.
*/
DJI_CAMERA_MANAGER_FOCUS_MODE_MANUAL = 0,
/*!
- The camera's focus mode is set to auto. For the Z30 camera, the focus is
calculated completely automatically. For all other cameras, a focus target
can be set by the user, which is used to calculate focus automatically.
*/
DJI_CAMERA_MANAGER_FOCUS_MODE_AUTO = 1,
/*!
- The camera's focus mode is set to Continuous AF. It is only supported by
Mavic Pro with firmware version V01.03.0000 or above, X4S camera, Mavic 2
Zoom camera and Mavic 2 Pro camera.
*/
DJI_CAMERA_MANAGER_FOCUS_MODE_AFC = 2,
/*!
- The camera's focus mode is unknown.
*/
DJI_CAMERA_MANAGER_FOCUS_MODE_UNKNOWN = 0xFF,
} E_DjiCameraManagerFocusMode;
/*! @brief CameraModule shutter mode.
*/
typedef enum {
/*! The shutter mode of camera is automatical */
DJI_CAMERA_MANAGER_SHUTTER_AUTO_MODE = 0x00,
/*! The shutter mode of camera is manual, the shutter speed setting is
valid. */
DJI_CAMERA_MANAGER_SHUTTER_MANUAL_MODE = 0x01,
} E_DjiCameraManagerShutterMode;
/*! @brief CameraModule shutter speed values.
*/
typedef enum {
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_8000 = 0, /*!< 1/8000 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_6400 = 1, /*!< 1/6400 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_6000 = 2, /*!< 1/6000 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_5000 = 3, /*!< 1/5000 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_4000 = 4, /*!< 1/4000 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_3200 = 5, /*!< 1/3200 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_3000 = 6, /*!< 1/3000 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_2500 = 7, /*!< 1/2500 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_2000 = 8, /*!< 1/2000 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1600 = 9, /*!< 1/1600 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1500 = 10, /*!< 1/1500 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1250 = 11, /*!< 1/1250 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1000 = 12, /*!< 1/1000 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_800 = 13, /*!< 1/800 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_725 = 14, /*!< 1/725 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_640 = 15, /*!< 1/640 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_500 = 16, /*!< 1/500 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_400 = 17, /*!< 1/400 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_350 = 18, /*!< 1/350 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_320 = 19, /*!< 1/320 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_250 = 20, /*!< 1/250 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_240 = 21, /*!< 1/240 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_200 = 22, /*!< 1/200 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_180 = 23, /*!< 1/180 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_160 = 24, /*!< 1/160 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_125 = 25, /*!< 1/125 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_120 = 26, /*!< 1/120 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_100 = 27, /*!< 1/100 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_90 = 28, /*!< 1/90 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_80 = 29, /*!< 1/80 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_60 = 30, /*!< 1/60 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_50 = 31, /*!< 1/50 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_40 = 32, /*!< 1/40 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_30 = 33, /*!< 1/30 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_25 = 34, /*!< 1/25 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_20 = 35, /*!< 1/20 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_15 = 36, /*!< 1/15 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_12DOT5 = 37, /*!< 1/12.5 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_10 = 38, /*!< 1/10 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_8 = 39, /*!< 1/8 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_6DOT25 = 40, /*!< 1/6.25 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_5 = 41, /*!< 1/5 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_4 = 42, /*!< 1/4 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_3 = 43, /*!< 1/3 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_2DOT5 = 44, /*!< 1/2.5 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_2 = 45, /*!< 1/2 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1DOT67 = 46, /*!< 1/1.67 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1_1DOT25 = 47, /*!< 1/1.25 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1 = 48, /*!< 1.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1DOT3 = 49, /*!< 1.3 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_1DOT6 = 50, /*!< 1.6 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_2 = 51, /*!< 2.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_2DOT5 = 52, /*!< 2.5 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_3 = 53, /*!< 3.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_3DOT2 = 54, /*!< 3.2 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_4 = 55, /*!< 4.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_5 = 56, /*!< 5.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_6 = 57, /*!< 6.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_7 = 58, /*!< 7.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_8 = 59, /*!< 8.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_9 = 60, /*!< 9.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_10 = 61, /*!< 10.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_13 = 62, /*!< 13.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_15 = 63, /*!< 15.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_20 = 64, /*!< 20.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_25 = 65, /*!< 25.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_30 = 66, /*!< 30.0 s */
DJI_CAMERA_MANAGER_SHUTTER_SPEED_UNKNOWN = 0xFF, /*!< Unknown */
} E_DjiCameraManagerShutterSpeed;
/*! @brief CameraModule ISO values.
*/
typedef enum {
/*! The ISO value is automatically set. This cannot be used for all cameras
when in Manual mode. */
DJI_CAMERA_MANAGER_ISO_AUTO = 0x00,
/*! The ISO value is set to 100. */
DJI_CAMERA_MANAGER_ISO_100 = 0x03,
/*! The ISO value is set to 200. */
DJI_CAMERA_MANAGER_ISO_200 = 0x04,
/*! The ISO value is set to 400.*/
DJI_CAMERA_MANAGER_ISO_400 = 0x05,
/*! The ISO value is set to 800.*/
DJI_CAMERA_MANAGER_ISO_800 = 0x06,
/*! The ISO value is set to 1600.*/
DJI_CAMERA_MANAGER_ISO_1600 = 0x07,
/*! The ISO value is set to 3200.*/
DJI_CAMERA_MANAGER_ISO_3200 = 0x08,
/*! The ISO value is set to 6400.*/
DJI_CAMERA_MANAGER_ISO_6400 = 0x09,
/*! The ISO value is set to 12800.*/
DJI_CAMERA_MANAGER_ISO_12800 = 0x0A,
/*! The ISO value is set to 25600.*/
DJI_CAMERA_MANAGER_ISO_25600 = 0x0B,
/*! ISO value is fixed by the camera firmware. When the camera color is set
to D_LOG, camera will fix the ISO to a specific value in order to optimize
the performance.
*/
DJI_CAMERA_MANAGER_ISO_FIXED = 0xFF,
} E_DjiCameraManagerISO;
/*! @brief CameraModule exposure compensation.
*/
typedef enum {
/*! The camera's exposure compensation is -5.0ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_5_0 = 1,
/*! The camera's exposure compensation is -4.7ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_4_7 = 2,
/*! The camera's exposure compensation is -4.3ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_4_3 = 3,
/*! The camera's exposure compensation is -4.0ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_4_0 = 4,
/*! The camera's exposure compensation is -3.7ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_3_7 = 5,
/*! The camera's exposure compensation is -3.3ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_3_3 = 6,
/*! The camera's exposure compensation is -3.0ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_3_0 = 7,
/*! The camera's exposure compensation is -2.7ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_2_7 = 8,
/*! The camera's exposure compensation is -2.3ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_2_3 = 9,
/*! The camera's exposure compensation is -2.0ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_2_0 = 10,
/*! The camera's exposure compensation is -1.7ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_1_7 = 11,
/*! The camera's exposure compensation is -1.3ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_1_3 = 12,
/*! The camera's exposure compensation is -1.0ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_1_0 = 13,
/*! The camera's exposure compensation is -0.7ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_0_7 = 14,
/*! The camera's exposure compensation is -0.3ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_0_3 = 15,
/*! The camera's exposure compensation is 0.0ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_N_0_0 = 16,
/*! The camera's exposure compensation is +0.3ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_0_3 = 17,
/*! The camera's exposure compensation is +0.7ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_0_7 = 18,
/*! The camera's exposure compensation is +1.0ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_1_0 = 19,
/*! The camera's exposure compensation is +1.3ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_1_3 = 20,
/*! The camera's exposure compensation is +1.7ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_1_7 = 21,
/*! The camera's exposure compensation is +2.0ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_2_0 = 22,
/*! The camera's exposure compensation is +2.3ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_2_3 = 23,
/*! The camera's exposure compensation is +2.7ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_2_7 = 24,
/*! The camera's exposure compensation is +3.0ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_3_0 = 25,
/*! The camera's exposure compensation is +3.3ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_3_3 = 26,
/*! The camera's exposure compensation is +3.7ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_3_7 = 27,
/*! The camera's exposure compensation is +4.0ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_4_0 = 28,
/*! The camera's exposure compensation is +4.3ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_4_3 = 29,
/*! The camera's exposure compensation is +4.7ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_4_7 = 30,
/*! The camera's exposure compensation is +5.0ev.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_P_5_0 = 31,
/*! The camera's exposure compensation is fixed by the camera.*/
DJI_CAMERA_MANAGER_EXPOSURE_COMPENSATION_FIXED = 0xFF,
} E_DjiCameraManagerExposureCompensation;
/*! @brief CameraModule aperture values.
* @note X5, X5R, Z30, Phantom 4 Pro camera, X4S and X5S support this
* setting.
*/
typedef enum {
/*! The Aperture value is f/1.6. It is only supported by Z30
camera.*/
DJI_CAMERA_MANAGER_APERTURE_F_1_DOT_6 = 160,
/*! The Aperture value is f/1.7.*/
DJI_CAMERA_MANAGER_APERTURE_F_1_DOT_7 = 170,
/*! The Aperture value is f/1.8.*/
DJI_CAMERA_MANAGER_APERTURE_F_1_DOT_8 = 180,
/*! The Aperture value is f/2.*/
DJI_CAMERA_MANAGER_APERTURE_F_2 = 200,
/*! The Aperture value is f/2.2.*/
DJI_CAMERA_MANAGER_APERTURE_F_2_DOT_2 = 220,
/*! The Aperture value is f/2.4. It is only supported by Z30 camera.*/
DJI_CAMERA_MANAGER_APERTURE_F_2_DOT_4 = 240,
/*! The Aperture value is f/2.5.*/
DJI_CAMERA_MANAGER_APERTURE_F_2_DOT_5 = 250,
/*! The Aperture value is f/2.6.*/
DJI_CAMERA_MANAGER_APERTURE_F_2_DOT_6 = 260,
/*! The Aperture value is f/2.8.*/
DJI_CAMERA_MANAGER_APERTURE_F_2_DOT_8 = 280,
/*! The Aperture value is f/3.2.*/
DJI_CAMERA_MANAGER_APERTURE_F_3_DOT_2 = 320,
/*! The Aperture value is f/3.4.*/
DJI_CAMERA_MANAGER_APERTURE_F_3_DOT_4 = 340,
/*! The Aperture value is f/3.5.*/
DJI_CAMERA_MANAGER_APERTURE_F_3_DOT_5 = 350,
/*! The Aperture value is f/4.*/
DJI_CAMERA_MANAGER_APERTURE_F_4 = 400,
/*! The Aperture value is f/4.5.*/
DJI_CAMERA_MANAGER_APERTURE_F_4_DOT_5 = 450,
/*! The Aperture value is f/4.8.*/
DJI_CAMERA_MANAGER_APERTURE_F_4_DOT_8 = 480,
/*! The Aperture value is f/5.*/
DJI_CAMERA_MANAGER_APERTURE_F_5 = 500,
/*! The Aperture value is f/5.6.*/
DJI_CAMERA_MANAGER_APERTURE_F_5_DOT_6 = 560,
/*! The Aperture value is f/6.3.*/
DJI_CAMERA_MANAGER_APERTURE_F_6_DOT_3 = 630,
/*! The Aperture value is f/6.8.*/
DJI_CAMERA_MANAGER_APERTURE_F_6_DOT_8 = 680,
/*! The Aperture value is f/7.1.*/
DJI_CAMERA_MANAGER_APERTURE_F_7_DOT_1 = 710,
/*! The Aperture value is f/8.*/
DJI_CAMERA_MANAGER_APERTURE_F_8 = 800,
/*! The Aperture value is f/9.*/
DJI_CAMERA_MANAGER_APERTURE_F_9 = 900,
/*! The Aperture value is f/9.6.*/
DJI_CAMERA_MANAGER_APERTURE_F_9_DOT_6 = 960,
/*! The Aperture value is f/10.*/
DJI_CAMERA_MANAGER_APERTURE_F_10 = 1000,
/*! The Aperture value is f/11.*/
DJI_CAMERA_MANAGER_APERTURE_F_11 = 1100,
/*! The Aperture value is f/13.*/
DJI_CAMERA_MANAGER_APERTURE_F_13 = 1300,
/*! The Aperture value is f/14.*/
DJI_CAMERA_MANAGER_APERTURE_F_14 = 1400,
/*! The Aperture value is f/16.*/
DJI_CAMERA_MANAGER_APERTURE_F_16 = 1600,
/*! The Aperture value is f/18.*/
DJI_CAMERA_MANAGER_APERTURE_F_18 = 1800,
/*! The Aperture value is f/19.*/
DJI_CAMERA_MANAGER_APERTURE_F_19 = 1900,
/*! The Aperture value is f/20.*/
DJI_CAMERA_MANAGER_APERTURE_F_20 = 2000,
/*! The Aperture value is f/22.*/
DJI_CAMERA_MANAGER_APERTURE_F_22 = 2200,
/*! The Aperture value is Unknown. */
DJI_CAMERA_MANAGER_APERTURE_F_UNKNOWN = 0xFFFF,
} E_DjiCameraManagerAperture;
typedef enum {
DJI_CAMERA_MANAGER_RECORDING_CONTROL_STOP = 0,
DJI_CAMERA_MANAGER_RECORDING_CONTROL_BEGIN = 1,
DJI_CAMERA_MANAGER_RECORDING_CONTROL_PAUSE = 2,
DJI_CAMERA_MANAGER_RECORDING_CONTROL_RESUME = 3,
} E_DjiCameraManagerRecordingControl;
typedef enum {
DJI_CAMERA_MANAGER_FILE_LIST_COUNT_60_PER_SLICE = 60,
DJI_CAMERA_MANAGER_FILE_LIST_COUNT_120_PER_SLICE = 120,
DJI_CAMERA_MANAGER_FILE_LIST_COUNT_ALL_PER_SLICE = 0xFFFF,
} E_DjiCameraManagerFileListCountPerSlice;
typedef enum {
DJI_CAMERA_MANAGER_SOURCE_DEFAULT_CAM = 0x0,
DJI_CAMERA_MANAGER_SOURCE_WIDE_CAM = 0x1,
DJI_CAMERA_MANAGER_SOURCE_ZOOM_CAM = 0x2,
DJI_CAMERA_MANAGER_SOURCE_IR_CAM = 0x3,
DJI_CAMERA_MANAGER_SOURCE_VISIBLE_CAM = 0x7,
} E_DjiCameraManagerStreamSource, E_DjiCameraManagerStreamStorage;
typedef enum {
DJI_CAMERA_MANAGER_NIGHT_SCENE_MODE_DISABLE = 0,
DJI_CAMERA_MANAGER_NIGHT_SCENE_MODE_ENABLE = 1,
DJI_CAMERA_MANAGER_NIGHT_SCENE_MODE_AUTO = 2,
} E_DjiCameraManagerNightSceneMode;
typedef enum {
DJI_CAMERA_MANAGER_CAPTURE_OR_RECORDING_CAPTURE = 0,
DJI_CAMERA_MANAGER_CAPTURE_OR_RECORDING_RECORDING = 1,
} E_DjiCameraManagerCaptureOrRecording;
typedef enum {
DJI_CAMERA_MANAGER_EXPAND_NAME_TYPE_FILE = 1,
DJI_CAMERA_MANAGER_EXPAND_NAME_TYPE_DIR = 2,
} E_DjiCameraManagerExpandNameType;
typedef enum {
DJI_CAMERA_MANAGER_PHOTO_RATIO_4X3 = 0,
DJI_CAMERA_MANAGER_PHOTO_RATIO_16X9 = 1,
DJI_CAMERA_MANAGER_PHOTO_RATIO_3X2 = 2,
DJI_CAMERA_MANAGER_PHOTO_RATIO_1X1 = 3,
DJI_CAMERA_MANAGER_PHOTO_RATIO_18X3 = 4,
DJI_CAMERA_MANAGER_PHOTO_RATIO_5X4 = 5,
} E_DjiCameraManagerPhotoRatio;
typedef struct {
uint8_t firmware_version[4];
} T_DjiCameraManagerFirmwareVersion;
/*! @brief Tap zoom target point data struct, used by user.
*/
typedef T_DjiCameraPointInScreen T_DjiCameraManagerTapZoomPosData;
/*! @brief Tap focus target point data struct, used by user.
*/
typedef T_DjiCameraPointInScreen T_DjiCameraManagerFocusPosData;
typedef struct {
dji_f32_t currentOpticalZoomFactor;
dji_f32_t maxOpticalZoomFactor;
} T_DjiCameraManagerOpticalZoomParam;
typedef struct {
uint8_t second;
uint8_t minute;
uint8_t hour;
uint8_t day;
uint8_t month;
uint16_t year;
} T_DjiCameraManagerFileCreateTime;
typedef struct {
union {
struct {
uint32_t attributePhotoReserved: 22;
uint32_t attributePhotoRatio: 8;
uint32_t attributePhotoRotation: 2;
uint8_t reserved[12];
} photoAttribute;
struct {
uint32_t attributeVideoDuration: 16;
uint32_t attributeVideoFramerate: 6;
uint32_t attributeVideoRotation: 2;
uint32_t attributeVideoResolution: 8;
uint8_t reserved[12];
} videoAttribute;
};
} T_DjiCameraManagerFileAttributeData;
typedef struct {
char fileName[DJI_FILE_NAME_SIZE_MAX];
uint32_t fileSize;
uint32_t fileIndex;
T_DjiCameraManagerFileCreateTime createTime;
E_DjiCameraMediaFileSubType type;
T_DjiCameraManagerFileAttributeData attributeData;
} T_DjiCameraManagerSubFileListInfo;
typedef struct {
char fileName[DJI_FILE_NAME_SIZE_MAX];
uint32_t fileSize;
uint32_t fileIndex;
T_DjiCameraManagerFileCreateTime createTime;
E_DjiCameraMediaFileType type;
T_DjiCameraManagerFileAttributeData attributeData;
uint8_t subFileListTotalNum;
T_DjiCameraManagerSubFileListInfo* subFileListInfo;
} T_DjiCameraManagerFileListInfo;
typedef struct {
uint16_t totalCount;
T_DjiCameraManagerFileListInfo *fileListInfo;
} T_DjiCameraManagerFileList;
typedef struct {
uint16_t sliceStartIndex;
E_DjiCameraManagerFileListCountPerSlice countPerSlice;
} T_DjiCameraManagerSliceConfig;
typedef enum {
DJI_DOWNLOAD_FILE_EVENT_START,
DJI_DOWNLOAD_FILE_EVENT_TRANSFER,
DJI_DOWNLOAD_FILE_EVENT_END,
DJI_DOWNLOAD_FILE_EVENT_START_TRANSFER_END,
} E_DjiDownloadFileEvent;
typedef enum {
DJI_CAMERA_MANAGER_VIDEO_RESOLUTION_640X480P = 0, // 640X480P
DJI_CAMERA_MANAGER_VIDEO_RESOLUTION_1280X640P = 2, // 1280X640P
DJI_CAMERA_MANAGER_VIDEO_RESOLUTION_1280X720P = 4, // 1280X720P
DJI_CAMERA_MANAGER_VIDEO_RESOLUTION_1920X1080P = 10, // 1920X1080P
DJI_CAMERA_MANAGER_VIDEO_RESOLUTION_3840X2160P = 16, // 3840X2160P
} E_DjiCameraManagerVideoResolution;
typedef enum {
DJI_CAMERA_MANAGER_VIDEO_FRAME_RATE_15FPS = 0, // 14.985
DJI_CAMERA_MANAGER_VIDEO_FRAME_RATE_25FPS = 2, // 25.000
DJI_CAMERA_MANAGER_VIDEO_FRAME_RATE_30FPS = 3, // 29.970
DJI_CAMERA_MANAGER_VIDEO_FRAME_RATE_60FPS = 6, // 59.940
} E_DjiCameraManagerVideoFrameRate;
typedef enum {
DJI_CAMERA_MANAGER_PHOTO_STORAGE_FORMAT_RAW = 0,
DJI_CAMERA_MANAGER_PHOTO_STORAGE_FORMAT_JPEG = 1,
DJI_CAMERA_MANAGER_PHOTO_STORAGE_FORMAT_RAW_JPEG = 2,
DJI_CAMERA_MANAGER_PHOTO_STORAGE_FORMAT_YUV = 3, // Save as YUV format image
DJI_CAMERA_MANAGER_PHOTO_STORAGE_FORMAT_RJPEG = 7, // Radiometric JPEG
} E_DjiCameraManagerPhotoStorageFormat;
typedef enum {
DJI_CAMERA_MANAGER_VIDEO_STORAGE_FORMAT_MOV = 0,
DJI_CAMERA_MANAGER_VIDEO_STORAGE_FORMAT_MP4 = 1,
} E_DjiCameraManagerVideoStorageFormat;
typedef enum {
DJI_CAMERA_MANAGER_METERING_MODE_CENTRAL = 0,
DJI_CAMERA_MANAGER_METERING_MODE_AVERAGE = 1,
DJI_CAMERA_MANAGER_METERING_MODE_SPOT = 2,
} E_DjiCameraManagerMeteringMode;
typedef enum {
DJI_CAMERA_MANAGER_FFC_MODE_MANUAL = 0,
DJI_CAMERA_MANAGER_FFC_MODE_AUTO = 1,
} E_DjiCameraManagerFfcMode;
typedef enum {
DJI_CAMERA_MANAGER_IR_GAIN_MODE_AUTO = 0,
DJI_CAMERA_MANAGER_IR_GAIN_MODE_LOW = 1,
DJI_CAMERA_MANAGER_IR_GAIN_MODE_HIGH = 2,
} E_DjiCameraManagerIrGainMode;
typedef enum {
/* Camera is not capturing photos*/
DJI_CAMERA_MANAGER_CAPTURING_STATE_IDLE = 0,
/* Camera is capturing a single photo */
DJI_CAMERA_MANAGER_CAPTURING_STATE_SINGLE = 1,
/* Camera is capturing multiple photos */
DJI_CAMERA_MANAGER_CAPTURING_STATE_MULTI = 2,
} E_DjiCameraManagerCapturingState;
typedef enum {
DJI_CAMERA_MANAGER_RECORDING_STATE_IDLE = 0,
DJI_CAMERA_MANAGER_RECORDING_STATE_STARTING = 1,
DJI_CAMERA_MANAGER_RECORDING_STATE_RECORDING = 2,
DJI_CAMERA_MANAGER_RECORDING_STATE_STOPPING = 3,
} E_DjiCameraManagerRecordingState;
/*! @brief: when the remote control is in split-screen mode, the coordinate range of the x-axis is 0-0.5.
*/
typedef struct {
dji_f32_t pointX; /*! x-coordinate of point thermometry, range: 0-1 */
dji_f32_t pointY; /*! y-coordinate of point thermometry, range: 0-1 */
} T_DjiCameraManagerPointThermometryCoordinate;
typedef struct {
dji_f32_t areaTempLtX; /*! x-coordinate of the upper left corner of the area thermometry, range: 0-1 */
dji_f32_t areaTempLtY; /*! y-coordinate of the upper left corner of the area thermometry, range: 0-1 */
dji_f32_t areaTempRbX; /*! x-coordinate of the lower right corner of the area thermometry, range: 0-1 */
dji_f32_t areaTempRbY; /*! y-coordinate of the lower right corner of the area thermometry, range: 0-1 */
} T_DjiCameraManagerAreaThermometryCoordinate;
//result of point thermometry
typedef struct {
dji_f32_t pointX; /*! x-coordinate of point thermometry, range: 0-1 */
dji_f32_t pointY; /*! y-coordinate of point thermometry, range: 0-1 */
dji_f32_t pointTemperature; /*! The temperature of the current point */
} T_DjiCameraManagerPointThermometryData;
//result of area thermometry
typedef struct {
dji_f32_t areaTempLtX; /*! x_coordinate of the upper left corner of the current thermometry area */
dji_f32_t areaTempLtY; /*! y_coordinate of the upper left corner of the current thermometry area */
dji_f32_t areaTempRbX; /*! x_coordinate of the lower right corner of the current thermometry area */
dji_f32_t areaTempRbY; /*! y_coordinate of the lower right corner of the current thermometry area */
dji_f32_t areaAveTemp; /*! The average temperature of the current thermometry area */
dji_f32_t areaMinTemp; /*! The minimum temperature of the current thermometry area */
dji_f32_t areaMaxTemp; /*! The maximum temperature of the current thermometry area */
dji_f32_t areaMinTempPointX; /*! x_coordinate of the minimum temperature in the thermometry area */
dji_f32_t areaMinTempPointY; /*! y_coordinate of the minimum temperature in the thermometry area */
dji_f32_t areaMaxTempPointX; /*! x_coordinate of the maximum temperature in the thermometry area */
dji_f32_t areaMaxTempPointY; /*! y_coordinate of the maximum temperature in the thermometry area */
} T_DjiCameraManagerAreaThermometryData;
typedef struct {
E_DjiDownloadFileEvent downloadFileEvent;
uint8_t fileType;
uint32_t fileIndex;
uint32_t fileSize;
dji_f32_t progressInPercent;
} T_DjiDownloadFilePacketInfo;
typedef struct {
dji_f64_t longitude; /*! Range: [-180,180] */
dji_f64_t latitude; /*! Range: [-90,90] */
int32_t altitude; /*! Unit: 0.1m */
int32_t distance; /*! Unit: 0.1m */
int16_t screenX; /*! Unit: 0.1% */
int16_t screenY; /*! Unit: 0.1% */
bool enable_lidar;
uint8_t exception;
} T_DjiCameraManagerLaserRangingInfo;
typedef struct {
uint32_t size;
E_DjiCameraManagerStreamSource streamSource[4];
E_DjiCameraManagerStreamStorage streamStorage[4];
} T_DjiCameraManagerStreamList;
typedef struct {
E_DjiCameraManagerVideoResolution videoResolution;
E_DjiCameraManagerVideoFrameRate videoFrameRate;
} T_DjiCameraManagerVideoFormat;
typedef struct {
uint8_t size;
union {
E_DjiCameraManagerPhotoStorageFormat photoStorageFormat[16];
E_DjiCameraManagerVideoStorageFormat videoStorageFormat[16];
E_DjiCameraManagerPhotoRatio photoRatioFormat[16];
E_DjiCameraManagerStreamSource streamSource[16];
E_DjiCameraManagerStreamStorage streamStorage[16];
E_DjiCameraManagerNightSceneMode nightSceneMode[16];
};
uint32_t minValue;
uint32_t maxValue;
} T_DjiCameraManagerRangeList;
typedef struct {
double lowGainTempMin;
double lowGainTempMax;
double highGainTempMin;
double highGainTempMax;
} T_DjiCameraManagerIrTempMeterRange;
typedef struct {
uint32_t totalCapacity; /* MByte */
uint32_t remainCapacity; /* MByte */
} T_DjiCameraManagerStorageInfo;
typedef struct {
uint32_t flag; /* 0xFFFFFFFF */
uint32_t seqNum;
uint64_t timestamp;
uint32_t dataByte; /* actual num of bytes used for points */
} __attribute__((packed)) T_DjiCameraManagerPointCloudHeader;
typedef struct {
dji_f32_t x; /* the x-axis of NED coordinate system */
dji_f32_t y; /* the y-axis of NED coordinate system */
dji_f32_t z; /* the z-axis of NED coordinate system */
uint8_t intensity;
uint8_t r;
uint8_t g;
uint8_t b;
}__attribute__((packed)) T_DjiCameraManagerPointXYZRGBInfo;
typedef struct {
T_DjiCameraManagerPointCloudHeader pointCloudHeader;
uint32_t crc_header;
uint32_t crc_rest;
T_DjiCameraManagerPointXYZRGBInfo points[1];
}__attribute__((packed)) T_DjiCameraManagerColorPointCloud;
typedef T_DjiReturnCode (*DjiCameraManagerDownloadFileDataCallback)(T_DjiDownloadFilePacketInfo packetInfo,
const uint8_t *data,
uint16_t dataLen);
/* Exported functions --------------------------------------------------------*/
/**
* @brief Initialise camera manager module, and user should call this function
* before using camera manager features.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_Init(void);
/**
* @brief Deinitialise camera manager module.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_DeInit(void);
/**
* @brief Get camera type of the selected camera mounted position.
* @param position: camera mounted position
* @param cameraType: refer to E_DjiCameraType.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetCameraType(E_DjiMountPosition position, E_DjiCameraType *cameraType);
/**
* @brief Get camera firmware version of the selected camera mounted position.
* @param position: camera mounted position
* @param firmwareVersion: refer to T_DjiCameraManagerFirmwareVersion.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetFirmwareVersion(E_DjiMountPosition position,
T_DjiCameraManagerFirmwareVersion *firmwareVersion);
/**
* @brief Get camera connection status.
* @param position: camera mounted position
* @param connectStatus: returned value of connection status
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetCameraConnectStatus(E_DjiMountPosition position,
bool *connectStatus);
/**
* @brief Set camera working mode of the selected camera mounted position.
* @note Set the camera's work mode to options such as taking pictures, recording video,
* playback, or downloading. Please note that you cannot change the mode when a certain
* task is executing. This action takes about 1-2 s.
* @param position: camera mounted position
* @param workMode: refer to E_DjiCameraManagerWorkMode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetMode(E_DjiMountPosition position,
E_DjiCameraManagerWorkMode workMode);
/**
* @brief Get camera working mode of the selected camera mounted position.
* @param position: camera mounted position
* @param workMode: refer to E_DjiCameraManagerWorkMode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetMode(E_DjiMountPosition position,
E_DjiCameraManagerWorkMode *workMode);
/**
* @brief Set camera shoot mode of the selected camera mounted position.
* @param position: camera mounted position
* @param mode: refer to E_DjiCameraManagerShootPhotoMode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetShootPhotoMode(E_DjiMountPosition position,
E_DjiCameraManagerShootPhotoMode mode);
/**
* @brief Get camera shoot mode of the selected camera mounted position.
* @param position: camera mounted position
* @param mode: refer to E_DjiCameraManagerShootPhotoMode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetShootPhotoMode(E_DjiMountPosition position,
E_DjiCameraManagerShootPhotoMode *takePhotoMode);
/**
* @brief Start shooting photo.
* @note Camera must be in ShootPhoto mode. For thermal imaging cameras,
* it is allowed to take a single photo while recording video. Check the SD
* card's capacity before using this method to ensure there is enough space.
* @param position: camera mounted position
* @param mode: refer to E_DjiCameraManagerShootPhotoMode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_StartShootPhoto(E_DjiMountPosition position,
E_DjiCameraManagerShootPhotoMode mode);
/**
* @brief Stop shooting photo.
* @note Camera must be in ShootPhoto mode and the shoot mode is either
* Interval or Time-lapse. If set to single shot mode, the camera will
* automatically stop after taking the photo.
* @param position: camera mounted position
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_StopShootPhoto(E_DjiMountPosition position);
/**
* @brief Get camera capturing state.
* @note This API is not supported by L1/P1/M3D/M3TD models.
* @param position: camera mounted position
* @param capturingState: result of getting, see E_DjiCameraManagerCapturingState.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetCapturingState(E_DjiMountPosition position,
E_DjiCameraManagerCapturingState *capturingState);
/**
* @brief Set the burst count for burst shooting mode.
* @param position: camera mounted position
* @param count: refer to E_DjiCameraBurstCount.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetPhotoBurstCount(E_DjiMountPosition position,
E_DjiCameraBurstCount count);
/**
* @brief Set the parameters for INTERVAL shooting mode.
* @note In this mode, the camera captures a photo, waits a specified interval
* of time, then captures another photo, continuing until the set number of
* photos is reached. Supported by thermal imaging cameras, too.
* @param position: camera mounted position
* @param intervalSetting: refer to T_DjiCameraPhotoTimeIntervalSettings.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetPhotoTimeIntervalSettings(E_DjiMountPosition position,
T_DjiCameraPhotoTimeIntervalSettings intervalSetting);
/**
* @brief Get the parameters for INTERVAL shooting mode.
* @param position: camera mounted position
* @param intervalSetting: refer to T_DjiCameraPhotoTimeIntervalSettings.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetPhotoTimeIntervalSettings(E_DjiMountPosition position,
T_DjiCameraPhotoTimeIntervalSettings *intervalSetting);
/**
* @brief Get the remaining time of interval shooting.
* @note Not supported by L1/P1/M3D/M3TD models.
* @param position: camera mounted position
* @param remainTime: time in seconds.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetIntervalShootingRemainTime(E_DjiMountPosition position,
uint8_t *remainTime);
/**
* @brief Set camera focus mode of the selected camera mounted position.
* @note Set the lens focus mode. In auto focus mode, the target
* point is the focal point. In manual focus mode, if focus assist is
* enabled, it adjusts focus in the zoomed-out area.
* @param position: camera mounted position
* @param focusMode: refer to E_DjiCameraManagerFocusMode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetFocusMode(E_DjiMountPosition position,
E_DjiCameraManagerFocusMode focusMode);
/**
* @brief Get camera focus mode of the selected camera mounted position.
* @param position: camera mounted position
* @param focusMode: refer to E_DjiCameraManagerFocusMode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetFocusMode(E_DjiMountPosition position,
E_DjiCameraManagerFocusMode *focusMode);
/**
* @brief Set camera focus point of the selected camera mounted position.
* @note Sets the target point for focusing. In auto mode, this is the focal
* point. In manual mode with focus assist enabled, it's the zoomed-out area.
* @param position: camera mounted position
* @param focusPosData: refer to T_DjiCameraManagerFocusPosData.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetFocusTarget(E_DjiMountPosition position,
T_DjiCameraManagerFocusPosData focusPosData);
/**
* @brief Get camera focus point of the selected camera mounted position.
* @param position: camera mounted position
* @param focusPosData: refer to T_DjiCameraManagerFocusPosData.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetFocusTarget(E_DjiMountPosition position,
T_DjiCameraManagerFocusPosData *tapFocusPos);
/**
* @brief Start camera optical zooming of the selected camera mounted position.
* @note Changes the lens's focal length in the specified direction at a specified
* speed. Zooming stops at the lens's max or min focal length or when
* StopContinuousOpticalZoom is called.
* @param position: camera mounted position
* @param zoomDirection: optical zoom direction, refer to E_DjiCameraZoomDirection.
* @param zoomSpeed: optical zoom direction, refer to E_DjiCameraZoomSpeed.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_StartContinuousOpticalZoom(E_DjiMountPosition position,
E_DjiCameraZoomDirection zoomDirection,
E_DjiCameraZoomSpeed zoomSpeed);
/**
* @brief Stop the ongoing optical zoom operation of the selected camera mounted position.
* @note Should be called to halt the focal length change initiated by
* DjiCameraManager_StartContinuousOpticalZoom.
* @param position: camera mounted position
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_StopContinuousOpticalZoom(E_DjiMountPosition position);
/**
* @brief Set target zoom factor for optical zooming of the selected camera mounted position.
* @note This interface sets the zoom to the specified target value.
* @param position: camera mounted position
* @param zoomDirection: optical zoom direction, refer to E_DjiCameraZoomDirection.
* @param factor: target zoom factor.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetOpticalZoomParam(E_DjiMountPosition position,
E_DjiCameraZoomDirection zoomDirection,
dji_f32_t factor);
/**
* @brief Get parameters for camera optical zooming of the selected camera mounted position.
* @param position: camera mounted position
* @param opticalZoomParam: refer to T_DjiCameraManagerOpticalZoomParam.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetOpticalZoomParam(E_DjiMountPosition position,
T_DjiCameraManagerOpticalZoomParam *opticalZoomParam);
/**
* @brief Set target zoom factor for infrared zooming of the selected camera mounted position.
* @param position: camera mounted position
* @param factor: target zoom factor.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetInfraredZoomParam(E_DjiMountPosition position,
dji_f32_t factor);
/**
* @brief Enable/Disable the tap-zoom function for the selected camera mounted position.
* @note TapZoomAtTarget can only be called when tap-zoom is enabled.
* @param position: camera mounted position
* @param param: enable/disable
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetTapZoomEnabled(E_DjiMountPosition position,
bool param);
/**
* @brief Get status of camera's tap-zoom function of the selected camera mounted position.
* @param position: camera mounted position
* @param param: enable/disable
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetTapZoomEnabled(E_DjiMountPosition position, bool *param);
/**
* @brief Set camera's tap-zoom multiplier of the selected camera mounted position.
* @note The final zoom scale during a tap-zoom action will be:
* Current Zoom Scale x Multiplier.
* @param position: camera mounted position
* @param tapZoomMultiplier: The multiplier range is [1,5]. A multiplier of 1 will not change the zoom.
* hen the multiplier is 1, the zoom scale will not change during TapZoom.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetTapZoomMultiplier(E_DjiMountPosition position, uint8_t tapZoomMultiplier);
/**
* @brief Get camera's tap-zoom multiplier of the selected camera mounted position.
* @param position: camera mounted position
* @param tapZoomMultiplier: The multiplier range is [1,5]. A multiplier of 1 will not change the zoom.
* When the multiplier is 1, the zoom scale will not change during TapZoom.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetTapZoomMultiplier(E_DjiMountPosition position, uint8_t *tapZoomMultiplier);
/**
* @brief Set camera's tap-zoom point of the selected camera mounted position.
* @note Only available when tap-zoom is enabled. Sets a new target,
* reorienting the gimbal to locate the target on the screen center and
* applying the tap-zoom multiplier.
* @param position: camera mounted position
* @param tapZoomPos: refer to T_DjiCameraManagerTapZoomPosData.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_TapZoomAtTarget(E_DjiMountPosition position,
T_DjiCameraManagerTapZoomPosData tapZoomPos);
/**
* @brief Get camera focus ring value range.
* @param position: camera mounted position
* @param rangeList: returned value of range.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetFocusRingRange(E_DjiMountPosition position,
T_DjiCameraManagerRangeList *rangeList);
/**
* @brief Set camera focus ring value.
* @param position: camera mounted position
* @param value: focus ring value.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetFocusRingValue(E_DjiMountPosition position,
uint16_t value);
/**
* @brief Get camera focus ring value.
* @param position: camera mounted position
* @param value: focus ring value to be returned.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetFocusRingValue(E_DjiMountPosition position,
uint16_t *value);
/**
* @brief Set camera's exposure mode of the selected camera mounted position.
* @note Different exposure modes define whether settings like aperture, shutter
* speed, and ISO are set automatically or manually. Exposure compensation is
* adjustable in all modes except the manual mode.
* @param position: camera mounted position
* @param mode: refer to E_DjiCameraManagerExposureMode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetExposureMode(E_DjiMountPosition position,
E_DjiCameraManagerExposureMode mode);
/**
* @brief Get camera's exposure mode of the selected camera mounted position.
* @note Different exposure modes define whether settings like aperture, shutter
* speed, and ISO are set automatically or manually. Exposure compensation is
* adjustable in all modes except the manual mode.
* @param position: camera mounted position
* @param mode: refer to E_DjiCameraManagerExposureMode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetExposureMode(E_DjiMountPosition position,
E_DjiCameraManagerExposureMode *mode);
/**
* @brief Set camera's iso value of the selected camera mounted position.
* @note ISO value can only be set when the camera exposure mode is in
* manual mode.
* @param position: camera mounted position
* @param iso: refer to E_DjiCameraManagerISO.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetISO(E_DjiMountPosition position,
E_DjiCameraManagerISO iso);
/**
* @brief Get camera's iso value of the selected camera mounted position.
* @param position: camera mounted position
* @param iso: refer to E_DjiCameraManagerISO.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetISO(E_DjiMountPosition position,
E_DjiCameraManagerISO *iso);
/**
* @brief Set camera's aperture size value of the selected camera mounted position.
* @note The exposure mode must be on DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL or
* DJI_CAMERA_MANAGER_EXPOSURE_MODE_APERTURE_PRIORITY.
* @param position: camera mounted position
* @param aperture: refer to E_DjiCameraManagerAperture.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetAperture(E_DjiMountPosition position,
E_DjiCameraManagerAperture aperture);
/**
* @brief Get camera's aperture size value of the selected camera mounted position.
* @param position: camera mounted position
* @param aperture: refer to E_DjiCameraManagerAperture.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetAperture(E_DjiMountPosition position,
E_DjiCameraManagerAperture *aperture);
/**
* @brief Set camera's shutter speed value of the selected camera mounted position.
* @note Set the camera shutter speed. Ensure the shutter speed is not set
* slower than the video frame rate when the camera's mode is RECORD_VIDEO.
* For example, if the video frame rate is 30fps, the shutterSpeed must be <=
* 1/30. Precondition: The shutter speed can be set only when the camera
* exposure mode is DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL mode or
* DJI_CAMERA_MANAGER_EXPOSURE_MODE_SHUTTER_PRIORITY
* @param position: camera mounted position
* @param shutterSpeed: refer to E_DjiCameraManagerShutterSpeed.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetShutterSpeed(E_DjiMountPosition position,
E_DjiCameraManagerShutterSpeed shutterSpeed);
/**
* @brief Get camera's shutter value of the selected camera mounted position.
* @param position: camera mounted position
* @param shutterSpeed: refer to E_DjiCameraManagerShutterSpeed.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetShutterSpeed(E_DjiMountPosition position,
E_DjiCameraManagerShutterSpeed *shutterSpeed);
/**
* @brief Set camera's EV value of the selected camera mounted position.
* @note This function is available in program, shutter, or aperture
* exposure modes. Enums are DJI_CAMERA_MANAGER_EXPOSURE_MODE_EXPOSURE_MANUAL,
* DJI_CAMERA_MANAGER_EXPOSURE_MODE_SHUTTER_PRIORITY, and
* DJI_CAMERA_MANAGER_EXPOSURE_APERTURE_PRIORITY
* @param position: camera mounted position
* @param ev: refer to E_DjiCameraManagerExposureCompensation.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetExposureCompensation(E_DjiMountPosition position,
E_DjiCameraManagerExposureCompensation ev);
/**
* @brief Get camera's EV value of the selected camera mounted position.
* @param position: camera mounted position
* @param ev: refer to E_DjiCameraManagerExposureCompensation.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetExposureCompensation(E_DjiMountPosition position,
E_DjiCameraManagerExposureCompensation *ev);
/**
* @brief Set AE lock mode.
* @param position: camera mounted position
* @param enable: true to enable, false to disable AE lock.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetAELockEnabled(E_DjiMountPosition position,
bool enable);
/**
* @brief Get AE lock mode.
* @note This API is not supported by L1/P1/M3D/M3TD models.
* @param position: camera mounted position
* @param enable: result of AE lock mode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetAELockEnabled(E_DjiMountPosition position,
bool *enable);
/**
* @brief Reset camera settings.
* @param position: camera mounted position
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_ResetCameraSettings(E_DjiMountPosition position);
/**
* @brief Start to take video of the selected camera mounted position.
* @note Camera must be in RECORD_VIDEO mode. For thermal imaging camera,
* user can take a single photo when recording video.
* @param position: camera mounted position
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_StartRecordVideo(E_DjiMountPosition position);
/**
* @brief Stop to take video of the selected camera mounted position.
* @note Precondition: The camera is recording currently.
* @param position: camera mounted position
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_StopRecordVideo(E_DjiMountPosition position);
/**
* @brief Get camera recording state.
* @param position: camera mounted position
* @param recordingState: result of getting, see E_DjiCameraManagerRecordingState.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetRecordingState(E_DjiMountPosition position,
E_DjiCameraManagerRecordingState *recordingState);
/**
* @brief Get camera recording time.
* @note This API is not supported by L1/P1/M3D/M3TD models.
* @param position: camera mounted position
* @param recordingTime: result of getting, unit is seconds.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetRecordingTime(E_DjiMountPosition position,
uint16_t *recordingTime);
/**
* @brief Get camera stream source range.
* @param position: camera mounted position
* @param rangeList: pointer to the result.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetStreamSourceRange(E_DjiMountPosition position,
T_DjiCameraManagerRangeList *rangeList);
/**
* @brief Choose camera stream source.
* @param position: camera mounted position
* @param streamSource: stream source to be chose.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetStreamSource(E_DjiMountPosition position,
E_DjiCameraManagerStreamSource streamSource);
/**
* @brief Get photo storage format range.
* @param position: camera mounted position
* @param rangeList: range list returned value
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetPhotoStorageFormatRange(E_DjiMountPosition position,
T_DjiCameraManagerRangeList *rangeList);
/**
* @brief Set photo storage format.
* @param position: camera mounted position
* @param format: storage format.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetPhotoFormat(E_DjiMountPosition position,
E_DjiCameraManagerPhotoStorageFormat format);
/**
* @brief Get photo storage format.
* @param position: camera mounted position
* @param format: returned value of storage format.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetPhotoFormat(E_DjiMountPosition position,
E_DjiCameraManagerPhotoStorageFormat *format);
/**
* @brief Get video storage format range.
* @param position: camera mounted position
* @param rangeList: range list returned value
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetVideoFormatRange(E_DjiMountPosition position,
T_DjiCameraManagerRangeList *rangeList);
/**
* @brief Set video storage format.
* @param position: camera mounted position
* @param format: storage format.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetVideoStorageFormat(E_DjiMountPosition position,
E_DjiCameraManagerVideoStorageFormat format);
/**
* @brief Get video storage format.
* @param position: camera mounted position
* @param format: returned value of storage format.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetVideoFormat(E_DjiMountPosition position,
E_DjiCameraManagerVideoStorageFormat *format);
/**
* @brief Get photo ratio range
* @param position: camera mounted position
* @param rangeList: range list returned value
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetPhotoRatioRange(E_DjiMountPosition position,
T_DjiCameraManagerRangeList *rangeList);
/**
* @brief Set camera photo ratio
* @param position: camera mounted position
* @param photoRatio: ratio to be set
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetPhotoRatio(E_DjiMountPosition position,
E_DjiCameraManagerPhotoRatio photoRatio);
/**
* @brief Get camera photo ratio
* @param position: camera mounted position
* @param photoRatio: returned value of photo ratio
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetPhotoRatio(E_DjiMountPosition position,
E_DjiCameraManagerPhotoRatio *photoRatio);
/**
* @brief Get camera video resolution and frame rate
* @param position: camera mounted position
* @param photoRatio: returned value of video resolution and frame rate
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetVideoResolutionFrameRate(E_DjiMountPosition position,
T_DjiCameraManagerVideoFormat *videoParam);
/**
* @brief Get night scene mode range.
* @param position: camera mounted position.
* @param tempRange: returned valued of night scene mode range.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetNightSceneModeRange(E_DjiMountPosition position,
T_DjiCameraManagerRangeList *rangeList);
/**
* @brief Set night scene mode.
* @note Make sure that stream source is zoom or wide camera.
* @param position: camera mounted position
* @param nightSceneMode: night scene mode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetNightSceneMode(E_DjiMountPosition position,
E_DjiCameraManagerNightSceneMode nightSceneMode);
/**
* @brief Get night scene mode.
* @param position: camera mounted position
* @param nightSceneMode: pointer to night scene mode.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetNightSceneMode(E_DjiMountPosition position,
E_DjiCameraManagerNightSceneMode *nightSceneMode);
/**
* @brief Get range of stream source(s) can be stored when capturing or recording.
* @param position: camera mounted position.
* @param rangeList: returned value of range, in member streamStorage.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetStreamStorageRange(E_DjiMountPosition position,
T_DjiCameraManagerRangeList *rangeList);
/**
* @brief Select capture or recording stream(s) to store.
* @note Precondition: set camera's work corresponding to streamType
* @param position: camera mounted position.
* @param streamType: capture mode or recording mode.
* @param streamStorageList: Pointer to the struct that contains stream list.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetCaptureRecordingStreams(E_DjiMountPosition position,
E_DjiCameraManagerCaptureOrRecording streamType,
T_DjiCameraManagerStreamList *streamStorageList);
/**
* @brief Get the stream(s) of capture or recording mode to be stored.
* @param position: camera mounted position.
* @param streamType: capture mode or recording mode.
* @param streamSourceList: the real return value.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetCaptureRecordingStreams(E_DjiMountPosition position,
E_DjiCameraManagerCaptureOrRecording streamType,
T_DjiCameraManagerStreamList *streamStorageList);
/**
* @brief Turn on/off synchronized split screen zoom function.
* @param position: camera mounted position.
* @param enable: set true to turn on, false to turn off.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetSynchronizedSplitScreenZoomEnabled(E_DjiMountPosition position, bool enable);
/**
* @brief Set suffix name of directory or file.
* @note This setting applies only once for file names.
* @param position: camera mounted position.
* @param nameType: see E_DjiCameraManagerExpandNameType, select to set name of directory or file.
* @param nameSize: Length of the name string, between 1 and 239 characters.
* @param nameStr: Content of custom suffix name.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetCustomExpandName(E_DjiMountPosition position,
E_DjiCameraManagerExpandNameType nameType,
const uint8_t *nameStr,
uint32_t nameSize);
/**
* @brief Get the custom suffix of the most recent directory or file name.
* @param position: camera mounted position
* @param nameType: to choose directory or file to get custom name
* @param nameStr: name string buffer
* @param nameSize: On input, indicates the maximum size of nameStr; on output,
* the actual size of the name string.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetCustomExpandName(E_DjiMountPosition position,
E_DjiCameraManagerExpandNameType nameType,
uint8_t *nameStr,
uint32_t *nameSize);
/**
* @brief Downloads a list of media files from the selected camera.
* @note This synchronous interface may lead to higher CPU usage.
* Times out after 3 seconds if the download fails.
* @param position: the mount position of the camera
* @param fileList: the pointer to the downloaded camera file list
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_DownloadFileList(E_DjiMountPosition position, T_DjiCameraManagerFileList *fileList);
/**
* @brief Download selected camera media file list by slices.
* @note This synchronous interface may lead to higher CPU usage.
* Times out after 3 seconds if the download fails.
* @param position: the mount position of the camera
* @param sliceConfig: the slices config for downloading file list
* @param fileList: the pointer to the downloaded camera file list
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_DownloadFileListBySlices(E_DjiMountPosition position,
T_DjiCameraManagerSliceConfig sliceConfig,
T_DjiCameraManagerFileList *fileList);
/**
* @brief Registers a callback for downloading file data.
* @param position: the mount position of the camera
* @param callback: the download file data callback
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_RegDownloadFileDataCallback(E_DjiMountPosition position,
DjiCameraManagerDownloadFileDataCallback callback);
/**
* @brief Downloads a media file specified by its index.
* @note Supports downloading one file at a time. Wait for a download to finish before starting another.
* This synchronous interface may lead to higher CPU usage.
* Times out after 3 seconds if the download fails.
* @param position: the mount position of the camera
* @param fileIndex: the index of the camera media file
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_DownloadFileByIndex(E_DjiMountPosition position, uint32_t fileIndex);
/**
* @brief Download selected camera media file by file index and file type.
* @note This API only supports L2 camera.
* Supports downloading one file at a time. Wait for a download to finish before starting another.
* This synchronous interface may lead to higher CPU usage.
* Times out after 3 seconds if the download fails.
* @param position: the mount position of the camera
* @param fileIndex: the index of the camera media file
* @param fileType: the sub type of the camera media file
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_DownloadSubFileByIndexAndSubType(E_DjiMountPosition position, uint32_t index, E_DjiCameraMediaFileSubType fileType);
/**
* @brief Obtains the rights to download media files before downloading media files
* @param position: the mount position of the camera
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_ObtainDownloaderRights(E_DjiMountPosition position);
/**
* @brief Releases the rights to download media files after downloading media files
* @note Failure to release downloader rights may restrict access to the camera album
* by the pilot app.
* @param position: the mount position of the camera
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_ReleaseDownloaderRights(E_DjiMountPosition position);
/**
* @brief Format SD card.
* @param position: the mount position of the camera
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_FormatStorage(E_DjiMountPosition position);
/**
* @brief Get storage info of SD card.
* @note This API doesn't support L1/P1/M3D/M3TD models.
* @param position: the mount position of the camera
* @param storageInfo: Result of SD Card storage information
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetStorageInfo(E_DjiMountPosition position,
T_DjiCameraManagerStorageInfo *storageInfo);
/**
* @brief Delete selected camera media file by file index.
* @param position: the mount position of the camera
* @param fileIndex: the index of the camera media file
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_DeleteFileByIndex(E_DjiMountPosition position, uint32_t fileIndex);
/**
* @brief Get the camera laser ranging info of the selected camera mounted position.
* @note Maximum data update frequency: 5Hz.
* @param position: the mount position of the camera
* @param laserRangingInfo: the pointer to the camera laser ranging info
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetLaserRangingInfo(E_DjiMountPosition position,
T_DjiCameraManagerLaserRangingInfo *laserRangingInfo);
/**
* @brief Set point thermometry coordinates of the selected camera mounted position.
* @param position: camera mounted position
* @param pointCoordinate: point thermometry coordinates
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetPointThermometryCoordinate(E_DjiMountPosition position,
T_DjiCameraManagerPointThermometryCoordinate pointCoordinate);
/**
* @brief Get point thermometry result.
* @note Before get point thermometry data from camera, DjiCameraManager_SetPointThermometryCoordinate()
* function has to be called.
* @param position: camera mounted position
* @param pointThermometryData: point thermometry result
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetPointThermometryData(E_DjiMountPosition position,
T_DjiCameraManagerPointThermometryData *pointThermometryData);
/**
* @brief Set area thermometry coordinates of the selected camera mounted position.
* @param position: camera mounted position
* @param areaCoordinate: area thermometry coordinates
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetAreaThermometryCoordinate(E_DjiMountPosition position,
T_DjiCameraManagerAreaThermometryCoordinate areaCoordinate);
/**
* @brief Get area thermometry result.
* @note Before get area thermometry data from camera, DjiCameraManager_SetAreaThermometryCoordinate()
* function has to be called.
* @param position: camera mounted position
* @param areaThermometryData: area thermometry result
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetAreaThermometryData(E_DjiMountPosition position,
T_DjiCameraManagerAreaThermometryData *areaThermometryData);
/**
* @brief Set FFC mode.
* @param position: camera mounted position.
* @param ffcMode: mode to be set.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetFfcMode(E_DjiMountPosition position, E_DjiCameraManagerFfcMode ffcMode);
/**
* @brief Trigger FFC one time.
* @param position: camera mounted position.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_TriggerFfc(E_DjiMountPosition position);
/**
* @brief Set infrared camera gain mode.
* @param position: camera mounted position.
* @param gainMode: gain mode to set.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetInfraredCameraGainMode(E_DjiMountPosition position,
E_DjiCameraManagerIrGainMode gainMode);
/**
* @brief Get temperature range of infrared camera.
* @param position: camera mounted position.
* @param tempRange: returned valued of temperature range.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetInfraredCameraGainModeTemperatureRange(E_DjiMountPosition position,
T_DjiCameraManagerIrTempMeterRange *tempRange);
/**
* @brief Set camera metering mode.
* @param position: camera mounted position
* @param meteringMode: metering mode
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetMeteringMode(E_DjiMountPosition position,
E_DjiCameraManagerMeteringMode meteringMode);
/**
* @brief Get camera metering mode.
* @param position: camera mounted position
* @param meteringMode: pointer to returned value of metering mode
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetMeteringMode(E_DjiMountPosition position,
E_DjiCameraManagerMeteringMode *meteringMode);
/**
* @brief Get range of metering point.
* @param position: camera mounted position
* @param hrzNum: returned value, horizontal range.
* @param vtcNum: returned value, vertical range.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetMeteringPointRegionRange(E_DjiMountPosition position,
uint8_t *hrzNum, uint8_t *vtcNum);
/**
* @brief Set metering point.
* @param position: camera mounted position
* @param x: Horizontal coordinate value, should be no greater than hrzNum - 1.
* @param y: Horizontal coordinate value, should be no greater than vtcNum - 1.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_SetMeteringPoint(E_DjiMountPosition position,
uint8_t x, uint8_t y);
/**
* @brief Get camera metering mode.
* @param position: camera mounted position
* @param x: returned valued, current metering point in horizontal coordinate.
* @param y: returned valued, current metering point in vertical coordinate.
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_GetMeteringPoint(E_DjiMountPosition position,
uint8_t *x, uint8_t *y);
/**
* @brief Start to record point cloud of the selected camera mounted position.
* @param position: camera mounted position
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_StartRecordPointCloud(E_DjiMountPosition position);
/**
* @brief Stop to record point cloud of the selected camera mounted position.
* @note Precondition: The camera is recording currently.
* @param position: camera mounted position
* @return Execution result.
*/
T_DjiReturnCode DjiCameraManager_StopRecordPointCloud(E_DjiMountPosition position);
#ifdef __cplusplus
}
#endif
#endif // DJI_CAMERA_MANAGER_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
... ...
/**
********************************************************************
* @file dij_core.h
* @brief This is the header file for "dij_core.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJI’s authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef DJI_CORE_H
#define DJI_CORE_H
/* Includes ------------------------------------------------------------------*/
#include "dji_platform.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
char appName[32]; /*!< Specifies DJI SDK app name. This info can be obtained by logging in to the
developer website https://developer.dji.com/user/apps/#all. End with '\0'. */
char appId[16]; /*!< Specifies DJI SDK app ID. This info can be obtained by logging in to the
developer website https://developer.dji.com/user/apps/#all. */
char appKey[32]; /*!< Specifies DJI SDK app key. This info can be obtained by logging in to the
developer website https://developer.dji.com/user/apps/#all. */
char appLicense[512]; /*!< Specifies DJI SDK app license. This info can be obtained by logging in to the
developer website https://developer.dji.com/user/apps/#all. */
char developerAccount[64]; /*!< Specifies DJI SDK developer account email. This info can be obtained by
logging in to the developer website https://developer.dji.com/user/apps/#all.
Developer's account and other related information need to be able to correspond.
End with '\0'. */
char baudRate[7]; /*!< Specifies DJI SDK communication serial port baud rate. */
} T_DjiUserInfo;
/* Exported functions --------------------------------------------------------*/
/**
* @brief Initialize the Payload SDK core in blocking mode.
* @note The order of calling this call is crucial. It must be done after registering console/OSAL/HAL handler functions
* It must be done after registering console/OSAL/HAL handler functions and before using other functional module
* interfaces. Correctly fill in the developer information to ensure successful initialization. See the
* See the "PSDK Initialization" tutorial for more.
* This function does not return until the correct aircraft type and PSDK adapter type is obtained. The logic ensures
* that aircraft and PSDK adapter have been started up normally before PSDK functional module and user's program run.
* General execution time of this function is 2-4 seconds.
* @param userInfo: pointer to the PSDK application information.
* @return Execution result.
*/
T_DjiReturnCode DjiCore_Init(const T_DjiUserInfo *userInfo);
/**
* @brief Sets an alias for a DJI application or product that meets the condition for DJI application or product.
* If an alias exists, it will be displayed in DJI Pilot.
* @note Still need to pass in correct DJI APP name that is obtained from DJI SDK developer website to DjiCore_Init()
* interface. The DJI APP name will be used to bind and verification.
* The alias will take effect after a short delay, up to a maximum of 1 second.
* @param productAlias: A pointer to the product alias string, which must end with '\0'. The maximum length of the string is 31 characters.
* If the alias string exceeds 31 characters, it will be truncated before being passed in.
* @return Execution result.
*/
T_DjiReturnCode DjiCore_SetAlias(const char *productAlias);
/**
* @brief Set custom firmware version for DJI application or product.
* @details Payload firmware version will always display in DJI Pilot payload settings interface.
* @param version: the custom firmware version to be set.
* @return Execution result.
*/
T_DjiReturnCode DjiCore_SetFirmwareVersion(T_DjiFirmwareVersion version);
/**
* @brief Set custom serial number for DJI application or product.
* @details Payload custom serial number will always display in DJI Pilot payload settings interface.
* @param productSerialNumber: the custom serial number to be set, needs to be no larger than 32 bytes.
* @return Execution result.
*/
T_DjiReturnCode DjiCore_SetSerialNumber(const char *productSerialNumber);
/**
* @brief Notify that the Payload SDK core application starts.
* @note The order of calling this interface requires special attention, The call needs to be completed after all the
* module initialize and register interfaces.
* @return Execution result.
*/
T_DjiReturnCode DjiCore_ApplicationStart(void);
/**
* @brief DeInitialize the Payload SDK core in blocking mode.
* @return Execution result.
*/
T_DjiReturnCode DjiCore_DeInit(void);
#ifdef __cplusplus
}
#endif
#endif // DIJ_CORE_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
... ...
/**
********************************************************************
* @file dji_fc_subscription.h
* @brief This is the header file for "dji_fc_subscription.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJI’s authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef DJI_FC_SUBSCRIPTION_H
#define DJI_FC_SUBSCRIPTION_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/**
* @brief Name of topics that can be subscribed. Topic is minimum data item subscribed.
*/
typedef enum {
/*!
* @brief Quaternion of aircraft topic name. Quaternion topic provides aircraft body frame (FRD) to ground frame
* (NED) rotation. Please refer to ::T_DjiFcSubscriptionQuaternion for information about data structure.
* @details The DJI quaternion follows Hamilton convention (q0 = w, q1 = x, q2 = y, q3 = z).
* | Angle | Unit | Accuracy | Notes |
|--------------|------|------------|-------------------------------------------------|
| pitch, roll | deg | <1 | in NON-AHRS mode |
| yaw | deg | <3 | in well-calibrated compass with fine aligned |
| yaw with rtk | deg | around 1.2 | in RTK heading fixed mode with 1 meter baseline |
* @datastruct \ref T_DjiFcSubscriptionQuaternion
*/
DJI_FC_SUBSCRIPTION_TOPIC_QUATERNION = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 0),
/*!
* @brief Provides aircraft's acceleration w.r.t a ground-fixed \b NEU frame @ up to 200Hz
* @warning Please note that this data is not in a conventional right-handed frame of reference.
* @details This is a fusion output from the flight control system. The output is in a right-handed NED frame, but the
* sign of the Z-axis acceleration is flipped before publishing to this topic. So if you are looking to get acceleration
* in an NED frame, simply flip the sign of the z-axis value. Beyond that, you can convert using rotations to
* any right-handed frame of reference.
* @units m/s<SUP>2</SUP>
* @datastruct \ref T_DjiFcSubscriptionAccelerationGround
*/
DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_GROUND = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 1),
/*!
* @brief Provides aircraft's acceleration w.r.t a body-fixed \b FRU frame @ up to 200Hz
* @warning Please note that this data is not in a conventional right-handed frame of reference.
* @details This is a fusion output from the flight control system.
* @units m/s<SUP>2</SUP>
* @datastruct \ref T_DjiFcSubscriptionAccelerationBody
*/
DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_BODY = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 2),
/*!
* @brief Provides aircraft's acceleration in an IMU-centered, body-fixed \b FRD frame @ up to 400Hz
* @details This is a filtered output from the IMU on board the flight control system.
* @sensors IMU
* @units m/s<SUP>2</SUP>
* @datastruct \ref T_DjiFcSubscriptionAccelerationRaw
*/
DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_RAW = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 3),
/*!
* @brief Velocity of aircraft topic name. Velocity topic provides aircraft's velocity in a ground-fixed NEU frame.
* Please refer to ::T_DjiFcSubscriptionVelocity for information about data structure.
* @warning Please note that this data is not in a conventional right-handed frame of reference.
* @details This velocity data is a fusion output from the aircraft. Original output is in a right-handed NED frame, but the
* sign of the Z-axis velocity is flipped before publishing to this topic. So if you are looking to get velocity
* in an NED frame, simply flip the sign of the z-axis value. Beyond that, you can convert using rotations to
* any right-handed frame of reference.
* | Axis | Unit | Accuracy |
|----------|------|---------------------------------------------------------------------------------------------|
| vgx, vgy | m/s | Around 5cm/s for GNSS navigation. Around 3cm/s with VO at 1 meter height |
| vgz | m/s | 10cm/s only with barometer in steady air. 3cm/s with VO at 1 meter height with 8cm baseline |
* @datastruct \ref T_DjiFcSubscriptionVelocity
*/
DJI_FC_SUBSCRIPTION_TOPIC_VELOCITY = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 4),
/*!
* @brief Provides aircraft's angular velocity in a ground-fixed \b NED frame @ up to 200Hz
* @details This is a fusion output from the flight control system.
* @units rad/s
* @datastruct \ref T_DjiFcSubscriptionAngularRateFusioned
*/
DJI_FC_SUBSCRIPTION_TOPIC_ANGULAR_RATE_FUSIONED = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 5),
/*!
* @brief Provides aircraft's angular velocity in an IMU-centered, body-fixed \b FRD frame @ up to 400Hz
* @details This is a filtered output from the IMU on board the flight control system.
* @sensors IMU
* @units rad/s
* @datastruct \ref T_DjiFcSubscriptionAngularRateRaw
*/
DJI_FC_SUBSCRIPTION_TOPIC_ANGULAR_RATE_RAW = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 6),
/*!
* @brief Fused altitude of aircraft topic name. Fused altitude topic provides aircraft's fused altitude from sea
* level. Please refer to ::T_DjiFcSubscriptionAltitudeFused for information about data structure.
* @units m
* @datastruct \ref T_DjiFcSubscriptionAltitudeFused
*/
DJI_FC_SUBSCRIPTION_TOPIC_ALTITUDE_FUSED = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 7),
/*!
* @brief Provides aircraft's pressure altitude from sea level using the ICAO model @ up to 200Hz
* @details
* This is a filetered output from the barometer without any further fusion.
*
* The ICAO model gives an MSL altitude of 1013.25mBar at 15&deg; C and a temperature lapse rate of -6.5&deg; C
* per 1000m. In your case, it may be possible that the take off altitude of the aircraft is recording a higher pressure
* than 1013.25mBar. Let's take an example - a weather station shows that SFO (San Francisco International Airport) had
* recently recorded a pressure of 1027.1mBar. SFO is 4m above MSL, yet, if you calculate the Pressure Altitude using
* the ICAO model, it relates to -114m. You can use an online calculator to similarly calculate the Pressure Altitude
* in your area.
*
* Another factor that may affect your altitude reading is manufacturing differences in the barometer - it is not
* uncommon to have a variation of &plusmn;30m readings at the same physical location with two different aircraft. For a given
* aircraft, these readings will be consistent, so you will need to calibrate the offset of your system if your code
* relies on the accuracy of the absolute value of altitude.
* @sensors GPS, Barometer, IMU
* @units m
* @datastruct \ref T_DjiFcSubscriptionAltitudeBarometer
*/
DJI_FC_SUBSCRIPTION_TOPIC_ALTITUDE_BAROMETER = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 8),
/*!
* @brief Provides the altitude from sea level when the aircraft last took off.
* @details
* This is a fusion output from the flight control system, and also uses the ICAO model.
*
* The ICAO model gives an MSL altitude of 1013.25mBar at 15&deg; C and a temperature lapse rate of -6.5&deg; C
* per 1000m. In your case, it may be possible that the take off altitude of the aircraft is recording a higher pressure
* than 1013.25mBar. Let's take an example - a weather station shows that SFO (San Francisco International Airport) had
* recently recorded a pressure of 1027.1mBar. SFO is 4m above MSL, yet, if you calculate the Pressure Altitude using
* the ICAO model, it relates to -114m. You can use an online calculator to similarly calculate the Pressure Altitude
* in your area.
*
* Another factor that may affect your altitude reading is manufacturing differences in the barometer - it is not
* uncommon to have a variation of &plusmn;30m readings at the same physical location with two different aircraft. For a given
* aircraft, these readings will be consistent, so you will need to calibrate the offset of your system if your code
* relies on the accuracy of the absolute value of altitude.
*
* @note This value is updated each time the drone takes off.
*
* @units m
* @datastruct \ref T_DjiFcSubscriptionAltitudeOfHomePoint
*/
DJI_FC_SUBSCRIPTION_TOPIC_ALTITUDE_OF_HOMEPOINT = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 9),
/*!
* @brief Provides the relative height above ground at up to 100Hz.
* @details
* 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.
* A large object is something that covers the ultrasonic sensor for an extended duration of time.
*
* @warning This topic does not come with a 'valid' flag - so if the aircraft is too far from an object for the
* ultrasonic sensors/VO to provide any meaningful data, the values will latch and there is no way for user code to
* determine if the data is valid or not. Use with caution.
* @sensors Visual Odometry, Ultrasonic
* @units m
* @datastruct \ref T_DjiFcSubscriptionHeightFusion
*/
DJI_FC_SUBSCRIPTION_TOPIC_HEIGHT_FUSION = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 10),
/*!
* @brief Relative height above ground of aircraft topic name. Please refer to
* ::T_DjiFcSubscriptionHeightRelative for information about data structure.
* @details This data is a fusion output from aircraft. The height is a direct estimate of the closest large object
* below the aircraft's ultrasonic sensors.
* @warning This topic does not come with a 'valid' flag - so if the aircraft is too far from an object for the
* ultrasonic sensors/VO to provide any meaningful data, the values will latch and there is no way for user to
* determine if the data is valid or not. Please use with caution.
* @datastruct \ref T_DjiFcSubscriptionHeightRelative
*/
DJI_FC_SUBSCRIPTION_TOPIC_HEIGHT_RELATIVE = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 11),
/*!
* Fused position of aircraft topic name. Please refer to ::T_DjiFcSubscriptionPositionFused for information
* about data structure.
* @warning Please note that if GPS signal is weak (low visibleSatelliteNumber, see below), the
* latitude/longitude values won't be updated but the altitude might still be. There is currently no way to know if
* the lat/lon update is healthy.
* @details The most important component of this topic is the T_DjiFcSubscriptionPositionFused::visibleSatelliteNumber.
* Use this to track your GPS satellite coverage and build some heuristics for when you might expect to lose GPS updates.
* | Axis | Unit | Position Sensor | Accuracy |
|------|------|-----------------|--------------------------------------------------|
| x, y | m | GPS | <3m with open sky without multipath |
| z | m | GPS | <5m with open sky without multipath |
* @datastruct \ref T_DjiFcSubscriptionPositionFused
*/
DJI_FC_SUBSCRIPTION_TOPIC_POSITION_FUSED = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 12),
/*!
* @brief GPS date topic name. Please refer to ::T_DjiFcSubscriptionGpsDate for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionGpsDate
*/
DJI_FC_SUBSCRIPTION_TOPIC_GPS_DATE = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 13),
/*!
* @brief GPS time topic name. Please refer to ::T_DjiFcSubscriptionGpsTime for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionGpsTime
*/
DJI_FC_SUBSCRIPTION_TOPIC_GPS_TIME = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 14),
/*!
* @brief GPS position topic name. Please refer to ::T_DjiFcSubscriptionGpsPosition for information about data structure.
* @details
* | Axis | Accuracy |
|------|--------------------------------------------------|
| x, y | <3m with open sky without multipath |
| z | <5m with open sky without multipath |
* @datastruct \ref T_DjiFcSubscriptionGpsPosition
*/
DJI_FC_SUBSCRIPTION_TOPIC_GPS_POSITION = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 15),
/*!
* @brief GPS velocity topic name. Please refer to ::T_DjiFcSubscriptionGpsVelocity for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionGpsVelocity
*/
DJI_FC_SUBSCRIPTION_TOPIC_GPS_VELOCITY = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 16),
/*!
* @brief GPS details topic name. GPS details topic provides GPS state and other detail information. Please refer
* to ::T_DjiFcSubscriptionGpsDetail for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionGpsDetails
*/
DJI_FC_SUBSCRIPTION_TOPIC_GPS_DETAILS = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 17),
/*!
* @brief GPS signal level topic name. This topic provides a measure of the quality of GPS signal. Please refer to
* ::T_DjiFcSubscriptionGpsSignalLevel for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionGpsSignalLevel
*/
DJI_FC_SUBSCRIPTION_TOPIC_GPS_SIGNAL_LEVEL = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 18),
/*!
* @brief RTK position topic name. Please refer to ::T_DjiFcSubscriptionRtkPosition for information about data structure.
* @details
* | Axis | Accuracy |
|------|--------------------------------------------------|
| x, y | ~2cm with fine alignment and fix condition |
| z | ~3cm with fine alignment and fix condition |
* @datastruct \ref T_DjiFcSubscriptionRtkPosition
*/
DJI_FC_SUBSCRIPTION_TOPIC_RTK_POSITION = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 19),
/*!
* @brief RTK velocity topic name. Please refer to ::T_DjiFcSubscriptionRtkVelocity for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionRtkVelocity
*/
DJI_FC_SUBSCRIPTION_TOPIC_RTK_VELOCITY = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 20),
/*!
* @brief RTK yaw topic name. Please refer to ::T_DjiFcSubscriptionRtkYaw for information about data structure.
* @details The RTK yaw will provide the vector from ANT1 to ANT2 as configured in DJI Assistant 2. This
* means that the value of RTK yaw will be 90deg offset from the yaw of the aircraft.
* @datastruct \ref T_DjiFcSubscriptionRtkYaw
*/
DJI_FC_SUBSCRIPTION_TOPIC_RTK_YAW = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 21),
/*!
* @brief RTK position information topic name. RTK position information topic provides a state of RTK position
* solution. Please refer to ::T_DjiFcSubscriptionRtkPositionInfo for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionRtkPositionInfo
*/
DJI_FC_SUBSCRIPTION_TOPIC_RTK_POSITION_INFO = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 22),
/*!
* @brief RTK yaw topic name. RTK yaw information topic provides a state of RTK yaw solution. Please refer to
* ::T_DjiFcSubscriptionRtkYawInfo for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionRtkYawInfo
*/
DJI_FC_SUBSCRIPTION_TOPIC_RTK_YAW_INFO = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 23),
/*!
* @brief Provides aircraft's magnetometer reading, fused with IMU and GPS @ up to 100Hz
* @details This reading is the magnetic field recorded by the magnetometer in x,y,z axis, calibrated such that
* 1000 < |m| < 2000, and fused with IMU and GPS for robustness
* @sensors Magnetometer, IMU, GPS
* @units N/A
* @datastruct \ref T_DjiFcSubscriptionCompass
*/
DJI_FC_SUBSCRIPTION_TOPIC_COMPASS = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 24),
/*!
* @brief Provides remote controller stick inputs @ up to 100Hz
* @details This topic will give you:
* - Stick inputs (R,P,Y,Thr)
* - Mode switch (P/A/F)
* - Landing gear switch (Up/Down)
*
* @datastruct \ref T_DjiFcSubscriptionRC
* @also \ref TOPIC_RC_WITH_FLAG_DATA
*/
DJI_FC_SUBSCRIPTION_TOPIC_RC = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 25),
/*!
* @brief Provides gimbal pitch, roll, yaw @ up to 50Hz
* @details
* The reference frame for gimbal angles is a NED frame attached to the gimbal.
* This topic uses a data structure, Vector3f, that is too generic for the topic. The order of angles is :
* |Data Structure Element| Meaning|
* |----------------------|--------|
* |Vector3f.x |pitch |
* |Vector3f.y |roll |
* |Vector3f.z |yaw |
*
* @perf
* 0.1 deg accuracy in all axes
*
* @sensors Gimbal Encoder, IMU, Magnetometer
* @units deg
* @datastruct \ref T_DjiFcSubscriptionGimbalAngles
* @also \ref TOPIC_GIMBAL_STATUS, \ref TOPIC_GIMBAL_CONTROL_MODE
*/
DJI_FC_SUBSCRIPTION_TOPIC_GIMBAL_ANGLES = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 26),
/*!
* @brief Provides gimbal status and error codes @ up to 50Hz
* @details Please see the \ref GimbalStatus struct for the details on what data you can receive.
*
* @datastruct \ref T_DjiFcSubscriptionGimbalStatus
* @also \ref TOPIC_GIMBAL_ANGLES, \ref TOPIC_GIMBAL_CONTROL_MODE
*/
DJI_FC_SUBSCRIPTION_TOPIC_GIMBAL_STATUS = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 27),
/*!
* @brief Flight status topic name. Please refer to ::T_DjiFcSubscriptionFlightStatus for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionFlightStatus
*/
DJI_FC_SUBSCRIPTION_TOPIC_STATUS_FLIGHT = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 28),
/*!
* @brief Provides a granular state representation for various tasks/flight modes @ up to 50Hz
* @details Typically, use this topic together with \ref TOPIC_STATUS_FLIGHT to get a
* better understanding of the overall status of the aircraft.
*
* @datastruct \ref T_DjiFcSubscriptionDisplaymode
* @also \ref TOPIC_STATUS_FLIGHT
*/
DJI_FC_SUBSCRIPTION_TOPIC_STATUS_DISPLAYMODE = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 29),
/*!
* @brief Provides status for the landing gear state @ up to 50Hz
*
* @datastruct \ref T_DjiFcSubscriptionLandinggear
*/
DJI_FC_SUBSCRIPTION_TOPIC_STATUS_LANDINGGEAR = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 30),
/*!
* @brief If motors failed to start, this topic provides reasons why. Available @ up to 50Hz
* @datastruct \ref T_DjiFcSubscriptionMotorStartError
* \note These enumerations show up in the ErrorCode class because they can also be returned as acknowledgements
* for APIs that start the motors, such as \ref Control::takeoff "Takeoff" or \ref Control::armMotors "Arm"
*/
DJI_FC_SUBSCRIPTION_TOPIC_STATUS_MOTOR_START_ERROR = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC,
31),
/*!
* @brief Battery information topic name. Please refer to ::T_DjiFcSubscriptionWholeBatteryInfo for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionWholeBatteryInfo
*/
DJI_FC_SUBSCRIPTION_TOPIC_BATTERY_INFO = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 32),
/*!
* @brief Provides states of the aircraft related to SDK/RC control
* @details The following information is available in this topic:
* |Data Structure Element| Meaning|
* |----------------------|--------|
* |controlMode |The modes in which the aircraft is being controlled (control loops being applied on horizontal, vertical and yaw axes of the aircraft)|
* |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) |
* |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. |
* |vrcStatus |Deprecated|
* @datastruct \ref T_DjiFcSubscriptionControlDevice
*/
DJI_FC_SUBSCRIPTION_TOPIC_CONTROL_DEVICE = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 33),
/*!
* @brief Provides IMU and quaternion data time-synced with a hardware clock signal @ up to 400Hz.
* @details This is the only data which can be synchronized with external software or hardware systems. If you want to
* fuse an external sensor's data with the aircraft's IMU, this data along with a hardware trigger from the A3/N3's
* expansion ports is how you would do it. You can see detailed documentation on how this process works in the [Hardware
* Sync Guide](https://developer.dji.com/onboard-sdk/documentation/guides/component-guide-hardware-sync.html).
* @sensors IMU, sensor fusion output
* @units
* |Data Structure Element| Units|
* |----------------------|--------|
* |Timestamp |2.5ms, 1ns (See \ref SyncTimestamp)|
* |Quaternion |rad (after converting to rotation matrix)|
* |Acceleration |g|
* |Gyroscope |rad/sec|
* @datastruct \ref T_DjiFcSubscriptionHardSync
*/
DJI_FC_SUBSCRIPTION_TOPIC_HARD_SYNC = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 34),
/*!
* @brief Provides a measure of the quality of GPS signal, with a mechanism for guarding against unset homepoint @ up to 50Hz
* @details The level varies from 0 to 5, with 0 being the worst and 5 the best GPS signal. The key difference between
* this and TOPIC_GPS_SIGNAL_LEVEL is that this topic always returns 0 if the homepoint is not set. Once the home point is
* set, the behavior is exactly the same as TOPIC_GPS_SIGNAL_LEVEL.
* @sensors GPS
* @datastruct \ref T_DjiFcSubscriptionGpsControlLevel
* @also \ref TOPIC_GPS_SIGNAL_LEVEL
*/
DJI_FC_SUBSCRIPTION_TOPIC_GPS_CONTROL_LEVEL = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 35),
/*!
* @brief Provides normalized remote controller stick input data, along with connection status @ up to 50Hz
* @note This topic was added in August 2018. Your aircraft may require a FW update to enable this feature.
* @details This topic will give you:
* - Stick inputs (R,P,Y,Thr)
* - Mode switch (P/A/F)
* - Landing gear switch (Up/Down)
* - Connection status for air system, ground system and MSDK apps. The connection status also includes a
* logicConnected element, which will change to false if either the air system or the ground system radios
* are disconnected for >3s.
* - Deadzones near the center of the stick positions are also handled in this topic.
*
* @datastruct \ref T_DjiFcSubscriptionRCWithFlagData
* @also \ref TOPIC_RC
*/
DJI_FC_SUBSCRIPTION_TOPIC_RC_WITH_FLAG_DATA = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 36),
/*!
* @brief Provides raw data from the ESCs @ up to 50Hz
* @note This topic was added in August 2018. Your aircraft may require a FW update to enable this feature.
* @details This topic supports reporting data for up to 8 ESCs; note that only DJI Intelligent ESCs are supported
* for this reporting feature. Use this topic to get data on elements close to the hardware - e.g. motor speeds,
* ESC current and voltage, error flags at the ESC level etc.
* @datastruct \ref T_DjiFcSubscriptionEscData
*/
DJI_FC_SUBSCRIPTION_TOPIC_ESC_DATA = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 37),
/*!
* @brief Provides RTK connection status @ up to 50Hz
* @note This topic was added in August 2018. Your aircraft may require a FW update to enable this feature.
* @details This topic will update in real time whether the RTK GPS system is connected or not; typical uses
* include app-level logic to switch between GPS and RTK sources of positioning based on this flag.
* @datastruct \ref T_DjiFcSubscriptionRTKConnectStatus
*/
DJI_FC_SUBSCRIPTION_TOPIC_RTK_CONNECT_STATUS = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 38),
/*!
* @brief Provides the mode in which the gimbal will interpret control commands @ up to 50Hz
* @note This topic was added in August 2018. Your aircraft may require a FW update to enable this feature.
* @details This topic will report the current control mode which can be set in the
* DJI Go app, MSDK apps, or through Onboard SDK gimbal control APIs (see \ref Gimbal::AngleData "AngleData" struct
* for more information)
* @datastruct \ref T_DjiFcSubscriptionGimbalControlMode
*/
DJI_FC_SUBSCRIPTION_TOPIC_GIMBAL_CONTROL_MODE = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 39),
/*!
* @brief Provides a number of flags which report different errors the aircraft may encounter in flight @ up to 50Hz
* @note This topic was added in August 2018. Your aircraft may require a FW update to enable this feature.
* @warning Most of the errors reported by this topic are cases where immediate action is required; you can use these
* as a baseline for implementing safety-related error-handling routines.
* @datastruct \ref T_DjiFcSubscriptionFlightAnomaly
*/
DJI_FC_SUBSCRIPTION_TOPIC_FLIGHT_ANOMALY = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 40),
/*!
* @brief Provides aircraft's position in a Cartesian frame @ up to 50Hz, without the need for GPS
* @warning This topic does not follow a standard co-ordinate convention. Please read the details below for usage.
* @details This is the only topic which can provide positioning information without having a GPS fix; though this
* can be a big enabler please note the caveats of using this topic:
* - The topic will use an origin that does not have a global reference, and is not published to the SDK.
* - The topic uses a combination of VO and compass heading to identify the X-Y axes of its reference frame. This means
* that if your compass performance is not good in an environment, there is no guarantee the X-Y axes will point to
* North and East.
* - The actual directions of the X-Y axes are currently not published to the SDK.
* - If during a flight the compass performance were to change dramatically, the orientation of the X-Y axes may change
* to re-align with North-East. The aircraft's position in X and Y may exhibit discontinuities in these cases.
* - The reference frame is referred to as the Navigation Frame - Cartesian X,Y axes aligned with N,E directions on a best-effort
* basis, and Z aligned to D (down) direction.
* - A health flag for each axis provides some granularity on whether this data is valid or not.
*
* The key takeaway from these details is that this topic provides a best-effort attempt at providing position
* information in the absence of absolute references (GPS, compass etc.), without guarantees of consistency if
* environmental conditions change. So if your application is confined to a stable environment, or if you will
* have GPS and compass available at all times, this topic can still provide useful data that cannot be otherwise
* had. If using for control, make sure to have guards checking for the continuity of data.
*
* @note Since this topic relies on visual features and/or GPS, if your environment does not provide any of these
* sources of data, the quality of this topic will reduce significantly. VO data quality will reduce if you are too high
* above the ground. Make sure that the Vision Positioning System is enabled in DJI Go 4 before using this topic
* (by default it is enabled).
* @sensors IMU, VO, GPS(if available), RTK (if available), ultrasonic, magnetometer, barometer
* @units m
* @datastruct \ref T_DjiFcSubscriptionPositionVO
*/
DJI_FC_SUBSCRIPTION_TOPIC_POSITION_VO = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 41),
/*!
* @brief Provides obstacle info around the vehicle @ up to 100Hz
* @datastruct \ref T_DjiFcSubscriptionAvoidData
*/
DJI_FC_SUBSCRIPTION_TOPIC_AVOID_DATA = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 42),
/*!
* @brief Provides status of whether the home point was set or not
* @datastruct \ref T_DjiFcSubscriptionHomePointSetStatus
*/
DJI_FC_SUBSCRIPTION_TOPIC_HOME_POINT_SET_STATUS = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 43),
/*!
* @brief Provides homepoint information, the valid of the home point infomation can ref to the
* topic DJI_FC_SUBSCRIPTION_TOPIC_HOME_POINT_SET_STATUS
* @datastruct \ref T_DjiFcSubscriptionHomePointInfo
*/
DJI_FC_SUBSCRIPTION_TOPIC_HOME_POINT_INFO = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 44),
/*!
* @brief Provides three gimbal information, used for M300
* @datastruct \ref T_DjiFcSubscriptionThreeGimbalData
*/
DJI_FC_SUBSCRIPTION_TOPIC_THREE_GIMBAL_DATA = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 45),
/*!
* @brief Battery information topic name. Please refer to ::T_DjiFcSubscriptionSingleBatteryInfo for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionSingleBatteryInfo
*/
DJI_FC_SUBSCRIPTION_TOPIC_BATTERY_SINGLE_INFO_INDEX1 = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC,
46),
/*!
* @brief Battery information topic name. Please refer to ::T_DjiFcSubscriptionSingleBatteryInfo for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionSingleBatteryInfo
*/
DJI_FC_SUBSCRIPTION_TOPIC_BATTERY_SINGLE_INFO_INDEX2 = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC,
47),
/*!
* @brief Please refer to ::T_DjiFcSubscriptionImuAttiNaviDataWithTimestamp for information about data structure.
* @datastruct \ref T_DjiFcSubscriptionImuAttiNaviDataWithTimestamp
*/
DJI_FC_SUBSCRIPTION_TOPIC_IMU_ATTI_NAVI_DATA_WITH_TIMESTAMP = DJI_DATA_SUBSCRIPTION_TOPIC(DJI_DATA_SUBSCRIPTION_MODULE_FC, 48),
/*! Total number of topics that can be subscribed. */
DJI_FC_SUBSCRIPTION_TOPIC_TOTAL_NUMBER,
} E_DjiFcSubscriptionTopic;
/**
* @brief Health state of data subscribed.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_DATA_NOT_HEALTH = 0, /*!< Data subscribed is healthy and can be used. */
DJI_FC_SUBSCRIPTION_DATA_HEALTH = 1, /*!< Data subscribed is not healthy and recommend not to use it. */
} E_DjiFcSubscriptionDataHealthFlag;
/**
* @brief Position solution property.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_NOT_AVAILABLE = 0, /*!< Position solution is not available. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_FIX_POSITION = 1, /*!< Position has been fixed by the FIX POSITION command. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_FIX_HEIGHT_AUTO = 2, /*!< Position has been fixed by the FIX HEIGHT/AUTO command. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_INSTANTANEOUS_DOPPLER_COMPUTE_VELOCITY = 8, /*!< Velocity computed using instantaneous Doppler. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_SINGLE_PNT_SOLUTION = 16, /*!< Single point position solution. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_PSEUDORANGE_DIFFERENTIAL_SOLUTION = 17, /*!< Pseudorange differential solution. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_SBAS_CORRECTION_CALCULATED = 18, /*!< Solution calculated using corrections from an SBAS. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_KALMAN_FILTER_WITHOUT_OBSERVATION_PROPAGATED = 19, /*!< Propagated by a Kalman filter without new observations. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_OMNISTAR_VBS_POSITION = 20, /*!< OmniSTAR VBS position (L1 sub-metre). */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_FLOAT_L1_AMBIGUITY = 32, /*!< Floating L1 ambiguity solution. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_FLOAT_IONOSPHERIC_FREE_AMBIGUITY = 33, /*!< Floating ionospheric-free ambiguity solution. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_FLOAT_SOLUTION = 34, /*!< Float position solution. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_L1_AMBIGUITY_INT = 48, /*!< Integer L1 ambiguity solution. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_WIDE_LANE_AMBIGUITY_INT = 49, /*!< Integer wide-lane ambiguity solution. */
DJI_FC_SUBSCRIPTION_POSITION_SOLUTION_PROPERTY_NARROW_INT = 50, /*!< Narrow fixed point position solution. */
} E_DjiFcSubscriptionPositionSolutionProperty;
/**
* @brief GPS fix state.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_GPS_FIX_STATE_NO_FIX = 0, /*!< GPS position has not been fixed. */
DJI_FC_SUBSCRIPTION_GPS_FIX_STATE_DEAD_RECKONING_ONLY = 1, /*!< GPS position is dead reckoned only. */
DJI_FC_SUBSCRIPTION_GPS_FIX_STATE_2D_FIX = 2, /*!< The horizontal position with latitude/longitude (or northing/easting or X/Y) is fixed. */
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. */
DJI_FC_SUBSCRIPTION_GPS_FIX_STATE_GPS_PLUS_DEAD_RECKONING = 4, /*!< Position is calculated by GPS and combined with dead reckoning. */
DJI_FC_SUBSCRIPTION_GPS_FIX_STATE_TIME_ONLY_FIX = 5, /*!< Only time is fixed. */
} E_DjiFcSubscriptionGpsFixState;
/**
* @brief Flight status of aircraft.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_FLIGHT_STATUS_STOPED = 0, /*!< Aircraft is on ground and motors are still. */
DJI_FC_SUBSCRIPTION_FLIGHT_STATUS_ON_GROUND = 1, /*!< Aircraft is on ground but motors are rotating. */
DJI_FC_SUBSCRIPTION_FLIGHT_STATUS_IN_AIR = 2, /*!< Aircraft is in air. */
} E_DjiFcSubscriptionFlightStatus;
/*!
* @brief "Mode" of the vehicle's state machine, as displayed on DJI Go
* @details Available through Telemetry::TOPIC_STATUS_DISPLAYMODE
*/
typedef enum {
/*! This mode requires the user to manually
* control the aircraft to remain stable in air. */
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_MANUAL_CTRL = 0,
/*! In this mode, the aircraft can keep
* attitude stabilization and only use the
* barometer for positioning to control the altitude. <br>
* The aircraft can not autonomously locate and hover stably.*/
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_ATTITUDE = 1,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_2 = 2,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_3 = 3,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_4 = 4,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_5 = 5,
/*! The aircraft is in normal GPS mode. <br>
* In normal GPS mode, the aircraft can
* autonomously locate and hover stably. <br>
* The sensitivity of the aircraft to the
* command response is moderate.
*/
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_P_GPS = 6,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_7 = 7,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_8 = 8,
/*! In hotpoint mode */
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_HOTPOINT_MODE = 9,
/*! In this mode, user can push the throttle
* stick to complete stable take-off. */
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_ASSISTED_TAKEOFF = 10,
/*! In this mode, the aircraft will autonomously
* start motor, ascend and finally hover. */
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_AUTO_TAKEOFF = 11,
/*! In this mode, the aircraft can land autonomously. */
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_AUTO_LANDING = 12,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_13 = 13,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_14 = 14,
/*! In this mode, the aircraft can antonomously return the
* last recorded Home Point. <br>
* There are three types of this mode: Smart RTH(Return-to-Home),
* Low Batterry RTH, and Failsafe RTTH. */
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_NAVI_GO_HOME = 15,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_16 = 16,
/*! In this mode, the aircraft is controled by SDK API. <br>
* User can directly define the control mode of horizon
* and vertical directions and send control datas to aircraft. */
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_NAVI_SDK_CTRL = 17,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_18 = 18,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_19 = 19,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_20 = 20,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_21 = 21,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_22 = 22,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_23 = 23,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_24 = 24,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_25 = 25,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_26 = 26,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_27 = 27,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_28 = 28,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_29 = 29,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_30 = 30,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_31 = 31,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_32 = 32,
/*! drone is forced to land, might due to low battery */
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_FORCE_AUTO_LANDING = 33,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_34 = 34,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_35 = 35,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_36 = 36,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_37 = 37,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_38 = 38,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_39 = 39,
/*! drone will search for the last position where the rc is not lost */
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_SEARCH_MODE = 40,
/*! Mode for motor starting. <br>
* Every time user unlock the motor, this will be the first mode. */
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_ENGINE_START = 41,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_42 = 42,
DJI_FC_SUBSCRIPTION_DISPLAY_MODE_RESERVED_43 = 42,
} E_DjiFcSubscriptionDisplayMode;
/**
* @brief Setting status of homepoint.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_HOME_POINT_SET_STATUS_FAILED = 0, /*!< The home point was not set yet. */
DJI_FC_SUBSCRIPTION_HOME_POINT_SET_STATUS_SUCCESS = 1, /*!< The home point was set successfully. */
} E_DjiFcSubscriptionHomePointSetStatus;
/**
* @brief Smart battery self-check result.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_NORMAL = 0, /*!< Battery self-check is normal. */
DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_NTC_ABNORMAL = 1, /*!< Battery self-check NTC is abnormal. */
DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_MOS_ABNORMAL = 2, /*!< Battery self-check MOS is abnormal. */
DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_R_ABNORMAL = 3, /*!< Battery self-check sampling resistance is abnormal. */
DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_CELL_DAMAGE = 4, /*!< Battery cell self-check is damaged. */
DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_CAL_EXP = 5, /*!< Battery self-check is not calibrated. */
DJI_FC_SUBSCRIPTION_BATTERY_SELF_CHECK_GAUGE_PARM_EXP = 6, /*!< Battery self-check fuel gauge parameters is abnormal. */
} E_DJIFcSubscriptionBatterySelfCheck;
/**
* @brief Smart battery closed reason.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_NORMAL = 0, /*!< Battery closed reason is normal shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_FORCED = 1, /*!< Battery closed reason is forced by flight controller shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_SCD = 2, /*!< Battery closed reason is discharge short circuit shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_OLD = 3, /*!< Battery closed reason is discharge overload shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_OCD = 4, /*!< Battery closed reason is discharge over current shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_UVD = 5, /*!< Battery closed reason is discharge under voltage shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_OTD = 6, /*!< Battery closed reason is discharge over temperature shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_SCC = 16, /*!< Battery closed reason is charging short circuit shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_OCC = 17, /*!< Battery closed reason is charging over current shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_OVC = 18, /*!< Battery closed reason is charging over voltage shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_CHARGER_OVC = 19, /*!< Battery closed reason is charger over voltage shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_LTC = 20, /*!< Battery closed reason is charging low temperature shutdown. */
DJI_FC_SUBSCRIPTION_BATTERY_CLOSED_HTC = 21, /*!< Battery closed reason is charging high temperature shutdown. */
} E_DJIFcSubscriptionBatteryClosedReason;
/**
* @brief Smart battery SOH state.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_BATTERY_SOH_NORMAL = 0, /*!< Battery SOH state is normal. */
DJI_FC_SUBSCRIPTION_BATTERY_SOH_ALERT = 1, /*!< Battery SOH state is alert. */
DJI_FC_SUBSCRIPTION_BATTERY_SOH_SAFE = 2, /*!< Battery SOH state is safe. */
} E_DJIFcSubscriptionBatterySohState;
/**
* @brief Smart battery heart state.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_BATTERY_NO_HEAT = 0, /*!< Battery is in no heat state. */
DJI_FC_SUBSCRIPTION_BATTERY_IN_HEAT = 1, /*!< Battery is in heat state. */
DJI_FC_SUBSCRIPTION_BATTERY_KEEP_WARM = 2, /*!< Battery is in keep warm state. */
} E_DJIFcSubscriptionBatteryHeatState;
/**
* @brief Smart battery SOC state.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_BATTERY_SOC_NORMAL = 0, /*!< Battery SOC state is normal. */
DJI_FC_SUBSCRIPTION_BATTERY_SOC_ABNORMAL_HIGH = 1, /*!< Battery SOC state is abnormal high. */
DJI_FC_SUBSCRIPTION_BATTERY_SOC_JUMP_DOWN = 2, /*!< Battery SOC state is jump down. */
DJI_FC_SUBSCRIPTION_BATTERY_SOC_JUMP_UP = 3, /*!< Battery SOC state is jump up. */
DJI_FC_SUBSCRIPTION_BATTERY_SOC_INVALID = 4, /*!< Battery SOC state is invalid. */
} E_DJIFcSubscriptionBatterySocState;
/**
* @brief Flight control mode.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_CONTROL_MODE_UNKNOWN = 0,
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_VEL_YAW_ANG = 1, /*!< Horizontal mode is angle, vertical mode is velocity, yaw mode is angle. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_VEL_YAW_RAT = 2, /*!< Horizontal mode is angle, vertical mode is velocity, yaw mode is rate. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_VEL_YAW_ANG = 3, /*!< Horizontal mode is velocity, vertical mode is velocity, yaw mode is angle. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_VEL_YAW_RAT = 4, /*!< Horizontal mode is velocity, vertical mode is velocity, yaw mode is rate. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_VEL_YAW_ANG = 5, /*!< Horizontal mode is position, vertical mode is velocity, yaw mode is angle. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_VEL_YAW_RAT = 6, /*!< Horizontal mode is position, vertical mode is velocity, yaw mode is rate. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_POS_YAW_ANG = 7, /*!< Horizontal mode is angle, vertical mode is position, yaw mode is angle. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_POS_YAW_RAT = 8, /*!< Horizontal mode is angle, vertical mode is position, yaw mode is rate. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_POS_YAW_ANG = 9, /*!< Horizontal mode is velocity, vertical mode is position, yaw mode is angle. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_POS_YAW_RAT = 10, /*!< Horizontal mode is velocity, vertical mode is position, yaw mode is rate. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_POS_YAW_ANG = 11, /*!< Horizontal mode is position, vertical mode is position, yaw mode is angle. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_POS_YAW_RAT = 12, /*!< Horizontal mode is position, vertical mode is position, yaw mode is rate. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_THR_YAW_ANG = 13, /*!< Horizontal mode is angle, vertical mode is thrust, yaw mode is angle. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_ANG_VER_THR_YAW_RAT = 14, /*!< Horizontal mode is angle, vertical mode is thrust, yaw mode is rate. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_THR_YAW_ANG = 15, /*!< Horizontal mode is velocity, vertical mode is thrust, yaw mode is angle. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_VEL_VER_THR_YAW_RAT = 16, /*!< Horizontal mode is velocity, vertical mode is thrust, yaw mode is rate. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_THR_YAW_ANG = 17, /*!< Horizontal mode is position, vertical mode is thrust, yaw mode is angle. */
DJI_FC_SUBSCRIPTION_CONTROL_MODE_HOR_POS_VER_THR_YAW_RAT = 18, /*!< Horizontal mode is position, vertical mode is thrust, yaw mode is rate. */
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. */
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. */
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. */
} E_DJIFcSubscriptionControlMode;
/**
* @brief Flight control authority.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_CONTROL_AUTHORITY_RC = 0, /*!< Authority is in remote control */
DJI_FC_SUBSCRIPTION_CONTROL_AUTHORITY_MSDK = 1, /*!< Authority is in MSDK */
DJI_FC_SUBSCRIPTION_CONTROL_AUTHORITY_PSDK = 4, /*!< Authority is in PSDK */
DJI_FC_SUBSCRIPTION_CONTROL_AUTHORITY_DOCK = 5, /*!< Authority is in dock */
} E_DJIFcSubscriptionControlAuthority;
/**
* @brief Flight control authority change reason.
*/
typedef enum {
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_UNKNOWN = 0, /*!< Reason unknown */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_MSDK_REQUEST = 1, /*!< Contro authority changed by MSDK request. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_USER_REQUEST = 2, /*!< Contro authority changed by user request. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_PSDK_REQUEST = 3, /*!< Contro authority changed by PSDK request. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_RC_LOST = 4, /*!< Contro authority changed for remote control lost. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_RC_NOT_P_MODE = 5, /*!< Contro authority changed for remote control not in P mode. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_RC_SWITCH = 6, /*!< Contro authority changed for remote control switching mode. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_RC_PAUSE_STOP = 7, /*!< Contro authority changed for remote control stop key paused. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_RC_ONE_KEY_GO_HOME = 8, /*!< Contro authority changed for remote control go-home key paused. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_BATTERY_LOW_GO_HOME = 9, /*!< Contro authority changed for remote control go-home key paused. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_BATTERY_SUPER_LOW_LANDING = 10, /*!< Contro authority changed for going home caused by low batter power. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_PSDK_LOST = 11, /*!< Contro authority changed for PSDK lost. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_NEAR_BOUNDARY = 13, /*!< Contro authority changed for nearing boundary. */
DJI_FC_SUBSCRIPTION_AUTHORITY_CHANGE_REASON_AIRPORT_REQUEST = 14, /*!< Contro authority changed by airport request. */
} E_DJIFcSubscriptionAuthorityChangeReason;
#pragma pack(1)
/**
* @brief Quaternion topic data structure.
*/
typedef struct Quaternion {
dji_f32_t q0; /*!< w, rad (when converted to a rotation matrix or Euler angles). */
dji_f32_t q1; /*!< x, rad (when converted to a rotation matrix or Euler angles). */
dji_f32_t q2; /*!< y, rad (when converted to a rotation matrix or Euler angles). */
dji_f32_t q3; /*!< z, rad (when converted to a rotation matrix or Euler angles). */
} T_DjiFcSubscriptionQuaternion;
/**
* @brief DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_GROUND topic data structure.
*/
typedef T_DjiVector3f T_DjiFcSubscriptionAccelerationGround;
/**
* @brief DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_BODY topic data structure.
*/
typedef T_DjiVector3f T_DjiFcSubscriptionAccelerationBody;
/**
* @brief DJI_FC_SUBSCRIPTION_TOPIC_ACCELERATION_RAW topic data structure.
*/
typedef T_DjiVector3f T_DjiFcSubscriptionAccelerationRaw;
/**
* @brief DJI_FC_SUBSCRIPTION_TOPIC_VELOCITY topic data structure.
*/
typedef struct Velocity {
/*! Velocity of aircraft. */
T_DjiVector3f data;
/*! Health state of aircraft velocity data. It can be any value of ::E_DjiFcSubscriptionDataHealthFlag. */
uint8_t health: 1;
/*! Reserved. */
uint8_t reserve: 7;
} T_DjiFcSubscriptionVelocity;
/**
* @brief DJI_FC_SUBSCRIPTION_TOPIC_ANGULAR_RATE_FUSIONED topic data structure.
*/
typedef T_DjiVector3f T_DjiFcSubscriptionAngularRateFusioned;
/**
* @brief DJI_FC_SUBSCRIPTION_TOPIC_ANGULAR_RATE_RAW topic data structure.
*/
typedef T_DjiVector3f T_DjiFcSubscriptionAngularRateRaw;
/**
* @brief DJI_FC_SUBSCRIPTION_TOPIC_ANGULAR_RATE_RAW topic data structure.
*/
typedef dji_f32_t T_DjiFcSubscriptionAltitudeFused;
/**
* @brief DJI_FC_SUBSCRIPTION_TOPIC_ALTITUDE_BAROMETER topic data structure.
*/
typedef dji_f32_t T_DjiFcSubscriptionAltitudeBarometer;
/**
* @brief DJI_FC_SUBSCRIPTION_TOPIC_ALTITUDE_OF_HOMEPOINT topic data structure.
*/
typedef dji_f32_t T_DjiFcSubscriptionAltitudeOfHomePoint;
/**
* @brief DJI_FC_SUBSCRIPTION_TOPIC_HEIGHT_FUSION topic data structure.
*/
typedef dji_f32_t T_DjiFcSubscriptionHeightFusion;
/**
* @brief Relative height above ground topic data structure, unit: m.
*/
typedef dji_f32_t T_DjiFcSubscriptionHeightRelative;
/**
* @brief Fused position topic data structure.
*/
typedef struct PositionFused {
dji_f64_t longitude; /*!< Longitude, unit: rad. */
dji_f64_t latitude; /*!< Latitude, unit: rad. */
dji_f32_t altitude; /*!< Altitude, WGS 84 reference ellipsoid, unit: m. */
uint16_t visibleSatelliteNumber; /*!< Number of visible satellites. */
} T_DjiFcSubscriptionPositionFused;
/**
* @brief GPS date topic data structure, format: yyyymmdd.
*/
typedef uint32_t T_DjiFcSubscriptionGpsDate;
/**
* @brief GPS time topic data structure, format: hhmmss.
*/
typedef uint32_t T_DjiFcSubscriptionGpsTime;
/**
* @brief GPS position topic data structure. x = Longitude, y = Latitude, z = Altitude, unit: deg*10<SUP>-7</SUP>
* (Lat,Lon), mm (Alt)
*/
typedef T_DjiVector3d T_DjiFcSubscriptionGpsPosition;
/**
* @brief GPS velocity topic data structure, unit: cm/s.
*/
typedef T_DjiVector3f T_DjiFcSubscriptionGpsVelocity;
/**
* @brief GPS details topic data structure.
*/
typedef struct GpsDetail {
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. */
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. */
dji_f32_t fixState; /*!< GPS fix state, and can be any value of ::E_DjiFcSubscriptionGpsFixState. Value other than ::E_DjiFcSubscriptionGpsFixState is invalid. */
dji_f32_t vacc; /*!< Vertical position accuracy (mm), the smaller, the better. */
dji_f32_t hacc; /*!< Horizontal position accuracy (mm), the smaller, the better. */
dji_f32_t sacc; /*!< Speed accuracy (cm/s), the smaller, the better. */
uint32_t gpsSatelliteNumberUsed; /*!< Number of GPS satellites used for fixing position. */
uint32_t glonassSatelliteNumberUsed; /*!< Number of GLONASS satellites used for fixing position. */
uint16_t totalSatelliteNumberUsed; /*!< Total number of satellites used for fixing position. */
uint16_t gpsCounter; /*!< Accumulated times of sending GPS data. */
} T_DjiFcSubscriptionGpsDetails;
/**
* @brief GPS signal level topic data structure. Signal level of GPS. The level varies from 0 to 5, with 0 being the
* worst and 5 the best GPS signal.
*/
typedef uint8_t T_DjiFcSubscriptionGpsSignalLevel;
/**
* @brief RTK position topic data structure.
*/
typedef struct PositionData {
dji_f64_t longitude; /*!< Longitude, unit: deg. */
dji_f64_t latitude; /*!< Latitude, unit: deg. */
dji_f32_t hfsl; /*!< Height above mean sea level, unit: m. */
} T_DjiFcSubscriptionRtkPosition;
/**
* @brief RTK velocity topic data structure, unit: cm/s.
*/
typedef T_DjiVector3f T_DjiFcSubscriptionRtkVelocity;
/**
* @brief RTK yaw topic data structure, unit: deg.
*/
typedef int16_t T_DjiFcSubscriptionRtkYaw;
/**
* @brief RTK position information topic data structure. Specifies RTK position solution state, it can be any value of
* ::E_DjiFcSubscriptionPositionSolutionProperty.
*/
typedef uint8_t T_DjiFcSubscriptionRtkPositionInfo;
/**
* @brief RTK yaw information topic data structure. Specifies RTK yaw solution state, it can be any value of
* ::E_DjiFcSubscriptionPositionSolutionProperty.
*/
typedef uint8_t T_DjiFcSubscriptionRtkYawInfo;
/*!
* @brief struct for data broadcast, return magnetometer reading
*
* @note returned value is calibrated mag data,
* 1000 < |mag| < 2000 for normal operation
*/
typedef struct Mag {
int16_t x;
int16_t y;
int16_t z;
} T_DjiFcSubscriptionCompass;
/*!
* @brief struct for data broadcast and data subscription, return RC reading
*/
typedef struct RC {
int16_t roll; /*!< [-10000,10000] */
int16_t pitch; /*!< [-10000,10000] */
int16_t yaw; /*!< [-10000,10000] */
int16_t throttle; /*!< [-10000,10000] */
int16_t mode; /*!< [-10000,10000] */
/*!< M100 [P: -8000, A: 0, F: 8000] */
int16_t gear; /*!< [-10000,10000] */
/*!< M100 [Up: -10000, Down: -4545] */
} T_DjiFcSubscriptionRC;
typedef T_DjiVector3f T_DjiFcSubscriptionGimbalAngles;
/*!
* @brief struct for TOPIC_GIMBAL_STATUS
*/
typedef struct GimbalStatus {
uint32_t mountStatus: 1; /*!< 1 - gimbal mounted, 0 - gimbal not mounted*/
uint32_t isBusy: 1;
uint32_t pitchLimited: 1; /*!< 1 - axis reached limit, 0 - no */
uint32_t rollLimited: 1; /*!< 1 - axis reached limit, 0 - no */
uint32_t yawLimited: 1; /*!< 1 - axis reached limit, 0 - no */
uint32_t calibrating: 1; /*!< 1 - calibrating, 0 - no */
uint32_t prevCalibrationgResult: 1; /*!< 1 - success, 0 - fail */
uint32_t installedDirection: 1; /*!< 1 - reversed for OSMO, 0 - normal */
uint32_t disabled_mvo: 1;
uint32_t gear_show_unable: 1;
uint32_t gyroFalut: 1; /*!< 1 - fault, 0 - normal */
uint32_t escPitchStatus: 1; /*!< 1 - Pitch data is normal, 0 - fault */
uint32_t escRollStatus: 1; /*!< 1 - Roll data is normal, 0 - fault */
uint32_t escYawStatus: 1; /*!< 1 - Yaw data is normal , 0 - fault */
uint32_t droneDataRecv: 1; /*!< 1 - normal , 0 - at fault */
uint32_t initUnfinished: 1; /*!< 1 - init complete, 0 - not complete */
uint32_t FWUpdating: 1; /*!< 1 - updating, 0 - not updating */
uint32_t reserved2: 15;
} T_DjiFcSubscriptionGimbalStatus;
/**
* @brief Flight status information topic data structure. It can be any value of ::E_DjiFcSubscriptionFlightStatus.
*/
typedef uint8_t T_DjiFcSubscriptionFlightStatus;
typedef uint8_t T_DjiFcSubscriptionDisplaymode;
typedef uint8_t T_DjiFcSubscriptionLandinggear;
typedef uint16_t T_DjiFcSubscriptionMotorStartError;
typedef struct {
uint32_t reserved: 12;
uint32_t cellBreak: 5; /*!< 0: normal; other: under voltage core index(0x01-0x1F). */
uint32_t selfCheckError: 3; /*!< enum-type: E_DJIFcSubscriptionBatterySelfCheck. */
uint32_t reserved1: 7;
uint32_t batteryClosedReason: 5; /*!< enum-type: E_DJIFcSubscriptionBatteryClosedReason. */
uint8_t reserved2: 6; /*!< 0: CHG state; 1: DSG state; 2: ORING state. */
uint8_t batSOHState: 2; /*!< enum-type: E_DJIFcSubscriptionBatterySohState. */
uint8_t maxCycleLimit: 6; /*!< APP: cycle_limit*10. */
uint8_t reserved3: 2;
uint16_t lessBattery: 1;
uint16_t batteryCommunicationAbnormal: 1;
uint16_t reserved4: 3;
uint16_t hasCellBreak: 1;
uint16_t reserved5: 4;
uint16_t isBatteryEmbed: 1; /*!< 0:embed; 1:not embed. */
uint16_t heatState: 2; /*!< enum-type: E_DJIFcSubscriptionBatteryHeatState. */
uint16_t socState: 3; /*!< enum-type: E_DJIFcSubscriptionBatterySocState. */
} T_DjiFcSubscriptionSingleBatteryState;
/**
* @brief Battery information topic data structure.
*/
typedef struct BatteryWholeInfo {
uint32_t capacity; /*!< Battery capacity, unit: mAh. */
int32_t voltage; /*!< Battery voltage, unit: mV. */
int32_t current; /*!< Battery current, unit: mA. */
uint8_t percentage; /*!< Battery capacity percentage, unit: 1%. */
} T_DjiFcSubscriptionWholeBatteryInfo;
typedef struct BatterySingleInfo {
uint8_t reserve;
uint8_t batteryIndex;
int32_t currentVoltage; /*!< uint: mV. */
int32_t currentElectric; /*!< uint: mA. */
uint32_t fullCapacity; /*!< uint: mAh. */
uint32_t remainedCapacity; /*!< uint: mAh. */
int16_t batteryTemperature; /*!< uint: 0.1℃. */
uint8_t cellCount;
uint8_t batteryCapacityPercent; /*!< uint: %. */
T_DjiFcSubscriptionSingleBatteryState batteryState;
uint8_t reserve1;
uint8_t reserve2;
uint8_t SOP; /*!< Relative power percentage. */
} T_DjiFcSubscriptionSingleBatteryInfo;
/*!
* @brief struct for TOPIC_CONTROL_DEVICE and data broadcast, return SDK info
*/
typedef struct SDKCtrlInfo {
union {
/* Used by M300 & M350 */
struct {
uint8_t controlMode; /*!< enum-type: E_DJIFcSubscriptionControlMode. */
uint8_t deviceStatus: 3; /*!< 0->rc 1->app 4->psdk */
uint8_t flightStatus: 1; /*!< 1->open 0->closed */
uint8_t vrcStatus: 1;
uint8_t reserved: 3;
};
/* Used by other aircrafts */
struct {
uint8_t controlAuthority; /*!< enum-type: E_DJIFcSubscriptionControlAuthority. */
uint8_t controlAuthorityChangeReason; /*!< enum-type: E_DJIFcSubscriptionAuthorityChangeReason. */
};
};
} T_DjiFcSubscriptionControlDevice; // pack(1)
/*!
* @brief sub struct for TOPIC_HARD_SYNC
*/
typedef struct SyncTimestamp {
uint32_t time2p5ms; /*!< clock time in multiples of 2.5ms. Sync timer runs at
400Hz, this field increments in integer steps */
uint32_t time1ns; /*!< nanosecond time offset from the 2.5ms pulse */
uint32_t resetTime2p5ms; /*!< clock time in multiple of 2.5ms elapsed since the
hardware sync started */
uint16_t index; /*!< This is the tag field you filled out when using the
setSyncFreq API above; use it to identify the packets that
have sync data. This is useful when you call the
setSyncFreq API with freqInHz = 0, so you get a single
pulse that can be uniquely identified with a tag - allowing
you to create your own pulse train with uniquely
identifiable pulses. */
uint8_t flag; /*!< This is true when the packet corresponds to a hardware
pulse and false otherwise. This is useful because you can
request the software packet to be sent at a higher frequency
that the hardware line.*/
} SyncTimestamp; // pack(1)
/*!
* @brief struct for TOPIC_HARD_SYNC
*/
typedef struct HardSyncData {
SyncTimestamp ts; /*!< time stamp for the incoming data */
struct Quaternion q; /*!< quaternion */
T_DjiVector3f a; /*!< accelerometer reading unit: g */
T_DjiVector3f w; /*!< gyro reading unit: rad/sec */
} T_DjiFcSubscriptionHardSync;
typedef uint8_t T_DjiFcSubscriptionGpsControlLevel;
/*!
* @brief struct for TOPIC_RC_WITH_FLAG_DATA
*/
typedef struct RCWithFlagData {
dji_f32_t pitch; /*!< down = -0.999, middle = 0.000, up =0.999 */
dji_f32_t roll; /*!< left = -0.999, middle = 0.000, right=0.999 */
dji_f32_t yaw; /*!< left = -0.999, middle = 0.000, right=0.999 */
dji_f32_t throttle; /*!< down = -0.999, middle = 0.000, up =0.999 */
struct {
uint8_t logicConnected: 1; /*!< 0 if sky or ground side is disconnected for 3 seconds */
uint8_t skyConnected: 1; /*!< Sky side is connected, i.e., receiver is connected to FC */
uint8_t groundConnected: 1; /*!< Ground side is connected, i.e., RC is on and connected to FC */
uint8_t appConnected: 1; /*!< Mobile App is connected to RC */
uint8_t reserved: 4;
} flag;
} T_DjiFcSubscriptionRCWithFlagData;
/*!
* @brief struct for status of each individual esc
*/
typedef struct ESCStatusIndividual {
int16_t current; /*!< ESC current, unit: mA */
int16_t speed; /*!< ESC speed, unit: rpm */
uint16_t voltage; /*!< Input power from battery to ESC, unit: mV */
int16_t temperature; /*!< ESC temperature, unit: degree C */
uint16_t stall: 1; /*!< Motor is stall */
uint16_t empty: 1; /*!< Motor has no load */
uint16_t unbalanced: 1; /*!< Motor speed is unbalanced */
uint16_t escDisconnected: 1; /*!< ESC is disconnected */
uint16_t temperatureHigh: 1; /*!< Temperature is high */
uint16_t reserved: 11;
} ESCStatusIndividual;
/*!
* @brief struct for TOPIC_ESC_DATA
*/
typedef struct EscData {
ESCStatusIndividual esc[8];
} T_DjiFcSubscriptionEscData;
/*!
* @brief struct indicating RTK GPS Connection
*/
typedef struct RTKConnectStatus {
uint16_t rtkConnected: 1;
uint16_t reserve: 15;
} T_DjiFcSubscriptionRTKConnectStatus;
typedef uint8_t T_DjiFcSubscriptionGimbalControlMode;
/*!
* @brief struct for TOPIC_FLIGHT_ANOMALY
*/
typedef struct FlightAnomaly {
uint32_t impactInAir: 1; /*!< 0: No impact, 1: Impact happens in Air */
uint32_t randomFly: 1; /*!< 0: Normal, 1: Randomly fly in GPS mode without stick input*/
uint32_t heightCtrlFail: 1; /*!< 0: Height control normal, 1: Height control failed */
uint32_t rollPitchCtrlFail: 1; /*!< 0: Tilt control normal, 1: Tilt control failed */
uint32_t yawCtrlFail: 1; /*!< 0: Yaw control normal, 1: Yaw control failed */
uint32_t aircraftIsFalling: 1; /*!< 0: Aircraft is not falling, 1: Aircraft is falling */
uint32_t strongWindLevel1: 1; /*!< 0: Wind is under big wind level 1, 1: wind is stronger than big wind level 1*/
uint32_t strongWindLevel2: 1; /*!< 0: Wind is under big wind level 2, 1: wind is stronger than big wind level 2*/
uint32_t compassInstallationError: 1; /*!< 0: Compass install right, 1: Compass install error */
uint32_t imuInstallationError: 1; /*!< 0: IMU install right, 1: IMU install error */
uint32_t escTemperatureHigh: 1; /*!< 0: ESC temperature is normal, 1: ESC temperature is high */
uint32_t atLeastOneEscDisconnected: 1; /*!< 0: No ESC disconnected, 1: At least one ESC is disconnected */
uint32_t gpsYawError: 1; /*!< 0: No GPS yaw error, 1: GPS yaw error */
uint32_t reserved: 19;
} T_DjiFcSubscriptionFlightAnomaly;
/*!
* @brief struct for TOPIC_POSITION_VO
*/
typedef struct PositionVO {
dji_f32_t x; /*!< North (best effort), unit: m */
dji_f32_t y; /*!< East (best effort), unit: m */
dji_f32_t z; /*!< Down, unit: m */
uint8_t xHealth: 1;
uint8_t yHealth: 1;
uint8_t zHealth: 1;
uint8_t reserved: 5;
} T_DjiFcSubscriptionPositionVO;
/*!
* @brief struct for data broadcast and subscription, return obstacle info around the vehicle
*
*/
typedef struct RelativePosition {
dji_f32_t down; /*!< distance from obstacle (m) */
dji_f32_t front; /*!< distance from obstacle (m) */
dji_f32_t right; /*!< distance from obstacle (m) */
dji_f32_t back; /*!< distance from obstacle (m) */
dji_f32_t left; /*!< distance from obstacle (m) */
dji_f32_t up; /*!< distance from obstacle (m) */
uint8_t downHealth: 1; /*!< Down sensor flag: 0 - not working, 1 - working */
uint8_t frontHealth: 1; /*!< Front sensor flag: 0 - not working, 1 - working */
uint8_t rightHealth: 1; /*!< Right sensor flag: 0 - not working, 1 - working */
uint8_t backHealth: 1; /*!< Back sensor flag: 0 - not working, 1 - working */
uint8_t leftHealth: 1; /*!< Left sensor flag: 0 - not working, 1 - working */
uint8_t upHealth: 1; /*!< Up sensor health flag: 0 - not working, 1 - working */
uint8_t reserved: 2; /*!< Reserved sensor health flag*/
} T_DjiFcSubscriptionAvoidData;
/**
* @brief Struct for the topic DJI_FC_SUBSCRIPTION_TOPIC_HOME_POINT_SET_STATUS. Specifies homepoint was set or not,
* it can be any value of ::E_DjiFcSubscriptionHomePointSetStatus.
*/
typedef uint8_t T_DjiFcSubscriptionHomePointSetStatus;
/**
* @brief Struct for the topic DJI_FC_SUBSCRIPTION_TOPIC_HOME_POINT_INFO. Specifies homepoint.
*/
typedef struct HomeLocationData {
dji_f64_t latitude; /*!< unit: rad */
dji_f64_t longitude; /*!< unit: rad */
} T_DjiFcSubscriptionHomePointInfo; // pack(1)
typedef struct GimbalSingleData {
dji_f32_t roll;
dji_f32_t pitch;
dji_f32_t yaw;
} GimbalAnglesData;
/**
* @brief Struct for the topic DJI_FC_SUBSCRIPTION_TOPIC_THREE_GIMBAL_DATA. Used in M300
*/
typedef struct GimbalThreeData {
GimbalAnglesData anglesData[3];
} T_DjiFcSubscriptionThreeGimbalData;
/**
* @brief Struct for the topic DJI_FC_SUBSCRIPTION_TOPIC_IMU_ATTI_NAVI_DATA_WITH_TIMESTAMP. Used in M300
*/
typedef struct ImuAttiNaviDataWithTimestamp {
uint16_t version;
uint16_t flag;
dji_f32_t pn_x;
dji_f32_t pn_y;
dji_f32_t pn_z;
dji_f32_t vn_x;
dji_f32_t vn_y;
dji_f32_t vn_z;
dji_f32_t an_x;
dji_f32_t an_y;
dji_f32_t an_z;
dji_f32_t q[4];
uint16_t resv;
uint16_t cnt;
uint32_t timestamp;
} T_DjiFcSubscriptionImuAttiNaviDataWithTimestamp;
#pragma pack()
/* Exported functions --------------------------------------------------------*/
/**
* @brief Initialise data subscription module in blocking mode. This function has to be called before subscribing any
* data, to initialize run environment of data subscription module, if need to subscribe data from aircraft.
* @note Max execution time of this function is slightly larger than 500ms.
* @note This function has to be called in user task, rather than main() function, and after scheduler being started.
* @return Execution result.
*/
T_DjiReturnCode DjiFcSubscription_Init(void);
/**
* @brief Deinitialize data subscription module. When data subscription will no longer be used, can call this function
* to deinitialize the data subscription module. Deinitialization function will help to release all system resource data
* subscription has occupied.
* @return Execution result.
*/
T_DjiReturnCode DjiFcSubscription_DeInit(void);
/**
* @brief Subscribe a topic in blocking mode. Before subscribing any data from aircraft, DjiFcSubscription_Init()
* function has to be called.
* @details User can subscribe a topic by specifying topic name, push frequency and callback function used to receive
* data of topic (if needed). After subscribing successfully, the user can call
* DjiFcSubscription_GetLatestValueOfTopic() function to get the latest data of the topic have been
* subscribed and the corresponding timestamp when aircraft sends the data out, and the callback function will be called to
* push data of the topic and corresponding timestamp if the callback function is specified.
* @note Max execution time of this function is slightly larger than 1200ms.
* @note Topic to be subscribed can not have been subscribed, that is, one topic can not be subscribed repeatedly.
* @note User must ensure that types of subscription frequency of all topics have been subscribed is less than or
* equal to 4. Otherwise, the subscribing topic will fail.
* @note User must ensure that the data length sum of all topics of the same subscription frequency is less than or equal to 242.
* @param topic: topic name to be subscribed.
* @param frequency: subscription frequency of topic to be subscribed. Subscription frequency can not beyond max
* frequency limitation of the topic and must be the value of enum E_DjiFcSubscriptionTopicFreq. And, subscription
* frequency has to be larger than 0. Users can find max frequency of topics in data subscription part of documentation
* on developer website (developer.dji.com).
* @param callback: callback function used to receive data of topic to be subscribed. If the callback function is not needed,
* this item can be set as NULL.
* @return Execution result.
*/
T_DjiReturnCode DjiFcSubscription_SubscribeTopic(E_DjiFcSubscriptionTopic topic,
E_DjiDataSubscriptionTopicFreq frequency,
DjiReceiveDataOfTopicCallback callback);
/**
* @brief Unsubscribe a topic in blocking mode. Before unsubscribing any data from aircraft, DjiFcSubscription_Init()
* and DjiFcSubscription_SubscribeTopic() function has to be called,
* @details User can unsubscribe a topic by specifying topic name, but the topic must be unsubscribed in the order of subscription.
* @note Topic to be unsubscribed must have been subscribed.
* @note Topic to be unsubscribed must be in the order of subscription, similar to a queue, subscription is similar to enqueue,
* unsubscription is similar to dequeue.
* @param topic: topic name to be unsubscribed.
* @return Execution result.
*/
T_DjiReturnCode DjiFcSubscription_UnSubscribeTopic(E_DjiFcSubscriptionTopic topic);
/**
* @brief Get the latest data value and timestamp in aircraft time system when sending the data from aircraft of specified
* topic. If the specified topic has not been subscribed successfully, this function will return the error code.
* @note After calling this function, user need transfer type of data pointer that pointer to data of topic to
* corresponding data structure pointer for getting every item of the topic conveniently.
* @param topicName: topic name to be gotten value.
* @param data: pointer to memory space used to store data of the topic. The memory space used to store data of topic
* have to have been allocated correctly and should ensure its size is equal to data structure size corresponding to
* the topic, otherwise, this function will not be able to return data and timestamp (return error code).
* @param dataSizeOfTopic: the size of memory space used to store data of topic. Normally, this size is equal to data
* structure size corresponding to the topic. If this size is not equal to the size of the memory space, may cause memory
* overflow event
* @param timestamp: pointer to memory space used to store timestamps. The memory space used to store timestamps
* have to have been allocated correctly, and should ensure its size is equal to data structure size of timestamp,
* otherwise, this function will not be able to return data and timestamp (return error code) or even cause memory
* overflow event. If the user does not need timestamp information, can fill in NULL. Use flight controller power-on
* timestamp on M300 RTK. Use payload local timestamp on M30/M30T.
* @return Execution result.
*/
T_DjiReturnCode DjiFcSubscription_GetLatestValueOfTopic(E_DjiFcSubscriptionTopic topic,
uint8_t *data, uint16_t dataSizeOfTopic,
T_DjiDataTimestamp *timestamp);
#ifdef __cplusplus
}
#endif
#endif // DJI_FC_SUBSCRIPTION_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
... ...