Skip to content

Commit

Permalink
NEW: release DJI Payload-SDK version 3.2
Browse files Browse the repository at this point in the history
Signed-off-by: DJI-Martin <DJI-Martin@dji.com>
  • Loading branch information
DJI-Martin authored and DJI-Martin committed Aug 8, 2022
1 parent 42099ba commit 08b76b6
Show file tree
Hide file tree
Showing 50 changed files with 564 additions and 260 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Expand Up @@ -28,9 +28,7 @@ endif ()
if (USE_SYSTEM_ARCH MATCHES LINUX)
add_definitions(-DSYSTEM_ARCH_LINUX)
add_subdirectory(samples/sample_c/platform/linux/manifold2)

message("-- Attention: If you want to use opencv C++ sample, please uncomment the next line.")
# 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)
Expand Down
76 changes: 57 additions & 19 deletions LICENSE.txt
Expand Up @@ -6,11 +6,15 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   ├── dji_sdk_code_style
│   │   ├── dji_sdk_template.c
│   │   └── dji_sdk_template.h
│   ├── reference_designs
│   │   └── Type-C Schematic Reference.pdf
│   └── simple_model
│   ├── M300_OSDK_Adapter.stp
│   ├── M300_RTK_1.stp
│   ├── M300_RTK_2.stp
│   ├── M300_RTK_3.stp
│   ├── M30T.stp
│   ├── PSDK Mounting Bracket(Payload).stp
│   ├── Skyport_Adapter_2.stp
│   └── X-Port 80mm.stp
├── EULA.txt
Expand Down Expand Up @@ -43,6 +47,7 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   │   ├── 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
Expand Down Expand Up @@ -75,7 +80,7 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   ├── aarch64-linux-gnu-gcc
│   │   └── libpayloadsdk.a
│   ├── armcc_cortex-m4
│   │   └── libpayloadsdk.lib
│   │   └── libpayload.lib
│   ├── arm-himix100-linux-gcc
│   │   └── libpayloadsdk.a
│   ├── arm-himix200-linux-gcc
Expand All @@ -96,7 +101,9 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   │   └── libpayloadsdk.a
│   ├── arm-none-eabi-gcc
│   │   └── libpayloadsdk.a
│   └── x86_64-linux-gnu-gcc
│   ├── x86_64-linux-gnu-gcc
│   │   └── libpayloadsdk.a
│   └── xtensa-esp32-elf-gcc
│   └── libpayloadsdk.a
├── README.md
├── samples
Expand Down Expand Up @@ -186,11 +193,20 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   │   │   ├── 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
Expand Down Expand Up @@ -261,8 +277,9 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   │   ├── linux
│   │   │   ├── common
│   │   │   │   ├── 3rdparty
│   │   │   │   │   └── ffmpeg
│   │   │   │   │   └── FindFFMPEG.cmake
│   │   │   │   │   ├── FindFFMPEG.cmake
│   │   │   │   │   ├── FindLIBUSB.cmake
│   │   │   │   │   └── FindOPUS.cmake
│   │   │   │   ├── monitor
│   │   │   │   │   ├── sys_monitor.c
│   │   │   │   │   └── sys_monitor.h
Expand Down Expand Up @@ -302,12 +319,24 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   │   │   ├── 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
Expand All @@ -321,15 +350,16 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   │   │   │   ├── stm32f4xx_it.h
│   │   │   │   ├── syscalls.c
│   │   │   │   ├── sysmem.c
│   │   │   │   ├── sysmem.h
│   │   │   │   ├── system_stm32f4xx.c
│   │   │   │   ├── uart.c
│   │   │   │   └── uart.h
│   │   │   │   ├── uart.h
│   │   │   │   ├── upgrade_platform_opt_stm32.c
│   │   │   │   └── upgrade_platform_opt_stm32.h
│   │   │   ├── CMSIS
│   │   │   │   ├── Device
│   │   │   │   │   └── ST
│   │   │   │   │   └── STM32F4xx
│   │   │   │   │   ├── Include
│   │   │   │   │   └── Source
│   │   │   │   └── Include
│   │   │   ├── STM32F4xx_HAL_Driver
│   │   │   │   ├── Inc
Expand Down Expand Up @@ -378,21 +408,22 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   │   │   ├── stream_buffer.c
│   │   │   ├── tasks.c
│   │   │   └── timers.c
│   │   └── project
│   │   ├── clion_app
│   │   │   ├── CMakeLists.txt
│   │   │   ├── STM32F407VGTX_FLASH.ld
│   │   │   └── stm32f4discovery.cfg
│   │   └── mdk_app
│   │   └── mdk_app.uvprojx
│   │   ├── project
│   │   │   ├── armgcc
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── STM32F407VGTX_FLASH.ld
│   │   │   │   └── stm32f4discovery.cfg
│   │   │   ├── mdk
│   │   │   │   └── mdk_app.uvprojx
│   │   │   └── mdk_bootloader
│   │   │   └── mdk_bootloader.uvprojx
│   │   └── readme.txt
│   └── sample_c++
│   ├── module_sample
│   │   ├── liveview
│   │   │   ├── data
│   │   │   │   ├── cars.xml
│   │   │   │   ├── 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
Expand All @@ -410,24 +441,31 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   └── platform
│   └── linux
│   ├── common
│   │   ├── 3rdparty
│   │   │   ├── FindFFMPEG.cmake
│   │   │   ├── FindLIBUSB.cmake
│   │   │   └── FindOPUS.cmake
│   │   └── osal
│   │   ├── osal.c
│   │   └── osal.h
│   │   ├── 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
│   │   └── main.cpp
│   ├── CMakeLists.txt
│   ├── FindFFMPEG.cmake
│   └── hal
│   ├── hal_network.c
│   ├── hal_network.h
│   ├── hal_uart.c
│   ├── hal_uart.h
│   ├── hal_usb_bulk.c
│ └── hal_usb_bulk.h
   └── hal_usb_bulk.h
