NEW: release DJI Payload-SDK version 3.11.0

This commit is contained in:
carter.liu
2025-03-06 23:35:53 +08:00
parent a8dc2f5628
commit 9392afc416
18 changed files with 36 additions and 12 deletions

View File

@ -1,8 +1,8 @@
# 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)
![](https://img.shields.io/badge/version-V3.11.0-orange.svg)
![](https://img.shields.io/badge/platform-linux_|_rtos-purple.svg)
![](https://img.shields.io/badge/license-MIT-pink.svg)
## What is the DJI Payload SDK?
@ -23,11 +23,10 @@ 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
The latest release version of PSDK is 3.11.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).
* Supports Matrice 4TD/4D models
## License

View File

@ -74,6 +74,9 @@ typedef enum {
DJI_LIVEVIEW_CAMERA_SOURCE_M4E_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M4T_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M4T_IR = 2,
DJI_LIVEVIEW_CAMERA_SOURCE_M4D_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M4TD_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M4TD_IR = 2,
} E_DjiLiveViewCameraSource;
/**

View File

@ -98,6 +98,7 @@ typedef enum {
DJI_AIRCRAFT_SERIES_M3D = 6,
DJI_AIRCRAFT_SERIES_FC30 = 7,
DJI_AIRCRAFT_SERIES_M4 = 8,
DJI_AIRCRAFT_SERIES_M4D = 9,
} E_DjiAircraftSeries;
typedef enum {
@ -116,6 +117,8 @@ typedef enum {
DJI_AIRCRAFT_TYPE_M3TD = 93, /*!< Aircraft type is Matrice 3TD. */
DJI_AIRCRAFT_TYPE_M4T = 99, /*!< Aircraft type is Mavic 4T. */
DJI_AIRCRAFT_TYPE_M4E = 990, /*!< Aircraft type is Mavic 4E. */
DJI_AIRCRAFT_TYPE_M4TD = 100, /*!< Aircraft type is Matrice 4TD. */
DJI_AIRCRAFT_TYPE_M4D = 1000, /*!< Aircraft type is Matrice 4D. */
} E_DjiAircraftType;
/**
@ -143,6 +146,8 @@ typedef enum {
DJI_CAMERA_TYPE_H30T = 83, /*!< Camera type is H30T. */
DJI_CAMERA_TYPE_M4T = 89, /*!< Camera type is M4T. */
DJI_CAMERA_TYPE_M4E = 891, /*!< Camera type is M4E. */
DJI_CAMERA_TYPE_M4TD = 90, /*!< Camera type is M4TD. */
DJI_CAMERA_TYPE_M4D = 91, /*!< Camera type is M4D. */
} E_DjiCameraType;
/**

View File

@ -34,10 +34,10 @@ extern "C" {
/* Exported constants --------------------------------------------------------*/
#define DJI_VERSION_MAJOR 3 /*!< DJI SDK major version num, when have incompatible API changes. Range from 0 to 99. */
#define DJI_VERSION_MINOR 10 /*!< DJI SDK minor version num, when add functionality in a backwards compatible manner changes. Range from 0 to 99. */
#define DJI_VERSION_MINOR 11 /*!< DJI SDK minor version num, when add functionality in a backwards compatible manner changes. Range from 0 to 99. */
#define DJI_VERSION_MODIFY 0 /*!< DJI SDK modify version num, when have backwards compatible bug fixes changes. Range from 0 to 99. */
#define DJI_VERSION_BETA 0 /*!< DJI SDK version beta info, release version will be 0, when beta version release changes. Range from 0 to 255. */
#define DJI_VERSION_BUILD 2190 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */
#define DJI_VERSION_BUILD 2204 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */
/* Exported types ------------------------------------------------------------*/

View File

View File

@ -137,3 +137,5 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${OpenCV_INCLUDE_DIRS})
if (OpenCV_FOUND)
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})
endif ()
add_dependencies(${PROJECT_NAME} djisdk)

View File

