Skip to content

Commit

Permalink
Merge pull request #138 from dji-sdk/release/v3.8
Browse files Browse the repository at this point in the history
NEW: release DJI Payload-SDK version 3.8
  • Loading branch information
dji-dev authored Dec 11, 2023
2 parents 707ae4f + b76d6a1 commit db9d05e
Show file tree
Hide file tree
Showing 50 changed files with 486 additions and 130 deletions.
59 changes: 31 additions & 28 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   │   ├── dji_sdk_template.c
│   │   └── dji_sdk_template.h
│   ├── reference_designs
│ │ ├── E-Port Lite Schematic Reference.pdf
│   │   └── Type-C Schematic Reference.pdf
│   └── simple_model
│   ├── H20.stp
Expand Down Expand Up @@ -205,6 +206,8 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   │   │   │   ├── 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
Expand Down Expand Up @@ -327,19 +330,19 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   │   │   │   ├── 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_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_network.c
│   │   │   │   ├── hal_network.h
│   │   │   │   ├── hal_uart.c
│   │   │   │   ├── hal_uart.h
│   │   │   │   ├── hal_usb_bulk.c
│   │   │   │   └── hal_usb_bulk.h
│   │   └── rtos_freertos
│   │   ├── common
│   │   │   └── osal
Expand Down Expand Up @@ -761,21 +764,21 @@ The following portions of the DJI’s Payload SDK (“Software” referred to in
│   │   ├── 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
│   ── 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
Expand Down
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DJI Payload SDK (PSDK)

![](https://img.shields.io/badge/version-V3.7.0-green.svg)
![](https://img.shields.io/badge/platform-linux_|_rtos-green.svg)
![](https://img.shields.io/badge/version-V3.8.0-cyan.svg)
![](https://img.shields.io/badge/platform-linux_|_rtos-cyan.svg)
![](https://img.shields.io/badge/license-MIT-blue.svg)

## What is the DJI Payload SDK?
Expand All @@ -23,22 +23,20 @@ to get the latest version information.

## Latest Release

PSDK 3.7.0 was released on 31 Oct 2023. This version of Payload SDK mainly add some new features support and fixed some
The latest release version of PSDK is 3.8.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.

* Added L2 new camera model support
* Added FlyCart 30 new drone model support
* Added support for L2 subscription 3D point cloud data function
* Added L2 support for downloading original point cloud files
* Fixed the issue where M300 RTK and M350 RTK occasionally failed to negotiate load
* Fixed an issue where some open source library conflicts caused flight control module registration to fail
* Fixed the issue where PSDK obtains aircraft version numbers and displays them in reverse order
* Fixed an issue where the zoom value range of some camera zoom rings was incorrect
* Fixed the problem that the Sample value not updated when repeatedly running the M30/M3 series drone data subscription
* Fixed compatibility issues on some ESP32 platforms
* Optimize the return value prompt of MOP channel closing and destruction
* Optimize the point of interest surround function Sample log prompt
* Optimize compilation warning level
* Added support for the M3D series models
* Fixed memory leak in the HMS Sample
* Resolved compilation errors of Sample header files in certain environments
* Fixed unexpected crashes in C++ Sample when attempting to use unsupported features
* Enhanced prompts for camera Sample file downloads
* Optimized some improper uses of CMake in samples
* Change firmware version numbers in the PSDK Sample now align across DJI Assistant 2 and Pilot 2.
> Note: DJI Assistant 2 prevents firmware downgrading during payload upgrades. Ensure your upgrade package's name (the version number) is higher than the payload's reported firmware version.
> To comply with DJI Assistant 2 verification: You can simply rename your payload firmware upgrade package to make it valid, or maintain the previous practice of independently setting a version number to be checked during upgrades.
* In the STM32 FreeRTOS Sample, the heap size has been increased to 90,000 bytes.
> This may cause startup or build failures on some devices. You can adjust the stack size according to the business requirements of your hardware.
## License

Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion psdk_lib/include/dji_fc_subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ typedef T_DjiVector3f T_DjiFcSubscriptionAngularRateFusioned;
typedef T_DjiVector3f T_DjiFcSubscriptionAngularRateRaw;

/**
* @brief DJI_FC_SUBSCRIPTION_TOPIC_ALTITUDE_FUSED topic data structure.
* @brief DJI_FC_SUBSCRIPTION_TOPIC_ANGULAR_RATE_RAW topic data structure.
*/
typedef dji_f32_t T_DjiFcSubscriptionAltitudeFused;

Expand Down
3 changes: 3 additions & 0 deletions psdk_lib/include/dji_liveview.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ typedef enum {
DJI_LIVEVIEW_CAMERA_SOURCE_M3E_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M3T_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M3T_IR = 2,
DJI_LIVEVIEW_CAMERA_SOURCE_M3D_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M3TD_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M3TD_IR = 2,
} E_DjiLiveViewCameraSource;

/**
Expand Down
7 changes: 6 additions & 1 deletion psdk_lib/include/dji_typedef.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ typedef enum {
DJI_MOUNT_POSITION_TYPE_UNKNOWN = 0,
DJI_MOUNT_POSITION_TYPE_PAYLOAD_PORT = 1,
DJI_MOUNT_POSITION_TYPE_EXTENSION_PORT = 2,
DJI_MOUNT_POSITION_TYPE_EXTENSION_LITE_PORT = 3,
DJI_MOUNT_POSITION_TYPE_EXTENSION_LITE_PORT = 3
} E_DjiMountPositionType;

typedef enum {
Expand All @@ -95,6 +95,7 @@ typedef enum {
DJI_AIRCRAFT_SERIES_M30 = 3,
DJI_AIRCRAFT_SERIES_M3 = 4,
DJI_AIRCRAFT_SERIES_M350 = 5,
DJI_AIRCRAFT_SERIES_M3D = 6,
DJI_AIRCRAFT_SERIES_FC30 = 7,
} E_DjiAircraftSeries;

Expand All @@ -110,6 +111,8 @@ typedef enum {
DJI_AIRCRAFT_TYPE_FC30 = 78, /* !<Aircraft type is FlyCart 30> */
DJI_AIRCRAFT_TYPE_M3T = 79, /*!< Aircraft type is Mavic 3T. */
DJI_AIRCRAFT_TYPE_M350_RTK = 89, /*!< Aircraft type is Matrice 350 RTK. */
DJI_AIRCRAFT_TYPE_M3D = 91, /*!< Aircraft type is Matrice 3D. */
DJI_AIRCRAFT_TYPE_M3TD = 93, /*!< Aircraft type is Matrice 3TD. */
} E_DjiAircraftType;

/**
Expand All @@ -131,6 +134,8 @@ typedef enum {
DJI_CAMERA_TYPE_M30T, /*!< Camera type is M30T. */
DJI_CAMERA_TYPE_M3E, /*!< Camera type is M3E. */
DJI_CAMERA_TYPE_M3T, /*!< Camera type is M3T. */
DJI_CAMERA_TYPE_M3D, /*!< Camera type is Matrice 3D. */
DJI_CAMERA_TYPE_M3TD, /*!< Camera type is Matrice 3TD. */
} E_DjiCameraType;

/**
Expand Down
4 changes: 2 additions & 2 deletions psdk_lib/include/dji_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 7 /*!< DJI SDK minor version num, when add functionality in a backwards compatible manner changes. Range from 0 to 99. */
#define DJI_VERSION_MINOR 8 /*!< 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 1906 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */
#define DJI_VERSION_BUILD 1929 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */

/* Exported types ------------------------------------------------------------*/

Expand Down
Binary file modified psdk_lib/lib/aarch64-himix100-linux-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/aarch64-linux-android-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/aarch64-linux-gnu-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/arm-himix100-linux-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/arm-himix200-linux-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/arm-hisiv300-linux-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/arm-hisiv400-linux-gcc/libpayloadsdk.a
Binary file not shown.
Binary file not shown.
Binary file modified psdk_lib/lib/arm-hisiv600-linux-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/arm-linux-androideabi-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/arm-linux-gnueabi-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/arm-linux-gnueabihf-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/arm-none-eabi-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/armcc_cortex-m4/libpayload.lib
Binary file not shown.
Binary file modified psdk_lib/lib/x86_64-linux-gnu-gcc/libpayloadsdk.a
Binary file not shown.
Binary file modified psdk_lib/lib/xtensa-esp32-elf-gcc/libpayloadsdk.a
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -444,63 +444,63 @@ static void DjiUser_ShowFlightStatusByOpenCV(void)
}

// Display latest flight status
cv::putText(img, "Status: ", cvPoint(30, 20), FONT_HERSHEY_SIMPLEX, 0.6,
cv::putText(img, "Status: ", cv::Point(30, 20), FONT_HERSHEY_SIMPLEX, 0.6,
cv::Scalar(255, 0, 0));

cv::putText(img, "Roll: " + cv::format("%.4f", aircraftAngles.y), cvPoint(50, 50), FONT_HERSHEY_SIMPLEX, 0.5,
cv::putText(img, "Roll: " + cv::format("%.4f", aircraftAngles.y), cv::Point(50, 50), FONT_HERSHEY_SIMPLEX, 0.5,
cv::Scalar(200, 0, 0));
cv::putText(img, "Pitch: " + cv::format("%.4f", aircraftAngles.x), cvPoint(50, 80), FONT_HERSHEY_SIMPLEX, 0.5,
cv::putText(img, "Pitch: " + cv::format("%.4f", aircraftAngles.x), cv::Point(50, 80), FONT_HERSHEY_SIMPLEX, 0.5,
cv::Scalar(200, 0, 0));
cv::putText(img, "Yaw: " + cv::format("%.4f", aircraftAngles.z), cvPoint(50, 110), FONT_HERSHEY_SIMPLEX, 0.5,
cv::putText(img, "Yaw: " + cv::format("%.4f", aircraftAngles.z), cv::Point(50, 110), FONT_HERSHEY_SIMPLEX, 0.5,
cv::Scalar(200, 0, 0));
cv::putText(img, "WorldX: " + cv::format("%.4f", positionVo.x), cvPoint(50, 140), FONT_HERSHEY_SIMPLEX, 0.5,
cv::putText(img, "WorldX: " + cv::format("%.4f", positionVo.x), cv::Point(50, 140), FONT_HERSHEY_SIMPLEX, 0.5,
cv::Scalar(200, 0, 0));
cv::putText(img, "WorldY: " + cv::format("%.4f", positionVo.y), cvPoint(50, 170), FONT_HERSHEY_SIMPLEX, 0.5,
cv::putText(img, "WorldY: " + cv::format("%.4f", positionVo.y), cv::Point(50, 170), FONT_HERSHEY_SIMPLEX, 0.5,
cv::Scalar(200, 0, 0));
cv::putText(img, "WorldZ: " + cv::format("%.4f", altitudeOfHomePoint), cvPoint(50, 200), FONT_HERSHEY_SIMPLEX,
cv::putText(img, "WorldZ: " + cv::format("%.4f", altitudeOfHomePoint), cv::Point(50, 200), FONT_HERSHEY_SIMPLEX,
0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "Latitude: " + cv::format("%.4f", (dji_f64_t) s_gpsPosition.y / 10000000), cvPoint(50, 230),
cv::putText(img, "Latitude: " + cv::format("%.4f", (dji_f64_t) s_gpsPosition.y / 10000000), cv::Point(50, 230),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "Longitude: " + cv::format("%.4f", (dji_f64_t) s_gpsPosition.x / 10000000), cvPoint(50, 260),
cv::putText(img, "Longitude: " + cv::format("%.4f", (dji_f64_t) s_gpsPosition.x / 10000000), cv::Point(50, 260),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "Battery1: " + cv::format("%d%%", singleBatteryInfo1.batteryCapacityPercent), cvPoint(50, 290),
cv::putText(img, "Battery1: " + cv::format("%d%%", singleBatteryInfo1.batteryCapacityPercent), cv::Point(50, 290),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "Battery2: " + cv::format("%d%%", singleBatteryInfo2.batteryCapacityPercent), cvPoint(50, 320),
cv::putText(img, "Battery2: " + cv::format("%d%%", singleBatteryInfo2.batteryCapacityPercent), cv::Point(50, 320),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));

cv::putText(img, "Config: ", cvPoint(300, 20), FONT_HERSHEY_SIMPLEX, 0.6,
cv::putText(img, "Config: ", cv::Point(300, 20), FONT_HERSHEY_SIMPLEX, 0.6,
cv::Scalar(255, 0, 0));
cv::putText(img, "-> RcLostAction(Sync APP): " + cv::format("%d (0-hover 1-landing 2-gohome)", rcLostAction),
cvPoint(320, 50),
cv::Point(320, 50),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "-> GoHomeAltitude(Sync APP): " + cv::format("%d", s_goHomeAltitude), cvPoint(320, 80),
cv::putText(img, "-> GoHomeAltitude(Sync APP): " + cv::format("%d", s_goHomeAltitude), cv::Point(320, 80),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "-> RTK-Enable(Sync APP): " + cv::format("%d", rtkPositionEnableStatus), cvPoint(320, 110),
cv::putText(img, "-> RTK-Enable(Sync APP): " + cv::format("%d", rtkPositionEnableStatus), cv::Point(320, 110),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "-> HomePointLatitude: " + cv::format("%.4f", s_homeLocation.latitude), cvPoint(320, 140),
cv::putText(img, "-> HomePointLatitude: " + cv::format("%.4f", s_homeLocation.latitude), cv::Point(320, 140),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "-> HomePointLongitude: " + cv::format("%.4f", s_homeLocation.longitude), cvPoint(320, 170),
cv::putText(img, "-> HomePointLongitude: " + cv::format("%.4f", s_homeLocation.longitude), cv::Point(320, 170),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "-> FlyingSpeed: " + cv::format("%.2f", s_flyingSpeed), cvPoint(320, 200),
cv::putText(img, "-> FlyingSpeed: " + cv::format("%.2f", s_flyingSpeed), cv::Point(320, 200),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "-> downwardsVisEnable(Sync APP): " + cv::format("%d", downwardsVisEnable), cvPoint(320, 230),
cv::putText(img, "-> downwardsVisEnable(Sync APP): " + cv::format("%d", downwardsVisEnable), cv::Point(320, 230),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "-> upwardsVisEnable(Sync APP): " + cv::format("%d", upwardsVisEnable), cvPoint(320, 260),
cv::putText(img, "-> upwardsVisEnable(Sync APP): " + cv::format("%d", upwardsVisEnable), cv::Point(320, 260),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "-> horizontalVisEnable(Sync APP): " + cv::format("%d", horizontalVisEnable), cvPoint(320, 290),
cv::putText(img, "-> horizontalVisEnable(Sync APP): " + cv::format("%d", horizontalVisEnable), cv::Point(320, 290),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));
cv::putText(img, "-> ControlDevice: " + cv::format("%d", controlDevice.deviceStatus), cvPoint(320, 320),
cv::putText(img, "-> ControlDevice: " + cv::format("%d", controlDevice.deviceStatus), cv::Point(320, 320),
FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(200, 0, 0));

cv::putText(img,
"[Q]-Up [W]-Front [E]-Down [R]-TakeOff [T]-CancelLanding [Y]-CancelGoHome [I]-ArrestFly [O]-CancelArrestFly [P]-EmgStopMotor",
cvPoint(30, 400), FONT_HERSHEY_SIMPLEX, 0.4, cv::Scalar(128, 0, 0));
cv::Point(30, 400), FONT_HERSHEY_SIMPLEX, 0.4, cv::Scalar(128, 0, 0));
cv::putText(img,
"[A]-Left [S]-Near [D]-Right [F]-ForceLand [G]-Landing [H]-GoHome [J]-UpdateConfig [K]-Brake [L]-CancelBrakeI",
cvPoint(30, 430), FONT_HERSHEY_SIMPLEX, 0.4, cv::Scalar(128, 0, 0));
cv::Point(30, 430), FONT_HERSHEY_SIMPLEX, 0.4, cv::Scalar(128, 0, 0));
cv::putText(img,
"[Z]-Yaw- [X]-RefreshHomePoint [C]-Yaw+ [V]-ConfirmLanding [B]-TurnOn [N]-TurnOff [M]-ObtainCtrlAuth",
cvPoint(30, 460), FONT_HERSHEY_SIMPLEX, 0.4, cv::Scalar(128, 0, 0));
cv::Point(30, 460), FONT_HERSHEY_SIMPLEX, 0.4, cv::Scalar(128, 0, 0));

cv::imshow("Payload SDK Command Flying Data Observation Window", img);
cv::waitKey(1);
Expand Down
6 changes: 4 additions & 2 deletions samples/sample_c++/module_sample/gimbal/test_gimbal_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ void DjiUser_RunGimbalManagerSample(void)
}
USER_LOG_INFO("Subscribe topic DJI_FC_SUBSCRIPTION_TOPIC_THREE_GIMBAL_DATA succefully.");
}
else if (aircraftSeries == DJI_AIRCRAFT_SERIES_M30 || aircraftSeries == DJI_AIRCRAFT_SERIES_M3) {
else if (aircraftSeries == DJI_AIRCRAFT_SERIES_M30 || aircraftSeries == DJI_AIRCRAFT_SERIES_M3 ||
aircraftSeries == DJI_AIRCRAFT_SERIES_M3D) {
returnCode = DjiFcSubscription_SubscribeTopic(DJI_FC_SUBSCRIPTION_TOPIC_GIMBAL_ANGLES, DJI_DATA_SUBSCRIPTION_TOPIC_50_HZ, NULL);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("DjiFcSubscription_SubscribeTopic %d return %d", DJI_FC_SUBSCRIPTION_TOPIC_GIMBAL_ANGLES, returnCode);
Expand Down Expand Up @@ -401,7 +402,8 @@ void DjiUser_RunGimbalManagerSample(void)
threeGimbalData.anglesData[gimbalMountPosition - 1].roll,
threeGimbalData.anglesData[gimbalMountPosition - 1].yaw);
}
else if (aircraftSeries == DJI_AIRCRAFT_SERIES_M30 || aircraftSeries == DJI_AIRCRAFT_SERIES_M3) {
else if (aircraftSeries == DJI_AIRCRAFT_SERIES_M30 || aircraftSeries == DJI_AIRCRAFT_SERIES_M3 ||
aircraftSeries == DJI_AIRCRAFT_SERIES_M3D) {
returnCode = DjiFcSubscription_GetLatestValueOfTopic(DJI_FC_SUBSCRIPTION_TOPIC_GIMBAL_ANGLES,
(uint8_t *) &gimbalAngles,
sizeof(T_DjiFcSubscriptionGimbalAngles),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LiveviewSample::LiveviewSample()

returnCode = DjiLiveview_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
perror("Liveview init failed");
throw ("Liveview init failed");
}

streamDecoder = {
Expand Down
Loading

0 comments on commit db9d05e

Please sign in to comment.