└── tools
└── file2c
├── file2c.exe
Expand Down
32 changes: 23 additions & 9 deletions README.md
@@ -1,6 +1,6 @@
# DJI Payload SDK (PSDK)

![](https://img.shields.io/badge/version-V3.1.0-orange.svg)
![](https://img.shields.io/badge/version-V3.2.0-orange.svg)
![](https://img.shields.io/badge/platform-linux_|_rtos-green.svg)
![](https://img.shields.io/badge/license-MIT-blue.svg)
[![Join the chat at https://gitter.im/dji-sdk/Payload-SDK](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dji-sdk/Payload-SDK?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Expand All @@ -15,17 +15,31 @@ Payload Controller, Video Image Analysis Platform, Mapping Camera, Megaphone And

## Documentation

For full documentation, please visit the [DJI Developer Documentation](https://developer.dji.com/payload-sdk/documentation/).
Documentation regarding the code can be found in the [PSDK API Reference](https://developer.dji.com/payload-api-reference/introduction/index.html) section of the developer's website.
Please visit the [Latest Version Information](https://developer.dji.com/payload-sdk/documentation/appendix/firmware.html) to get the latest version information.
For full documentation, please visit
the [DJI Developer Documentation](https://developer.dji.com/payload-sdk/documentation/). Documentation regarding the
code can be found in the [PSDK API Reference](https://developer.dji.com/payload-api-reference/introduction/index.html)
section of the developer's website. Please visit
the [Latest Version Information](https://developer.dji.com/payload-sdk/documentation/appendix/firmware.html) to get the
latest version information.

## Latest Release

PSDK 3.1.0 was released on 21 March 2022. This version of Payload SDK mainly add some features support, such as add the
Matrice 30/30T support, add the standard speaker widget support on M30/M30T, add the waypoint 3.0 support on M30/30T, add the
get camera laser ranging data support on M30/30T, add the power-off notification support on M300 RTK OSDK port, etc. At
the same time, we also fixed some bugs on the last version, add more sample support and add ESP32 toolchain support.
Please refer to the release notes for detailed changes list.
PSDK 3.2.0 was released on 08 August 2022. This version of Payload SDK mainly add some features support and fixed some
bugs. Please refer to the release notes for detailed changes list.

* Add the support of standard speaker on M300 RTK, M30/M30T Pilot
* Add the support of the mapping between the speaker with the remote controller button on M300 RTK, M30/M30T Pilot
* Add function support for H20N on M300 RTK
* Add infrared zoom function support of H20T on M300 RTK
* Fix the occasional problem of the Camera Livestream can not be subscribed on M30/M30T
* Fix the problem of some interfaces of camera management run error on M30/M30T
* Fix the problem of the infrared code stream can not be obtained on M30/M30T
* Fix the problem of RTOS platform data subscription crash on M30/M30T
* Fix the occasional problem of abnormal media download function on M300 RTK
* Fix the occasional problem of abnormal SDK interconnection function on M300 RTK
* Fix the occasional problem of the PSDK payload name displays abnormally
* Fix the coordinate system problem of the gimbal angle of the data subscription function
* Optimize the compilation dependency problems of third-party dependent libraries

## License

Expand Down
17 changes: 15 additions & 2 deletions psdk_lib/include/dji_camera_manager.h
Expand Up @@ -509,7 +509,8 @@ typedef enum {
typedef struct {
E_DjiDownloadFileEvent downloadFileEvent;
uint32_t fileIndex;
uint8_t progressInPercent;
uint32_t fileSize;
float progressInPercent;
} T_DjiDownloadFilePacketInfo;

typedef struct {
Expand Down Expand Up @@ -767,6 +768,15 @@ T_DjiReturnCode DjiCameraManager_SetOpticalZoomParam(E_DjiMountPosition position
T_DjiReturnCode DjiCameraManager_GetOpticalZoomParam(E_DjiMountPosition position,
T_DjiCameraManagerOpticalZoomParam *opticalZoomParam);

/**
* @brief Set parameters for camera 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 Stop camera optical zooming of the selected camera mounted position.
* @note Called to stop focal length changing, when it currently is from
Expand Down Expand Up @@ -957,6 +967,8 @@ T_DjiReturnCode DjiCameraManager_StopRecordVideo(E_DjiMountPosition position);

/**
* @brief Download selected camera media file list.
* @note The interface is a synchronous interface, which occupies more CPU resources when using it.
* If the download file fails, the timeout time is 3S.
* @param position: the mount position of the camera
* @param fileList: the pointer to the downloaded camera file list
* @return Execution result.
Expand All @@ -975,7 +987,8 @@ T_DjiReturnCode DjiCameraManager_RegDownloadFileDataCallback(E_DjiMountPosition
/**
* @brief Download selected camera media file by file index.
* @note Only support download one file at the same time, the new file download need wait for the previous file
* download finished.
* download finished.The interface is a synchronous interface, which occupies more CPU resources when using it.
* If the download file fails, the timeout time is 3S.
* @param position: the mount position of the camera
* @param fileIndex: the index of the camera media file
* @return Execution result.
Expand Down
6 changes: 6 additions & 0 deletions psdk_lib/include/dji_core.h
Expand Up @@ -89,6 +89,12 @@ T_DjiReturnCode DjiCore_SetAlias(const char *productAlias);
*/
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
Expand Down
8 changes: 3 additions & 5 deletions psdk_lib/include/dji_fc_subscription.h
Expand Up @@ -157,7 +157,6 @@ typedef enum {
*
* @note This value is updated each time the drone takes off.
*
* @sensors Visual Odometry (M210 only), Barometer, IMU
* @units m
* @datastruct \ref T_DjiFcSubscriptionAltitudeOfHomePoint
*/
Expand Down Expand Up @@ -935,8 +934,7 @@ typedef struct BatterySingleInfo {
*/
typedef struct SDKCtrlInfo {
uint8_t controlMode; /*!< See CtlrMode in dji_status.hpp*/
uint8_t deviceStatus: 3; /*!< For M300 and M210V2(firmware version V01.00.0690 and later):0->rc 1->app 4->serial;
Other: 0->rc 1->app 2->serial*/
uint8_t deviceStatus: 3; /*!< 0->rc 1->app 4->serial */
uint8_t flightStatus: 1; /*!< 1->opensd 0->close */
uint8_t vrcStatus: 1;
uint8_t reserved: 3;
Expand Down Expand Up @@ -1062,7 +1060,6 @@ typedef struct PositionVO {
/*!
* @brief struct for data broadcast and subscription, return obstacle info around the vehicle
*
* @note available in M210 (front, up, down)
*/
typedef struct RelativePosition {
dji_f32_t down; /*!< distance from obstacle (m) */
Expand Down Expand Up @@ -1170,7 +1167,8 @@ T_DjiReturnCode DjiFcSubscription_SubscribeTopic(E_DjiFcSubscriptionTopic topic,
* @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.
* 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,
Expand Down

0 comments on commit 08b76b6

Please sign in to comment.