@ -76,6 +76,8 @@ static const T_DjiTestCameraTypeStr s_cameraTypeStrList[] = {
{DJI_CAMERA_TYPE_H30T, "H30T Camera"},
{DJI_CAMERA_TYPE_M4T, "M4T Camera"},
{DJI_CAMERA_TYPE_M4E, "M4E Camera"},
{DJI_CAMERA_TYPE_M4TD, "M4TD Camera"},
{DJI_CAMERA_TYPE_M4D, "M4D Camera"},
};
static FILE *s_downloadMediaFile = NULL;
@ -855,6 +857,7 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition,
|| DJI_CAMERA_TYPE_M3D == cameraType || DJI_CAMERA_TYPE_M3TD == cameraType
|| DJI_CAMERA_TYPE_M4T == cameraType || DJI_CAMERA_TYPE_M4E == cameraType
|| DJI_CAMERA_TYPE_H30 == cameraType || DJI_CAMERA_TYPE_H30T == cameraType
|| DJI_CAMERA_TYPE_M4TD == cameraType || DJI_CAMERA_TYPE_M4D == cameraType
) {
USER_LOG_INFO("Set mounted position %d camera's exposure mode to manual mode.",
mountPosition);
@ -898,6 +901,7 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition,
|| DJI_CAMERA_TYPE_M3D == cameraType || DJI_CAMERA_TYPE_M3TD == cameraType
|| DJI_CAMERA_TYPE_M4T == cameraType || DJI_CAMERA_TYPE_M4E == cameraType
|| DJI_CAMERA_TYPE_H30 == cameraType || DJI_CAMERA_TYPE_H30T == cameraType
|| DJI_CAMERA_TYPE_M4TD == cameraType || DJI_CAMERA_TYPE_M4D == cameraType
) {
USER_LOG_INFO("Set mounted position %d camera's exposure mode to manual mode.",
mountPosition);
@ -1198,6 +1202,7 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition,
|| DJI_CAMERA_TYPE_M3E == cameraType || DJI_CAMERA_TYPE_M3T == cameraType
|| DJI_CAMERA_TYPE_M3D == cameraType || DJI_CAMERA_TYPE_M3TD == cameraType
|| DJI_CAMERA_TYPE_M4T == cameraType || DJI_CAMERA_TYPE_M4E == cameraType
|| DJI_CAMERA_TYPE_M4TD == cameraType || DJI_CAMERA_TYPE_M4D == cameraType
) {
USER_LOG_INFO("Camera type %s does not support night scene mode!",
s_cameraTypeStrList[DjiTest_CameraManagerGetCameraTypeIndex(cameraType)].cameraTypeStr);
@ -1933,7 +1938,7 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition,
cameraType == DJI_CAMERA_TYPE_L1 || cameraType == DJI_CAMERA_TYPE_M30 ||
cameraType == DJI_CAMERA_TYPE_M3E || cameraType == DJI_CAMERA_TYPE_M3D ||
cameraType == DJI_CAMERA_TYPE_L2 || cameraType == DJI_CAMERA_TYPE_H30 ||
cameraType == DJI_CAMERA_TYPE_M4T) {
cameraType == DJI_CAMERA_TYPE_M4T || cameraType == DJI_CAMERA_TYPE_M4TD) {
USER_LOG_WARN("Camera type %s don't support FFC function.",
s_cameraTypeStrList[DjiTest_CameraManagerGetCameraTypeIndex(cameraType)].cameraTypeStr);
goto exitCameraModule;
@ -1980,7 +1985,7 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition,
cameraType == DJI_CAMERA_TYPE_L1 || cameraType == DJI_CAMERA_TYPE_M30 ||
cameraType == DJI_CAMERA_TYPE_M3E || cameraType == DJI_CAMERA_TYPE_M3D ||
cameraType == DJI_CAMERA_TYPE_L2 || cameraType == DJI_CAMERA_TYPE_H30 ||
cameraType == DJI_CAMERA_TYPE_M4T) {
cameraType == DJI_CAMERA_TYPE_M4T || cameraType == DJI_CAMERA_TYPE_M4TD) {
USER_LOG_WARN("Camera type %s don't support infrared function.",
s_cameraTypeStrList[DjiTest_CameraManagerGetCameraTypeIndex(cameraType)].cameraTypeStr);
goto exitCameraModule;

View File

@ -86,7 +86,9 @@ T_DjiReturnCode DjiTest_DataTransmissionStartService(void)
if (s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M30 ||
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M30T ||
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3D ||
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3TD) {
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3TD ||
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M4D ||
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M4TD) {
channelAddress = DJI_CHANNEL_ADDRESS_CLOUD_API;
djiStat = DjiLowSpeedDataChannel_RegRecvDataCallback(channelAddress, ReceiveDataFromCloud);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
@ -211,7 +213,9 @@ static void *UserDataTransmission_Task(void *arg)
if (s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M30 ||
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M30T ||
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3D ||
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3TD) {
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3TD ||
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M4D ||
s_aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M4TD ) {
channelAddress = DJI_CHANNEL_ADDRESS_CLOUD_API;
djiStat = DjiLowSpeedDataChannel_SendData(channelAddress, dataToBeSent, sizeof(dataToBeSent));
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS)

View File

@ -1306,6 +1306,8 @@ bool DjiTest_FlightControlGoHomeAndConfirmLanding(void)
|| DJI_AIRCRAFT_TYPE_M3D == aircraftInfoBaseInfo.aircraftType || DJI_AIRCRAFT_TYPE_M3TD == aircraftInfoBaseInfo.aircraftType
|| DJI_AIRCRAFT_TYPE_M4T == aircraftInfoBaseInfo.aircraftType
|| DJI_AIRCRAFT_TYPE_M4E == aircraftInfoBaseInfo.aircraftType
|| DJI_AIRCRAFT_TYPE_M4TD == aircraftInfoBaseInfo.aircraftType
|| DJI_AIRCRAFT_TYPE_M4D == aircraftInfoBaseInfo.aircraftType
) {
if ((dji_f64_t) 0.45 < heightFusion && heightFusion < (dji_f64_t) 0.55) {
break;

View File

@ -144,6 +144,7 @@ T_DjiReturnCode DjiTest_GimbalManagerRunSample(E_DjiMountPosition mountPosition,
|| DJI_AIRCRAFT_SERIES_M3 == aircraftSeries
|| DJI_AIRCRAFT_SERIES_M3D == aircraftSeries
|| DJI_AIRCRAFT_SERIES_M4 == aircraftSeries
|| DJI_AIRCRAFT_SERIES_M4D == aircraftSeries
) {
if (s_rotationActionList[i].rotation.rotationMode == DJI_GIMBAL_ROTATION_MODE_ABSOLUTE_ANGLE) {
T_DjiFcSubscriptionGimbalAngles gimbalAngles = {0};

View File

@ -149,6 +149,7 @@ T_DjiReturnCode DjiTest_LiveviewRunSample(E_DjiMountPosition mountPosition)
if (DJI_AIRCRAFT_TYPE_M3T == aircraftInfoBaseInfo.aircraftType
|| DJI_AIRCRAFT_TYPE_M3TD == aircraftInfoBaseInfo.aircraftType
|| DJI_AIRCRAFT_TYPE_M4T == aircraftInfoBaseInfo.aircraftType
|| DJI_AIRCRAFT_TYPE_M4TD == aircraftInfoBaseInfo.aircraftType
) {
USER_LOG_INFO("--> Start h264 stream of the fpv and selected payload\r\n");

View File

@ -325,6 +325,8 @@ static T_DjiReturnCode DjiTest_PlayTtsData(void)
|| DJI_AIRCRAFT_TYPE_M3D == aircraftInfoBaseInfo.aircraftType || DJI_AIRCRAFT_TYPE_M3TD == aircraftInfoBaseInfo.aircraftType
|| DJI_AIRCRAFT_TYPE_M4T == aircraftInfoBaseInfo.aircraftType
|| DJI_AIRCRAFT_TYPE_M4E == aircraftInfoBaseInfo.aircraftType
|| DJI_AIRCRAFT_TYPE_M4TD == aircraftInfoBaseInfo.aircraftType
|| DJI_AIRCRAFT_TYPE_M4D == aircraftInfoBaseInfo.aircraftType
) {
return DjiTest_PlayAudioData();
} else {

0
tools/file2c/file2c.exe Normal file → Executable file
View File