diff --git a/README.md b/README.md index 65336ada..e4d3bd1d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # DJI Payload SDK (PSDK) -![](https://img.shields.io/badge/version-V3.6.0-purple.svg) +![](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/license-MIT-blue.svg) @@ -15,44 +15,30 @@ Flight Controller, Payload Controller, Video Image Analysis Platform, Mapping Ca ## 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/) +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 -PSDK 3.6.0 was released on 18 Sep 2023. 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 support for multi-language display in HMS management. -* Added support for PSDK Non-RC flight. -* Added support for aircraft version number retrieval. -* Added support for RTCM data subscription. -* Added support for cloud-based custom small data communication on Matrice 30/30T PSDK. -* Added Support for Matrice 30/30T PSDK speaker cloud integration. -* Added support for custom widgets wayline actions on Matrice 30/30T and Mavic 3E/3T aircraft. -* Added support for grayscale image retrieval on M350 RTK. -* Added support for time synchronization on M300 RTK and Matrice 30/30T. -* Added support for third-party firmware upgrades through M350 RTK E-Port. -* Added support for SDK interconnection on Mavic 3E/3T. -* Added support for hotspot orbit function on Mavic 3E/3T. -* Added support for expanded camera and gimbal management interfaces. -* Fixed issue with the 500m altitude limit for flight control across all models. -* Fixed issue with incomplete small data transmission on specific models. -* Fixed issue with H20 I-frame retrieval on M300 RTK. -* Fixed issue with occasional custom widget display failure in DJI Pilot. -* Fixed issues with multiple live stream retrieval on Matrice 30/30T. -* Fixed issues with camera mode retrieval on Matrice 30/30T. -* Fixed issues with camera focal length value retrieval on Matrice 30/30T. -* Fixed issue with X-Port failed to self-check when both X-Port and SkyPort V2 were equipped on M300 RTK. -* Fixed issue with gimbal angle subscription data mismatching App display on M300 RTK. -* Fixed issue with flight control feature initialization failure on specific models after multiple calls. -* Fixed compatibility issues with initialization failures on some HiSilicon platforms. -* Optimized PSDK startup delays in single UART mode. -* Optimized slow media file download speeds for Mavic 3E/3T on ethernet links. +PSDK 3.7.0 was released on 31 Oct 2023. 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 ## License @@ -73,6 +59,3 @@ 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 diff --git a/psdk_lib/include/dji_camera_manager.h b/psdk_lib/include/dji_camera_manager.h index 28cc4601..2b42fbe2 100644 --- a/psdk_lib/include/dji_camera_manager.h +++ b/psdk_lib/include/dji_camera_manager.h @@ -704,6 +704,30 @@ typedef struct { 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 */ +} T_DjiCameraManagerPointCloudHeader; + +typedef struct { + float x; /* the x-axis of NED coordinate system */ + float y; /* the y-axis of NED coordinate system */ + float z; /* the z-axis of NED coordinate system */ + uint8_t intensity; + uint8_t r; + uint8_t g; + uint8_t b; +} T_DjiCameraManagerPointXYZRGBInfo; + +typedef struct { + T_DjiCameraManagerPointCloudHeader pointCloudHeader; + uint32_t crc_header; + uint32_t crc_rest; + T_DjiCameraManagerPointXYZRGBInfo points[1]; +} T_DjiCameraManagerColorPointCloud; + typedef T_DjiReturnCode (*DjiCameraManagerDownloadFileDataCallback)(T_DjiDownloadFilePacketInfo packetInfo, const uint8_t *data, uint16_t dataLen); @@ -1663,6 +1687,22 @@ T_DjiReturnCode DjiCameraManager_SetMeteringPoint(E_DjiMountPosition position, 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 diff --git a/psdk_lib/include/dji_typedef.h b/psdk_lib/include/dji_typedef.h index ecb5d767..c60b878a 100644 --- a/psdk_lib/include/dji_typedef.h +++ b/psdk_lib/include/dji_typedef.h @@ -75,7 +75,8 @@ typedef uint64_t T_DjiReturnCode; 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_PORT = 2, + DJI_MOUNT_POSITION_TYPE_EXTENSION_LITE_PORT = 3, } E_DjiMountPositionType; typedef enum { @@ -84,6 +85,7 @@ typedef enum { DJI_MOUNT_POSITION_PAYLOAD_PORT_NO2 = 2, DJI_MOUNT_POSITION_PAYLOAD_PORT_NO3 = 3, DJI_MOUNT_POSITION_EXTENSION_PORT = 4, + DJI_MOUNT_POSITION_EXTENSION_LITE_PORT = 5, } E_DjiMountPosition; typedef enum { @@ -93,6 +95,7 @@ typedef enum { DJI_AIRCRAFT_SERIES_M30 = 3, DJI_AIRCRAFT_SERIES_M3 = 4, DJI_AIRCRAFT_SERIES_M350 = 5, + DJI_AIRCRAFT_SERIES_FC30 = 7, } E_DjiAircraftSeries; typedef enum { @@ -104,6 +107,7 @@ typedef enum { DJI_AIRCRAFT_TYPE_M30 = 67, /*!< Aircraft type is Matrice 30. */ DJI_AIRCRAFT_TYPE_M30T = 68, /*!< Aircraft type is Matrice 30T. */ DJI_AIRCRAFT_TYPE_M3E = 77, /*!< Aircraft type is Mavic 3E. */ + DJI_AIRCRAFT_TYPE_FC30 = 78, /* ! */ DJI_AIRCRAFT_TYPE_M3T = 79, /*!< Aircraft type is Mavic 3T. */ DJI_AIRCRAFT_TYPE_M350_RTK = 89, /*!< Aircraft type is Matrice 350 RTK. */ } E_DjiAircraftType; @@ -122,6 +126,7 @@ typedef enum { DJI_CAMERA_TYPE_H20N = 61, /*!< Camera type is H20N. */ DJI_CAMERA_TYPE_P1 = 50, /*!< Camera type is P1. */ DJI_CAMERA_TYPE_L1, /*!< Camera type is L1. */ + DJI_CAMERA_TYPE_L2, /*!< Camera type is L2. */ DJI_CAMERA_TYPE_M30, /*!< Camera type is M30. */ DJI_CAMERA_TYPE_M30T, /*!< Camera type is M30T. */ DJI_CAMERA_TYPE_M3E, /*!< Camera type is M3E. */ diff --git a/psdk_lib/include/dji_version.h b/psdk_lib/include/dji_version.h index 0b7df973..a942a5b1 100644 --- a/psdk_lib/include/dji_version.h +++ b/psdk_lib/include/dji_version.h @@ -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 6 /*!< DJI SDK minor version num, when add functionality in a backwards compatible manner 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_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 1883 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */ +#define DJI_VERSION_BUILD 1906 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */ /* Exported types ------------------------------------------------------------*/ diff --git a/psdk_lib/lib/aarch64-himix100-linux-gcc/libpayloadsdk.a b/psdk_lib/lib/aarch64-himix100-linux-gcc/libpayloadsdk.a index fd8ae121..7e98b536 100644 Binary files a/psdk_lib/lib/aarch64-himix100-linux-gcc/libpayloadsdk.a and b/psdk_lib/lib/aarch64-himix100-linux-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/aarch64-linux-android-gcc/libpayloadsdk.a b/psdk_lib/lib/aarch64-linux-android-gcc/libpayloadsdk.a index c44e71bb..c5567d3a 100644 Binary files a/psdk_lib/lib/aarch64-linux-android-gcc/libpayloadsdk.a and b/psdk_lib/lib/aarch64-linux-android-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/aarch64-linux-gnu-gcc/libpayloadsdk.a b/psdk_lib/lib/aarch64-linux-gnu-gcc/libpayloadsdk.a index 2ec16f5b..7329c854 100644 Binary files a/psdk_lib/lib/aarch64-linux-gnu-gcc/libpayloadsdk.a and b/psdk_lib/lib/aarch64-linux-gnu-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/arm-himix100-linux-gcc/libpayloadsdk.a b/psdk_lib/lib/arm-himix100-linux-gcc/libpayloadsdk.a index 3b27915b..b61f621b 100644 Binary files a/psdk_lib/lib/arm-himix100-linux-gcc/libpayloadsdk.a and b/psdk_lib/lib/arm-himix100-linux-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/arm-himix200-linux-gcc/libpayloadsdk.a b/psdk_lib/lib/arm-himix200-linux-gcc/libpayloadsdk.a index 939eda1e..7f33c520 100644 Binary files a/psdk_lib/lib/arm-himix200-linux-gcc/libpayloadsdk.a and b/psdk_lib/lib/arm-himix200-linux-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/arm-hisiv300-linux-gcc/libpayloadsdk.a b/psdk_lib/lib/arm-hisiv300-linux-gcc/libpayloadsdk.a index be24dc0e..4da76e3c 100644 Binary files a/psdk_lib/lib/arm-hisiv300-linux-gcc/libpayloadsdk.a and b/psdk_lib/lib/arm-hisiv300-linux-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/arm-hisiv400-linux-gcc/libpayloadsdk.a b/psdk_lib/lib/arm-hisiv400-linux-gcc/libpayloadsdk.a index 68090e78..74ce73a1 100644 Binary files a/psdk_lib/lib/arm-hisiv400-linux-gcc/libpayloadsdk.a and b/psdk_lib/lib/arm-hisiv400-linux-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/arm-hisiv500-linux-gcc/libpayloadsdk.a b/psdk_lib/lib/arm-hisiv500-linux-gcc/libpayloadsdk.a deleted file mode 100644 index 2eff6457..00000000 Binary files a/psdk_lib/lib/arm-hisiv500-linux-gcc/libpayloadsdk.a and /dev/null differ diff --git a/psdk_lib/lib/arm-hisiv600-linux-gcc/libpayloadsdk.a b/psdk_lib/lib/arm-hisiv600-linux-gcc/libpayloadsdk.a index a21a6cf5..115546d5 100644 Binary files a/psdk_lib/lib/arm-hisiv600-linux-gcc/libpayloadsdk.a and b/psdk_lib/lib/arm-hisiv600-linux-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/arm-linux-androideabi-gcc/libpayloadsdk.a b/psdk_lib/lib/arm-linux-androideabi-gcc/libpayloadsdk.a index 8419e8f3..b769fd72 100644 Binary files a/psdk_lib/lib/arm-linux-androideabi-gcc/libpayloadsdk.a and b/psdk_lib/lib/arm-linux-androideabi-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/arm-linux-gnueabi-gcc/libpayloadsdk.a b/psdk_lib/lib/arm-linux-gnueabi-gcc/libpayloadsdk.a index a2156ff8..ac3f82b4 100644 Binary files a/psdk_lib/lib/arm-linux-gnueabi-gcc/libpayloadsdk.a and b/psdk_lib/lib/arm-linux-gnueabi-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/arm-linux-gnueabihf-gcc/libpayloadsdk.a b/psdk_lib/lib/arm-linux-gnueabihf-gcc/libpayloadsdk.a index 50efcb89..ec805fe3 100644 Binary files a/psdk_lib/lib/arm-linux-gnueabihf-gcc/libpayloadsdk.a and b/psdk_lib/lib/arm-linux-gnueabihf-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/arm-none-eabi-gcc/libpayloadsdk.a b/psdk_lib/lib/arm-none-eabi-gcc/libpayloadsdk.a index 31e2bd12..f1d9934e 100644 Binary files a/psdk_lib/lib/arm-none-eabi-gcc/libpayloadsdk.a and b/psdk_lib/lib/arm-none-eabi-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/armcc_cortex-m4/libpayload.lib b/psdk_lib/lib/armcc_cortex-m4/libpayload.lib index fe625bb3..d8992ff8 100644 Binary files a/psdk_lib/lib/armcc_cortex-m4/libpayload.lib and b/psdk_lib/lib/armcc_cortex-m4/libpayload.lib differ diff --git a/psdk_lib/lib/x86_64-linux-gnu-gcc/libpayloadsdk.a b/psdk_lib/lib/x86_64-linux-gnu-gcc/libpayloadsdk.a index 460a3437..4d0f98c2 100644 Binary files a/psdk_lib/lib/x86_64-linux-gnu-gcc/libpayloadsdk.a and b/psdk_lib/lib/x86_64-linux-gnu-gcc/libpayloadsdk.a differ diff --git a/psdk_lib/lib/xtensa-esp32-elf-gcc/libpayloadsdk.a b/psdk_lib/lib/xtensa-esp32-elf-gcc/libpayloadsdk.a index 793fc385..3464899f 100644 Binary files a/psdk_lib/lib/xtensa-esp32-elf-gcc/libpayloadsdk.a and b/psdk_lib/lib/xtensa-esp32-elf-gcc/libpayloadsdk.a differ diff --git a/samples/sample_c++/module_sample/camera_manager/test_camera_manager_entry.cpp b/samples/sample_c++/module_sample/camera_manager/test_camera_manager_entry.cpp index 43849bc9..b2ae90ea 100644 --- a/samples/sample_c++/module_sample/camera_manager/test_camera_manager_entry.cpp +++ b/samples/sample_c++/module_sample/camera_manager/test_camera_manager_entry.cpp @@ -70,6 +70,7 @@ static const char *s_cameraManagerSampleSelectList[] = { [E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_FFC_MODE_AND_TRRIGER] = "Set FFC mode and trriger a FFC |", [E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_GAIN_MODE] = "Set infrared camera gain mode |", [E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_GET_CAMERA_STATUS] = "Get camera status, capturing & recording status etc |", + [E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SUBSCRIBE_POINT_CLOUD] = "Subscribe point cloud |", }; /* Private types -------------------------------------------------------------*/ diff --git a/samples/sample_c++/module_sample/flight_controller/test_flight_controller_command_flying.cpp b/samples/sample_c++/module_sample/flight_controller/test_flight_controller_command_flying.cpp index f14eb15a..f3eba493 100644 --- a/samples/sample_c++/module_sample/flight_controller/test_flight_controller_command_flying.cpp +++ b/samples/sample_c++/module_sample/flight_controller/test_flight_controller_command_flying.cpp @@ -32,6 +32,7 @@ #include "dji_flight_controller.h" #include "dji_logger.h" #include "dji_fc_subscription.h" +#include "cmath" #ifdef OPEN_CV_INSTALLED @@ -814,6 +815,8 @@ static T_DjiReturnCode DjiUser_FlightControlUpdateConfig(void) return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR; } + memset(jsonData, 0, fileSize); + UtilFile_GetFileDataByPath(tempFileDirPath, 0, fileSize, jsonData, &readRealSize); jsonData[readRealSize] = '\0'; diff --git a/samples/sample_c++/platform/linux/manifold2/application/application.cpp b/samples/sample_c++/platform/linux/manifold2/application/application.cpp index 6d8c93e1..938b1f32 100644 --- a/samples/sample_c++/platform/linux/manifold2/application/application.cpp +++ b/samples/sample_c++/platform/linux/manifold2/application/application.cpp @@ -40,9 +40,17 @@ #include "../manifold2/hal/hal_uart.h" #include "../manifold2/hal/hal_network.h" +#include +#include +#include +#include "widget/test_widget.h" +#include "widget/test_widget_speaker.h" +#include +#include "data_transmission/test_data_transmission.h" + /* Private constants ---------------------------------------------------------*/ #define DJI_LOG_PATH "Logs/DJI" -#define DJI_LOG_INDEX_FILE_NAME "Logs/latest" +#define DJI_LOG_INDEX_FILE_NAME "Logs/index" #define DJI_LOG_FOLDER_NAME "Logs" #define DJI_LOG_PATH_MAX_SIZE (128) #define DJI_LOG_FOLDER_NAME_MAX_SIZE (32) @@ -63,6 +71,8 @@ static FILE *s_djiLogFileCnt; /* Private functions declaration ---------------------------------------------*/ static void DjiUser_NormalExitHandler(int signalNum); +static T_DjiReturnCode DjiTest_HighPowerApplyPinInit(); +static T_DjiReturnCode DjiTest_WriteHighPowerApplyPin(E_DjiPowerManagementPinState pinState); /* Exported functions definition ---------------------------------------------*/ Application::Application(int argc, char **argv) @@ -266,7 +276,8 @@ void Application::DjiUser_ApplicationStart() throw std::runtime_error("Get aircraft base info error."); } - if (aircraftInfoBaseInfo.mountPosition != DJI_MOUNT_POSITION_EXTENSION_PORT) { + if (aircraftInfoBaseInfo.mountPosition != DJI_MOUNT_POSITION_EXTENSION_PORT + && DJI_MOUNT_POSITION_EXTENSION_LITE_PORT != aircraftInfoBaseInfo.mountPosition) { throw std::runtime_error("Please run this sample on extension port."); } @@ -285,6 +296,65 @@ void Application::DjiUser_ApplicationStart() throw std::runtime_error("Set serial number error"); } +#ifdef CONFIG_MODULE_SAMPLE_CAMERA_EMU_ON + returnCode = DjiTest_CameraEmuBaseStartService(); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("camera emu common init error"); + } +#endif + +#ifdef CONFIG_MODULE_SAMPLE_CAMERA_MEDIA_ON + returnCode = DjiTest_CameraEmuMediaStartService(); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("camera emu media init error"); + } +#endif + +#ifdef CONFIG_MODULE_SAMPLE_GIMBAL_EMU_ON + returnCode = DjiTest_GimbalStartService(); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("psdk gimbal init error"); + } +#endif + +#ifdef CONFIG_MODULE_SAMPLE_WIDGET_ON + returnCode = DjiTest_WidgetStartService(); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("widget sample init error"); + } +#endif + +#ifdef CONFIG_MODULE_SAMPLE_WIDGET_SPEAKER_ON + returnCode = DjiTest_WidgetSpeakerStartService(); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("widget speaker test init error"); + } +#endif + +#ifdef CONFIG_MODULE_SAMPLE_POWER_MANAGEMENT_ON + T_DjiTestApplyHighPowerHandler applyHighPowerHandler = { + .pinInit = DjiTest_HighPowerApplyPinInit, + .pinWrite = DjiTest_WriteHighPowerApplyPin, + }; + + returnCode = DjiTest_RegApplyHighPowerHandler(&applyHighPowerHandler); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("regsiter apply high power handler error"); + } + + returnCode = DjiTest_PowerManagementStartService(); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("power management init error"); + } +#endif + +#ifdef CONFIG_MODULE_SAMPLE_DATA_TRANSMISSION_ON + returnCode = DjiTest_DataTransmissionStartService(); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("widget sample init error"); + } +#endif + returnCode = DjiCore_ApplicationStart(); if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { throw std::runtime_error("Start sdk application error."); @@ -440,6 +510,8 @@ T_DjiReturnCode Application::DjiUser_LocalWriteFsInit(const char *path) } } + sprintf(systemCmd, "ln -sfrv %s " DJI_LOG_FOLDER_NAME "/latest.log", filePath); + system(systemCmd); return djiReturnCode; } @@ -449,4 +521,15 @@ static void DjiUser_NormalExitHandler(int signalNum) exit(0); } +static T_DjiReturnCode DjiTest_HighPowerApplyPinInit() +{ + return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS; +} + +static T_DjiReturnCode DjiTest_WriteHighPowerApplyPin(E_DjiPowerManagementPinState pinState) +{ + //attention: please pull up the HWPR pin state by hardware. + return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS; +} + /****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/ diff --git a/samples/sample_c++/platform/linux/manifold2/application/dji_config_manager.c b/samples/sample_c++/platform/linux/manifold2/application/dji_config_manager.c index 2de2cedb..cce7492b 100644 --- a/samples/sample_c++/platform/linux/manifold2/application/dji_config_manager.c +++ b/samples/sample_c++/platform/linux/manifold2/application/dji_config_manager.c @@ -125,6 +125,8 @@ static T_DjiReturnCode DjiUserConfigManager_GetAppInfoInner(const char *path, T_ return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS; } + memset(jsonData, 0, fileSize); + UtilFile_GetFileDataByPath(path, 0, fileSize, jsonData, &readRealSize); jsonData[readRealSize] = '\0'; @@ -223,6 +225,8 @@ static T_DjiReturnCode DjiUserConfigManager_GetLinkConfigInner(const char *path, return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS; } + memset(jsonData, 0, fileSize); + UtilFile_GetFileDataByPath(path, 0, fileSize, jsonData, &readRealSize); jsonData[readRealSize] = '\0'; diff --git a/samples/sample_c++/platform/linux/manifold2/application/dji_sdk_config.h b/samples/sample_c++/platform/linux/manifold2/application/dji_sdk_config.h index 39fd3d0f..4f48db7f 100644 --- a/samples/sample_c++/platform/linux/manifold2/application/dji_sdk_config.h +++ b/samples/sample_c++/platform/linux/manifold2/application/dji_sdk_config.h @@ -42,6 +42,18 @@ extern "C" { * */ #define CONFIG_HARDWARE_CONNECTION DJI_USE_ONLY_UART +/*!< Attention: Select the sample you want to run here. +* */ +#define CONFIG_MODULE_SAMPLE_GIMBAL_EMU_ON + +#define CONFIG_MODULE_SAMPLE_WIDGET_ON + +#define CONFIG_MODULE_SAMPLE_WIDGET_SPEAKER_ON + +#define CONFIG_MODULE_SAMPLE_POWER_MANAGEMENT_ON + +#define CONFIG_MODULE_SAMPLE_DATA_TRANSMISSION_ON + /* Exported types ------------------------------------------------------------*/ /* Exported functions --------------------------------------------------------*/ diff --git a/samples/sample_c++/platform/linux/manifold2/application/dji_sdk_config.json b/samples/sample_c++/platform/linux/manifold2/application/dji_sdk_config.json index 8730d318..1e75576b 100644 --- a/samples/sample_c++/platform/linux/manifold2/application/dji_sdk_config.json +++ b/samples/sample_c++/platform/linux/manifold2/application/dji_sdk_config.json @@ -1,11 +1,11 @@ { "dji_sdk_app_info": { - "user_app_name": "PSDK_APPNAME", - "user_app_id": "53453", - "user_app_key": "871bf75511531682636f0db7243a9e7", - "user_app_license": "BO86stxOf200Sv9FMEZUSFCZhJhWxKG1jVYBACSnFvz42nnWEnc8vU+GKGHc/OUTxuFH+5TizymlZkuIxq6WAonqut3Y58KAcmTU6HHCVCW5HJSidwbNv0Gf3Gm+O7tc18lpHiSNRr/uEbSTJeVPkshOlcEEwpSc4tUUlRBb37BkUpZQFAPKaykyznLdxdYDlFh5OAqSl6kLltdt+A3/VOiZavKfsKHM7J9jbjsTDETe3fRRRiauE5K+s8yO6uAFLE0fwHWnanl7gPkzgNJJ53qVqnKiGwEtlim5E8WvnnaiEoxLOWrDijFOEmh9tLOU7Kx/oDEM2l9O/idaqmLxKA==", - "user_develop_account": "payloadsdk_account@163.com", - "user_baud_rate": "921600" + "user_app_name": "your_app_name", + "user_app_id": "your_app_id", + "user_app_key": "your_app_key", + "user_app_license": "your_app_license", + "user_develop_account": "your_developer_account", + "user_baud_rate": "460800" }, "dji_sdk_link_config": { "link_available": "use_only_uart/use_uart_and_usb_bulk_device/use_uart_and_network_device", diff --git a/samples/sample_c++/platform/linux/manifold2/application/main.cpp b/samples/sample_c++/platform/linux/manifold2/application/main.cpp index 6d16cfbe..f7a14b0b 100644 --- a/samples/sample_c++/platform/linux/manifold2/application/main.cpp +++ b/samples/sample_c++/platform/linux/manifold2/application/main.cpp @@ -49,8 +49,6 @@ /* Private values -------------------------------------------------------------*/ /* Private functions declaration ---------------------------------------------*/ -static T_DjiReturnCode DjiTest_HighPowerApplyPinInit(); -static T_DjiReturnCode DjiTest_WriteHighPowerApplyPin(E_DjiPowerManagementPinState pinState); /* Exported functions definition ---------------------------------------------*/ int main(int argc, char **argv) @@ -71,14 +69,8 @@ int main(int argc, char **argv) << "| [a] Gimbal manager sample - you can control gimbal by PSDK |\n" << "| [c] Camera stream view sample - display the camera video stream |\n" << "| [d] Stereo vision view sample - display the stereo image |\n" - << "| [e] Start camera all features sample - you can operate the camera on DJI Pilot |\n" - << "| [f] Start gimbal all features sample - you can operate the gimbal on DJI Pilot |\n" - << "| [g] Start widget all features sample - you can operate the widget on DJI Pilot |\n" - << "| [h] Start widget speaker sample - you can operate the speaker on DJI Pilot2 |\n" - << "| [i] Start power management sample - you will see notification when aircraft power off |\n" - << "| [j] Start data transmission sample - you can send or recv custom data on MSDK demo |\n" - << "| [k] Run camera manager sample - you can test camera's functions interactively |\n" - << "| [l] Start rtk positioning sample - you can receive rtk rtcm data when rtk signal is ok |\n" + << "| [e] Run camera manager sample - you can test camera's functions interactively |\n" + << "| [f] Start rtk positioning sample - you can receive rtk rtcm data when rtk signal is ok |\n" << std::endl; std::cin >> inputChar; @@ -102,79 +94,9 @@ int main(int argc, char **argv) DjiUser_RunStereoVisionViewSample(); break; case 'e': - returnCode = DjiTest_CameraEmuBaseStartService(); - if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_ERROR("camera emu common init error"); - break; - } - - if (DjiPlatform_GetSocketHandler() != nullptr) { - returnCode = DjiTest_CameraEmuMediaStartService(); - if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_ERROR("camera emu media init error"); - break; - } - } - - USER_LOG_INFO("Start camera all feautes sample successfully"); - break; - case 'f': - if (DjiTest_GimbalStartService() != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_ERROR("psdk gimbal init error"); - break; - } - - USER_LOG_INFO("Start gimbal all feautes sample successfully"); - break; - case 'g': - returnCode = DjiTest_WidgetStartService(); - if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_ERROR("widget sample init error"); - break; - } - - USER_LOG_INFO("Start widget all feautes sample successfully"); - break; - case 'h': - returnCode = DjiTest_WidgetSpeakerStartService(); - if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_ERROR("widget speaker test init error"); - break; - } - - USER_LOG_INFO("Start widget speaker sample successfully"); - break; - case 'i': - applyHighPowerHandler.pinInit = DjiTest_HighPowerApplyPinInit; - applyHighPowerHandler.pinWrite = DjiTest_WriteHighPowerApplyPin; - - returnCode = DjiTest_RegApplyHighPowerHandler(&applyHighPowerHandler); - if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_ERROR("regsiter apply high power handler error"); - break; - } - - returnCode = DjiTest_PowerManagementStartService(); - if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_ERROR("power management init error"); - break; - } - - USER_LOG_INFO("Start power management sample successfully"); - break; - case 'j': - returnCode = DjiTest_DataTransmissionStartService(); - if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_ERROR("data transmission sample init error"); - break; - } - - USER_LOG_INFO("Start data transmission sample successfully"); - break; - case 'k': DjiUser_RunCameraManagerSample(); break; - case 'l': + case 'f': returnCode = DjiTest_PositioningStartService(); if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { USER_LOG_ERROR("rtk positioning sample init error"); @@ -193,15 +115,5 @@ int main(int argc, char **argv) } /* Private functions definition-----------------------------------------------*/ -static T_DjiReturnCode DjiTest_HighPowerApplyPinInit() -{ - return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS; -} - -static T_DjiReturnCode DjiTest_WriteHighPowerApplyPin(E_DjiPowerManagementPinState pinState) -{ - //attention: please pull up the HWPR pin state by hardware. - return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS; -} /****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/ diff --git a/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_jpg.c b/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_jpg.c index 61029f50..5fc54b98 100644 --- a/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_jpg.c +++ b/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_jpg.c @@ -82,7 +82,7 @@ T_DjiReturnCode DjiMediaFile_GetAttrFunc_JPG(struct _DjiMediaFile *mediaFileHand } T_DjiReturnCode DjiMediaFile_GetDataOrigin_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len, - uint8_t *data, uint16_t *realLen) + uint8_t *data, uint32_t *realLen) { return UtilFile_GetFileDataByPath(mediaFileHandle->filePath, offset, len, data, realLen); } diff --git a/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_jpg.h b/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_jpg.h index af2c9c78..01064d5a 100644 --- a/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_jpg.h +++ b/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_jpg.h @@ -49,7 +49,7 @@ T_DjiReturnCode DjiMediaFile_GetAttrFunc_JPG(struct _DjiMediaFile *mediaFileHand T_DjiCameraMediaFileAttr *mediaFileAttr); T_DjiReturnCode DjiMediaFile_GetDataOrigin_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len, - uint8_t *data, uint16_t *realLen); + uint8_t *data, uint32_t *realLen); T_DjiReturnCode DjiMediaFile_GetFileSizeOrigin_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize); T_DjiReturnCode DjiMediaFile_CreateThumbNail_JPG(struct _DjiMediaFile *mediaFileHandle); diff --git a/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_mp4.c b/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_mp4.c index c5d5af89..dd3159d2 100644 --- a/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_mp4.c +++ b/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_mp4.c @@ -115,7 +115,7 @@ T_DjiReturnCode DjiMediaFile_GetAttrFunc_MP4(struct _DjiMediaFile *mediaFileHand } T_DjiReturnCode DjiMediaFile_GetDataOrigin_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len, - uint8_t *data, uint16_t *realLen) + uint8_t *data, uint32_t *realLen) { return UtilFile_GetFileDataByPath(mediaFileHandle->filePath, offset, len, data, realLen); } diff --git a/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_mp4.h b/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_mp4.h index e793fbc7..e1e3059e 100644 --- a/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_mp4.h +++ b/samples/sample_c/module_sample/camera_emu/dji_media_file_manage/dji_media_file_mp4.h @@ -49,7 +49,7 @@ T_DjiReturnCode DjiMediaFile_GetAttrFunc_MP4(struct _DjiMediaFile *mediaFileHand T_DjiCameraMediaFileAttr *mediaFileAttr); T_DjiReturnCode DjiMediaFile_GetDataOrigin_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len, - uint8_t *data, uint16_t *realLen); + uint8_t *data, uint32_t *realLen); T_DjiReturnCode DjiMediaFile_GetFileSizeOrigin_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize); T_DjiReturnCode DjiMediaFile_CreateThumbNail_MP4(struct _DjiMediaFile *mediaFileHandle); diff --git a/samples/sample_c/module_sample/camera_emu/test_payload_cam_emu_media.c b/samples/sample_c/module_sample/camera_emu/test_payload_cam_emu_media.c index e934af65..c15faf27 100644 --- a/samples/sample_c/module_sample/camera_emu/test_payload_cam_emu_media.c +++ b/samples/sample_c/module_sample/camera_emu/test_payload_cam_emu_media.c @@ -127,6 +127,7 @@ static T_DjiPlaybackInfo s_playbackInfo = {0}; static T_DjiTaskHandle s_userSendVideoThread; static T_UtilBuffer s_mediaPlayCommandBufferHandler = {0}; static T_DjiMutexHandle s_mediaPlayCommandBufferMutex = {0}; +static T_DjiSemaHandle s_mediaPlayWorkSem = NULL; static uint8_t s_mediaPlayCommandBuffer[sizeof(T_TestPayloadCameraPlaybackCommand) * 32] = {0}; static const char *s_frameKeyChar = "[PACKET]"; static const char *s_frameDurationTimeKeyChar = "duration_time"; @@ -179,6 +180,11 @@ T_DjiReturnCode DjiTest_CameraEmuMediaStartService(void) s_psdkCameraMedia.StartDownloadNotification = StartDownloadNotification; s_psdkCameraMedia.StopDownloadNotification = StopDownloadNotification; + if (DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS != osalHandler->SemaphoreCreate(0, &s_mediaPlayWorkSem)) { + USER_LOG_ERROR("SemaphoreCreate(\"%s\") error.", "s_mediaPlayWorkSem"); + return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; + } + if (osalHandler->MutexCreate(&s_mediaPlayCommandBufferMutex) != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { USER_LOG_ERROR("mutex create error"); return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; @@ -303,6 +309,7 @@ static T_DjiReturnCode DjiPlayback_PausePlay(T_DjiPlaybackInfo *playbackInfo) USER_LOG_ERROR("mutex unlock error"); return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; } + osalHandler->SemaphorePost(s_mediaPlayWorkSem); } playbackInfo->isInPlayProcess = 0; @@ -485,7 +492,7 @@ static T_DjiReturnCode DjiPlayback_StartPlayProcess(const char *filePath, uint32 USER_LOG_ERROR("mutex unlock error"); return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; } - + osalHandler->SemaphorePost(s_mediaPlayWorkSem); return returnCode; } @@ -514,7 +521,7 @@ static T_DjiReturnCode DjiPlayback_StopPlayProcess(void) USER_LOG_ERROR("mutex unlock error"); return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; } - + osalHandler->SemaphorePost(s_mediaPlayWorkSem); return returnCode; } @@ -1160,10 +1167,13 @@ static void *UserCameraMedia_SendVideoTask(void *arg) int lengthOfDataHaveBeenSent = 0; char *dataBuffer = NULL; T_TestPayloadCameraPlaybackCommand playbackCommand = {0}; - uint16_t bufferReadSize = 0; + uint16_t bufferReadSize = 0; char *videoFilePath = NULL; char *transcodedFilePath = NULL; float frameRate = 1.0f; + uint32_t waitDuration = 1000 / SEND_VIDEO_TASK_FREQ; + uint32_t rightNow = 0; + uint32_t sendExpect = 0; T_TestPayloadCameraVideoFrameInfo *frameInfo = NULL; uint32_t frameNumber = 0; uint32_t frameCount = 0; @@ -1216,8 +1226,16 @@ static void *UserCameraMedia_SendVideoTask(void *arg) exit(1); } + (void)osalHandler->GetTimeMs(&rightNow); + sendExpect = rightNow + waitDuration; while (1) { - osalHandler->TaskSleepMs(1000 / SEND_VIDEO_TASK_FREQ); + (void)osalHandler->GetTimeMs(&rightNow); + if (sendExpect > rightNow) { + waitDuration = sendExpect - rightNow; + } else { + waitDuration = 1000 / SEND_VIDEO_TASK_FREQ; + } + (void)osalHandler->SemaphoreTimedWait(s_mediaPlayWorkSem, waitDuration); // response playback command if (osalHandler->MutexLock(s_mediaPlayCommandBufferMutex) != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { @@ -1295,94 +1313,94 @@ static void *UserCameraMedia_SendVideoTask(void *arg) continue; } -send: - if (fpFile == NULL) { - USER_LOG_ERROR("open video file fail."); - continue; - } - - if (sendVideoFlag != true) - continue; + send: + if (fpFile == NULL) { + USER_LOG_ERROR("open video file fail."); + continue; + } - returnCode = DjiTest_CameraGetMode(&mode); - if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - continue; - } + if (sendVideoFlag != true) + continue; - returnCode = DjiTest_CameraGetVideoStreamType(&videoStreamType); - if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - continue; - } + returnCode = DjiTest_CameraGetMode(&mode); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + continue; + } - if (mode == DJI_CAMERA_MODE_PLAYBACK && s_playbackInfo.isInPlayProcess == false) { - continue; - } + returnCode = DjiTest_CameraGetVideoStreamType(&videoStreamType); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + continue; + } - if (!USER_UTIL_IS_WORK_TURN(sendVideoStep++, frameRate, SEND_VIDEO_TASK_FREQ)) - continue; + if (mode == DJI_CAMERA_MODE_PLAYBACK && s_playbackInfo.isInPlayProcess == false) { + continue; + } - frameBufSize = frameInfo[frameNumber].size; - if (videoStreamType == DJI_CAMERA_VIDEO_STREAM_TYPE_H264_DJI_FORMAT) { - frameBufSize = frameBufSize + VIDEO_FRAME_AUD_LEN; - } + frameBufSize = frameInfo[frameNumber].size; + if (videoStreamType == DJI_CAMERA_VIDEO_STREAM_TYPE_H264_DJI_FORMAT) { + frameBufSize = frameBufSize + VIDEO_FRAME_AUD_LEN; + } - dataBuffer = calloc(frameBufSize, 1); - if (dataBuffer == NULL) { - USER_LOG_ERROR("malloc fail."); - goto free; - } + dataBuffer = calloc(frameBufSize, 1); + if (dataBuffer == NULL) { + USER_LOG_ERROR("malloc fail."); + goto free; + } - ret = fseek(fpFile, frameInfo[frameNumber].positionInFile, SEEK_SET); - if (ret != 0) { - USER_LOG_ERROR("fseek fail."); - goto free; - } + ret = fseek(fpFile, frameInfo[frameNumber].positionInFile, SEEK_SET); + if (ret != 0) { + USER_LOG_ERROR("fseek fail."); + goto free; + } - dataLength = fread(dataBuffer, 1, frameInfo[frameNumber].size, fpFile); - if (dataLength != frameInfo[frameNumber].size) { - USER_LOG_ERROR("read data from video file error."); - } else { - USER_LOG_DEBUG("read data from video file success, len = %d B\r\n", dataLength); - } + dataLength = fread(dataBuffer, 1, frameInfo[frameNumber].size, fpFile); + if (dataLength != frameInfo[frameNumber].size) { + USER_LOG_ERROR("read data from video file error."); + } else { + USER_LOG_DEBUG("read data from video file success, len = %d B\r\n", dataLength); + } - if (videoStreamType == DJI_CAMERA_VIDEO_STREAM_TYPE_H264_DJI_FORMAT) { - memcpy(&dataBuffer[frameInfo[frameNumber].size], s_frameAudInfo, VIDEO_FRAME_AUD_LEN); - dataLength = dataLength + VIDEO_FRAME_AUD_LEN; - } + if (videoStreamType == DJI_CAMERA_VIDEO_STREAM_TYPE_H264_DJI_FORMAT) { + memcpy(&dataBuffer[frameInfo[frameNumber].size], s_frameAudInfo, VIDEO_FRAME_AUD_LEN); + dataLength = dataLength + VIDEO_FRAME_AUD_LEN; + } - lengthOfDataHaveBeenSent = 0; - while (dataLength - lengthOfDataHaveBeenSent) { - lengthOfDataToBeSent = USER_UTIL_MIN(DATA_SEND_FROM_VIDEO_STREAM_MAX_LEN, - dataLength - lengthOfDataHaveBeenSent); - returnCode = DjiPayloadCamera_SendVideoStream((const uint8_t *) dataBuffer + lengthOfDataHaveBeenSent, - lengthOfDataToBeSent); - if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_ERROR("send video stream error: 0x%08llX.", returnCode); + lengthOfDataHaveBeenSent = 0; + while (dataLength - lengthOfDataHaveBeenSent) { + lengthOfDataToBeSent = USER_UTIL_MIN(DATA_SEND_FROM_VIDEO_STREAM_MAX_LEN, + dataLength - lengthOfDataHaveBeenSent); + returnCode = DjiPayloadCamera_SendVideoStream((const uint8_t *) dataBuffer + lengthOfDataHaveBeenSent, + lengthOfDataToBeSent); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("send video stream error: 0x%08llX.", returnCode); + } + lengthOfDataHaveBeenSent += lengthOfDataToBeSent; } - lengthOfDataHaveBeenSent += lengthOfDataToBeSent; - } - if ((frameNumber++) >= frameCount) { - USER_LOG_DEBUG("reach file tail."); - frameNumber = 0; + (void)osalHandler->GetTimeMs(&sendExpect); + sendExpect += (1000 / frameRate); - if (sendOneTimeFlag == true) - sendVideoFlag = false; - } + if ((frameNumber++) >= frameCount) { + USER_LOG_DEBUG("reach file tail."); + frameNumber = 0; - returnCode = DjiPayloadCamera_GetVideoStreamState(&videoStreamState); - if (returnCode == DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_DEBUG( - "video stream state: realtimeBandwidthLimit: %d, realtimeBandwidthBeforeFlowController: %d, realtimeBandwidthAfterFlowController:%d busyState: %d.", - videoStreamState.realtimeBandwidthLimit, videoStreamState.realtimeBandwidthBeforeFlowController, - videoStreamState.realtimeBandwidthAfterFlowController, - videoStreamState.busyState); - } else { - USER_LOG_ERROR("get video stream state error."); - } + if (sendOneTimeFlag == true) + sendVideoFlag = false; + } + + returnCode = DjiPayloadCamera_GetVideoStreamState(&videoStreamState); + if (returnCode == DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_DEBUG( + "video stream state: realtimeBandwidthLimit: %d, realtimeBandwidthBeforeFlowController: %d, realtimeBandwidthAfterFlowController:%d busyState: %d.", + videoStreamState.realtimeBandwidthLimit, videoStreamState.realtimeBandwidthBeforeFlowController, + videoStreamState.realtimeBandwidthAfterFlowController, + videoStreamState.busyState); + } else { + USER_LOG_ERROR("get video stream state error."); + } -free: - free(dataBuffer); + free: + free(dataBuffer); } } diff --git a/samples/sample_c/module_sample/camera_manager/test_camera_manager.c b/samples/sample_c/module_sample/camera_manager/test_camera_manager.c index e246e07c..dd6b4b7e 100644 --- a/samples/sample_c/module_sample/camera_manager/test_camera_manager.c +++ b/samples/sample_c/module_sample/camera_manager/test_camera_manager.c @@ -25,10 +25,12 @@ /* Includes ------------------------------------------------------------------*/ #include #include +#include #include "test_camera_manager.h" #include "dji_camera_manager.h" #include "dji_platform.h" #include "dji_logger.h" +#include "dji_mop_channel.h" /* Private constants ---------------------------------------------------------*/ #define TEST_CAMERA_MANAGER_MEDIA_FILE_NAME_MAX_SIZE 256 @@ -37,6 +39,12 @@ #define TEST_CAMERA_MAX_INFRARED_ZOOM_FACTOR 8 #define TEST_CAMERA_MIN_INFRARED_ZOOM_FACTOR 2 +#define TEST_CAMERA_MOP_CHANNEL_SUBSCRIBE_POINT_CLOUD_CHANNEL_ID 49152 +#define TEST_CAMERA_MOP_CHANNEL_SUBSCRIBE_POINT_CLOUD_RECV_BUFFER (512 * 1024) +#define TEST_CAMERA_MOP_CHANNEL_COLOR_POINTS_BUFFER (512 * 1024) +#define TEST_CAMERA_MOP_CHANNEL_WAIT_TIME_MS (3 * 1000) +#define TEST_CAMERA_MOP_CHANNEL_MAX_RECV_COUNT 30 +#define TEST_CAMEAR_POINT_CLOUD_FILE_PATH_STR_MAX_SIZE 256 /* Private types -------------------------------------------------------------*/ typedef struct { @@ -55,6 +63,7 @@ static const T_DjiTestCameraTypeStr s_cameraTypeStrList[] = { {DJI_CAMERA_TYPE_H20T, "Zenmuse H20T"}, {DJI_CAMERA_TYPE_P1, "Zenmuse P1"}, {DJI_CAMERA_TYPE_L1, "Zenmuse L1"}, + {DJI_CAMERA_TYPE_L2, "Zenmuse L2"}, {DJI_CAMERA_TYPE_H20N, "Zenmuse H20N"}, {DJI_CAMERA_TYPE_M30, "M30 Camera"}, {DJI_CAMERA_TYPE_M30T, "M30T Camera"}, @@ -68,6 +77,8 @@ static uint32_t downloadStartMs = 0; static uint32_t downloadEndMs = 0; static char downloadFileName[TEST_CAMERA_MANAGER_MEDIA_FILE_NAME_MAX_SIZE] = {0}; static uint32_t s_nextDownloadFileIndex = 0; +static T_DjiMopChannelHandle s_mopChannelHandle; +static char s_pointCloudFilePath[TEST_CAMEAR_POINT_CLOUD_FILE_PATH_STR_MAX_SIZE]; /* Private functions declaration ---------------------------------------------*/ static uint8_t DjiTest_CameraManagerGetCameraTypeIndex(E_DjiCameraType cameraType); @@ -79,6 +90,7 @@ static T_DjiReturnCode DjiTest_CameraManagerGetAreaThermometryData(E_DjiMountPos static T_DjiReturnCode DjiTest_CameraManagerGetPointThermometryData(E_DjiMountPosition position); static T_DjiReturnCode DjiTest_CameraManagerGetLidarRangingInfo(E_DjiMountPosition position); +T_DjiReturnCode DjiTest_CameraManagerSubscribePointCloud(E_DjiMountPosition position); /* Exported functions definition ---------------------------------------------*/ /*! @brief Sample to set EV for camera, using async api @@ -906,7 +918,8 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition, if (cameraType == DJI_CAMERA_TYPE_H20 || cameraType == DJI_CAMERA_TYPE_H20T || cameraType == DJI_CAMERA_TYPE_H20N || cameraType == DJI_CAMERA_TYPE_M30 || cameraType == DJI_CAMERA_TYPE_M30T || cameraType == DJI_CAMERA_TYPE_M3E || - cameraType == DJI_CAMERA_TYPE_M3T || cameraType == DJI_CAMERA_TYPE_M3T) { + cameraType == DJI_CAMERA_TYPE_M3T || cameraType == DJI_CAMERA_TYPE_M3T || + cameraType == DJI_CAMERA_TYPE_L2) { USER_LOG_INFO("Set mounted position %d camera's exposure mode to manual mode.", mountPosition); returnCode = DjiTest_CameraManagerSetExposureMode(mountPosition, @@ -945,7 +958,7 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition, if (cameraType == DJI_CAMERA_TYPE_H20 || cameraType == DJI_CAMERA_TYPE_H20N || cameraType == DJI_CAMERA_TYPE_H20T || cameraType == DJI_CAMERA_TYPE_M30 || cameraType == DJI_CAMERA_TYPE_M30T || cameraType == DJI_CAMERA_TYPE_M3E - || cameraType == DJI_CAMERA_TYPE_M3T) { + || cameraType == DJI_CAMERA_TYPE_M3T || cameraType == DJI_CAMERA_TYPE_L2) { USER_LOG_INFO("Set mounted position %d camera's exposure mode to manual mode.", mountPosition); returnCode = DjiTest_CameraManagerSetExposureMode(mountPosition, @@ -1251,9 +1264,10 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition, if (cameraType == DJI_CAMERA_TYPE_XT2 || cameraType == DJI_CAMERA_TYPE_XTS || cameraType == DJI_CAMERA_TYPE_H20 || cameraType == DJI_CAMERA_TYPE_P1 || - cameraType == DJI_CAMERA_TYPE_L1 || cameraType == DJI_CAMERA_TYPE_M3E || - cameraType == DJI_CAMERA_TYPE_M3T) { - USER_LOG_INFO("Camera type %d does not support night scene mode!", cameraType); + cameraType == DJI_CAMERA_TYPE_L1 || cameraType == DJI_CAMERA_TYPE_L2 || + cameraType == DJI_CAMERA_TYPE_M3E || cameraType == DJI_CAMERA_TYPE_M3T) { + USER_LOG_INFO("Camera type %s does not support night scene mode!", + s_cameraTypeStrList[DjiTest_CameraManagerGetCameraTypeIndex(cameraType)].cameraTypeStr); goto exitCameraModule; } @@ -1355,8 +1369,8 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition, if (cameraType == DJI_CAMERA_TYPE_Z30 || cameraType == DJI_CAMERA_TYPE_XT2 || cameraType == DJI_CAMERA_TYPE_XTS || cameraType == DJI_CAMERA_TYPE_P1 || cameraType == DJI_CAMERA_TYPE_L1) { - USER_LOG_INFO("Camera type %d does not support set capture or recording stream(s) to storage.", - cameraType); + USER_LOG_INFO("Camera type %s does not support set capture or recording stream(s) to storage.", + s_cameraTypeStrList[DjiTest_CameraManagerGetCameraTypeIndex(cameraType)].cameraTypeStr); goto exitCameraModule; } @@ -1684,9 +1698,9 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition, osalHandler->TaskSleepMs(10); printf("Input focus ring value to set: "); - scanf("%d", &focusRingValue); + scanf("%hd", &focusRingValue); - USER_LOG_INFO("Try to set focus ring value as %d", focusRingValue); + USER_LOG_INFO("Try to set focus ring value as %hd", focusRingValue); returnCode = DjiCameraManager_SetFocusRingValue(mountPosition, focusRingValue); if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { USER_LOG_ERROR("Set camera focus ring value at position %d failed", mountPosition); @@ -1936,6 +1950,7 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition, } case E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_METERING_POINT: { int32_t x, y; + uint8_t getX, getY; uint8_t horizonRegionNum; uint8_t viticalRegionNum; @@ -1965,24 +1980,26 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition, osalHandler->TaskSleepMs(500); - returnCode = DjiCameraManager_GetMeteringPoint(mountPosition, &x, &y); + returnCode = DjiCameraManager_GetMeteringPoint(mountPosition, &getX, &getY); if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { USER_LOG_ERROR("Get metering point failed"); goto exitCameraModule; } - USER_LOG_INFO("Current metering point: (%d, %d)", x, y); + USER_LOG_INFO("Current metering point: (%d, %d)", getX, getY); break; } case E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_FFC_MODE_AND_TRRIGER: { - E_DjiCameraManagerFfcMode ffcMode; + uint32_t ffcMode; if (cameraType == DJI_CAMERA_TYPE_Z30 || cameraType == DJI_CAMERA_TYPE_XT2 || cameraType == DJI_CAMERA_TYPE_H20 || cameraType == DJI_CAMERA_TYPE_P1 || cameraType == DJI_CAMERA_TYPE_L1 || cameraType == DJI_CAMERA_TYPE_M30 || - cameraType == DJI_CAMERA_TYPE_M3E) { - USER_LOG_WARN("Camera type %d don't support FFC function.", cameraType); + cameraType == DJI_CAMERA_TYPE_M3E || + cameraType == DJI_CAMERA_TYPE_L2) { + USER_LOG_WARN("Camera type %s don't support FFC function.", + s_cameraTypeStrList[DjiTest_CameraManagerGetCameraTypeIndex(cameraType)].cameraTypeStr); goto exitCameraModule; } @@ -2000,7 +2017,7 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition, } } - returnCode = DjiCameraManager_SetFfcMode(mountPosition, ffcMode); + returnCode = DjiCameraManager_SetFfcMode(mountPosition, (E_DjiCameraManagerFfcMode)ffcMode); if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { USER_LOG_ERROR("Set FFC mode %d failed, camera position %d, error code 0x%08llX", ffcMode, mountPosition, returnCode); @@ -2019,14 +2036,16 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition, break; } case E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_GAIN_MODE: { - E_DjiCameraManagerIrGainMode gainMode; + uint32_t gainMode; T_DjiCameraManagerIrTempMeterRange tempRange = {0}; if (cameraType == DJI_CAMERA_TYPE_Z30 || cameraType == DJI_CAMERA_TYPE_XT2 || cameraType == DJI_CAMERA_TYPE_H20 || cameraType == DJI_CAMERA_TYPE_P1 || cameraType == DJI_CAMERA_TYPE_L1 || cameraType == DJI_CAMERA_TYPE_M30 || - cameraType == DJI_CAMERA_TYPE_M3E) { - USER_LOG_WARN("Camera type %d don't support infrared function.", cameraType); + cameraType == DJI_CAMERA_TYPE_M3E || + cameraType == DJI_CAMERA_TYPE_L2) { + USER_LOG_WARN("Camera type %s don't support infrared function.", + s_cameraTypeStrList[DjiTest_CameraManagerGetCameraTypeIndex(cameraType)].cameraTypeStr); goto exitCameraModule; } @@ -2056,14 +2075,14 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition, tempRange.lowGainTempMin, tempRange.lowGainTempMax, tempRange.highGainTempMin, tempRange.highGainTempMax); - returnCode = DjiCameraManager_SetInfraredCameraGainMode(mountPosition, gainMode); + returnCode = DjiCameraManager_SetInfraredCameraGainMode(mountPosition, (E_DjiCameraManagerIrGainMode)gainMode); if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { USER_LOG_INFO("Fail to set infrared camera gain mode. position %d, error code 0x%08llX", mountPosition, returnCode); goto exitCameraModule; } - USER_LOG_INFO("Set gain mode to %d successfully!", gainMode); + USER_LOG_INFO("Set gain mode to %d successfully!", (E_DjiCameraManagerIrGainMode)gainMode); break; } @@ -2115,6 +2134,17 @@ T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition, break; } +#ifndef SYSTEM_ARCH_RTOS + case E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SUBSCRIBE_POINT_CLOUD: { + returnCode = DjiTest_CameraManagerSubscribePointCloud(mountPosition); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("Fail to subscribe point cloud. position %d, error code 0x%08llX", + mountPosition, returnCode); + goto exitCameraModule; + } + break; + } +#endif default: { USER_LOG_ERROR("There is no valid command input!"); break; @@ -2493,4 +2523,120 @@ static T_DjiReturnCode DjiTest_CameraManagerGetLidarRangingInfo(E_DjiMountPositi return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS; } +#ifndef SYSTEM_ARCH_RTOS +T_DjiReturnCode DjiTest_CameraManagerSubscribePointCloud(E_DjiMountPosition position) +{ + T_DjiReturnCode returnCode; + T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler(); + uint8_t recvBuf[TEST_CAMERA_MOP_CHANNEL_SUBSCRIBE_POINT_CLOUD_RECV_BUFFER] = {0}; + uint8_t colorPointsBuf[TEST_CAMERA_MOP_CHANNEL_COLOR_POINTS_BUFFER] = {0}; + uint32_t realLen; + uint32_t recvDataCount = 0; + struct tm *localTime = NULL; + time_t currentTime = time(NULL); + FILE *fp = NULL; + size_t size; + T_DjiCameraManagerColorPointCloud *colorPointCloud; + uint32_t colorPointCloudDataByte = 0; + uint32_t colorPointsNum = 0; + + returnCode = DjiCameraManager_StartRecordPointCloud(position); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("Start record point cloud failed, stat:0x%08llX.", returnCode); + return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; + } + + localTime = localtime(¤tTime); + sprintf(s_pointCloudFilePath, "payload%d_point_cloud_%04d%02d%02d_%02d-%02d-%02d.ldrt", + position, localTime->tm_year + 1900, localTime->tm_mon + 1, localTime->tm_mday, + localTime->tm_hour, localTime->tm_min, localTime->tm_sec); + + fp = fopen(s_pointCloudFilePath, "ab+"); + if (fp == NULL) { + USER_LOG_ERROR("fopen point cloud file failed!\n"); + return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; + } + + returnCode = DjiMopChannel_Init(); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + fclose(fp); + USER_LOG_ERROR("Mop channel init error, stat:0x%08llX.", returnCode); + return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; + } + + returnCode = DjiMopChannel_Create(&s_mopChannelHandle, DJI_MOP_CHANNEL_TRANS_UNRELIABLE); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + fclose(fp); + USER_LOG_ERROR("Mop channel create send handle error, stat:0x%08llX.", returnCode); + return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; + } + +RECONNECT: + osalHandler->TaskSleepMs(TEST_CAMERA_MOP_CHANNEL_WAIT_TIME_MS); + returnCode = DjiMopChannel_Connect(s_mopChannelHandle, DJI_CHANNEL_ADDRESS_PAYLOAD_PORT_NO1, + TEST_CAMERA_MOP_CHANNEL_SUBSCRIBE_POINT_CLOUD_CHANNEL_ID); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("Connect point cloud mop channel error, stat:0x%08llX.", returnCode); + goto RECONNECT; + } + + while (1) { + if (recvDataCount == TEST_CAMERA_MOP_CHANNEL_MAX_RECV_COUNT) { + USER_LOG_INFO("Subscribe point cloud success, the point cloud data is stored in %s", s_pointCloudFilePath); + break; + } + + memset(recvBuf, 0, TEST_CAMERA_MOP_CHANNEL_SUBSCRIBE_POINT_CLOUD_RECV_BUFFER); + + returnCode = DjiMopChannel_RecvData(s_mopChannelHandle, recvBuf, + TEST_CAMERA_MOP_CHANNEL_SUBSCRIBE_POINT_CLOUD_RECV_BUFFER, &realLen); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + if (returnCode == DJI_ERROR_MOP_CHANNEL_MODULE_CODE_CONNECTION_CLOSE) { + USER_LOG_INFO("mop channel is disconnected"); + osalHandler->TaskSleepMs(TEST_CAMERA_MOP_CHANNEL_WAIT_TIME_MS); + goto RECONNECT; + } + } + + colorPointCloud = (T_DjiCameraManagerColorPointCloud *) recvBuf; + colorPointCloudDataByte = (colorPointCloud->pointCloudHeader).dataByte; + colorPointsNum = colorPointCloudDataByte / sizeof(T_DjiCameraManagerPointXYZRGBInfo); + memcpy(colorPointsBuf, (uint8_t *)(colorPointCloud->points), colorPointCloudDataByte); + USER_LOG_INFO("Mop channel recv data from channel length:%d, count:%d, points num = %d, points byte = %d", + realLen, recvDataCount++, colorPointsNum, colorPointCloudDataByte); + + size = fwrite(colorPointsBuf, 1, colorPointCloudDataByte, fp); + if (size != colorPointCloudDataByte) { + USER_LOG_ERROR("fwrite point cloud file failed!\n"); + fclose(fp); + return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; + } + + fflush(fp); + } + + fclose(fp); + + returnCode = DjiMopChannel_Close(s_mopChannelHandle); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("Close mop channel error, stat:0x%08llX.", returnCode); + return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; + } + + returnCode = DjiMopChannel_Destroy(s_mopChannelHandle); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("Destroy mop channel error, stat:0x%08llX.", returnCode); + return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; + } + + returnCode = DjiCameraManager_StopRecordPointCloud(position); + if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { + USER_LOG_ERROR("Stop record point cloud failed, stat:0x%08llX.", returnCode); + return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN; + } + + return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS; +} +#endif + /****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/ diff --git a/samples/sample_c/module_sample/camera_manager/test_camera_manager.h b/samples/sample_c/module_sample/camera_manager/test_camera_manager.h index f7e766aa..d36a00a3 100644 --- a/samples/sample_c/module_sample/camera_manager/test_camera_manager.h +++ b/samples/sample_c/module_sample/camera_manager/test_camera_manager.h @@ -72,6 +72,7 @@ typedef enum { E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_FFC_MODE_AND_TRRIGER, E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_GAIN_MODE, E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_GET_CAMERA_STATUS, + E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SUBSCRIBE_POINT_CLOUD, E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_INDEX_MAX } E_DjiTestCameraManagerSampleSelect; /* Exported functions --------------------------------------------------------*/ diff --git a/samples/sample_c/module_sample/data_transmission/test_data_transmission.c b/samples/sample_c/module_sample/data_transmission/test_data_transmission.c index 5e400879..762f995c 100644 --- a/samples/sample_c/module_sample/data_transmission/test_data_transmission.c +++ b/samples/sample_c/module_sample/data_transmission/test_data_transmission.c @@ -113,7 +113,8 @@ T_DjiReturnCode DjiTest_DataTransmissionStartService(void) USER_LOG_ERROR("get data stream remote address error."); } - } else if (s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_EXTENSION_PORT) { + } else if (s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_EXTENSION_PORT + || DJI_MOUNT_POSITION_EXTENSION_LITE_PORT == s_aircraftInfoBaseInfo.mountPosition) { channelAddress = DJI_CHANNEL_ADDRESS_PAYLOAD_PORT_NO1; djiStat = DjiLowSpeedDataChannel_RegRecvDataCallback(channelAddress, ReceiveDataFromPayload); if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { @@ -240,7 +241,8 @@ static void *UserDataTransmission_Task(void *arg) } #endif } - } else if (s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_EXTENSION_PORT) { + } else if (s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_EXTENSION_PORT + || DJI_MOUNT_POSITION_EXTENSION_LITE_PORT == s_aircraftInfoBaseInfo.mountPosition) { channelAddress = DJI_CHANNEL_ADDRESS_PAYLOAD_PORT_NO1; djiStat = DjiLowSpeedDataChannel_SendData(channelAddress, dataToBeSent, sizeof(dataToBeSent)); if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) diff --git a/samples/sample_c/module_sample/interest_point/test_interest_point.c b/samples/sample_c/module_sample/interest_point/test_interest_point.c index 530e88d6..b9caaceb 100644 --- a/samples/sample_c/module_sample/interest_point/test_interest_point.c +++ b/samples/sample_c/module_sample/interest_point/test_interest_point.c @@ -52,13 +52,13 @@ T_DjiReturnCode DjiTest_InterestPointRunSample(void) returnCode = DjiFlightController_Init(ridInfo); if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_INFO("Flight control init failed, errno=%lld", returnCode); + USER_LOG_ERROR("Flight control init failed, errno=%lld", returnCode); return returnCode; } returnCode = DjiInterestPoint_Init(); if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { - USER_LOG_INFO("Point interest init failed, errno=%lld", returnCode); + USER_LOG_ERROR("Point interest init failed, errno=%lld", returnCode); return returnCode; } @@ -92,7 +92,7 @@ T_DjiReturnCode DjiTest_InterestPointRunSample(void) DjiInterestPoint_SetSpeed(5.0f); for (int i = 0; i < 60; ++i) { - USER_LOG_ERROR("Interest point mission running %d.", i); + USER_LOG_INFO("Interest point mission running %d.", i); osalHandler->TaskSleepMs(1000); } diff --git a/samples/sample_c/module_sample/liveview/test_liveview.c b/samples/sample_c/module_sample/liveview/test_liveview.c index 8d4eb026..850df7aa 100644 --- a/samples/sample_c/module_sample/liveview/test_liveview.c +++ b/samples/sample_c/module_sample/liveview/test_liveview.c @@ -81,9 +81,9 @@ T_DjiReturnCode DjiTest_LiveviewRunSample(E_DjiMountPosition mountPosition) DjiTest_WidgetLogAppend("--> Step 2: Start h264 stream of the fpv and selected payload\r\n"); if (aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3E) { - //TODO: how to use on M3E + } else if (aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3T) { - //TODO: how to use on M3T + } else { localTime = localtime(¤tTime); sprintf(s_fpvCameraStreamFilePath, "fpv_stream_%04d%02d%02d_%02d-%02d-%02d.h264", diff --git a/samples/sample_c/module_sample/power_management/test_power_management.c b/samples/sample_c/module_sample/power_management/test_power_management.c index 0af54fdd..0f273c8c 100644 --- a/samples/sample_c/module_sample/power_management/test_power_management.c +++ b/samples/sample_c/module_sample/power_management/test_power_management.c @@ -87,10 +87,9 @@ T_DjiReturnCode DjiTest_PowerManagementStartService(void) return returnCode; } - if ((baseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M300_RTK || - baseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M350_RTK) && - (baseInfo.djiAdapterType == DJI_SDK_ADAPTER_TYPE_SKYPORT_V2 || - baseInfo.djiAdapterType == DJI_SDK_ADAPTER_TYPE_XPORT)) { + if (((baseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M300_RTK || baseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M350_RTK) && + (baseInfo.djiAdapterType == DJI_SDK_ADAPTER_TYPE_SKYPORT_V2 || baseInfo.djiAdapterType == DJI_SDK_ADAPTER_TYPE_XPORT)) || + baseInfo.aircraftType == DJI_AIRCRAFT_TYPE_FC30) { // apply high power if (s_applyHighPowerHandler.pinInit == NULL) { USER_LOG_ERROR("apply high power pin init interface is NULL error"); diff --git a/samples/sample_c/module_sample/widget/test_widget_speaker.c b/samples/sample_c/module_sample/widget/test_widget_speaker.c index 44d98e90..c28384f1 100644 --- a/samples/sample_c/module_sample/widget/test_widget_speaker.c +++ b/samples/sample_c/module_sample/widget/test_widget_speaker.c @@ -62,7 +62,7 @@ #define WIDGET_SPEAKER_AUDIO_OPUS_DECODE_BITRATE_8KBPS (8000) /* The speaker initialization parameters */ -#define WIDGET_SPEAKER_DEFAULT_VOLUME (30) +#define WIDGET_SPEAKER_DEFAULT_VOLUME (60) #define EKHO_INSTALLED (1) /* Private types -------------------------------------------------------------*/ diff --git a/samples/sample_c/module_sample/widget_interaction_test/test_widget_interaction.c b/samples/sample_c/module_sample/widget_interaction_test/test_widget_interaction.c index 817b6acf..5e83a1af 100644 --- a/samples/sample_c/module_sample/widget_interaction_test/test_widget_interaction.c +++ b/samples/sample_c/module_sample/widget_interaction_test/test_widget_interaction.c @@ -462,7 +462,8 @@ static void *DjiTest_WidgetInteractionTask(void *arg) USER_LOG_INFO("--------------------------------------------------------------------------------------------->"); DjiTest_WidgetLogAppend("-> Sample Start"); - if (s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_EXTENSION_PORT) { + if (s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_EXTENSION_PORT + || DJI_MOUNT_POSITION_EXTENSION_LITE_PORT == s_aircraftInfoBaseInfo.mountPosition) { switch (s_extensionPortSampleIndex) { case E_DJI_SAMPLE_INDEX_WAYPOINT_V2: if (s_isallowRunFlightControlSample == true) { diff --git a/samples/sample_c/platform/linux/common/upgrade_platform_opt/upgrade_platform_opt_linux.c b/samples/sample_c/platform/linux/common/upgrade_platform_opt/upgrade_platform_opt_linux.c index 8375e5d6..7928a435 100644 --- a/samples/sample_c/platform/linux/common/upgrade_platform_opt/upgrade_platform_opt_linux.c +++ b/samples/sample_c/platform/linux/common/upgrade_platform_opt/upgrade_platform_opt_linux.c @@ -132,7 +132,7 @@ T_DjiReturnCode DjiUpgradePlatformLinux_CreateUpgradeProgramFile(const T_DjiUpgr snprintf(filePath, DJI_FILE_PATH_SIZE_MAX, "%s%s", DJI_TEST_UPGRADE_FILE_DIR, fileInfo->fileName); s_upgradeProgramFile = fopen(filePath, "w+"); if (s_upgradeProgramFile == NULL) { - USER_LOG_ERROR("Upgrade program file can't create"); + USER_LOG_ERROR("Upgrade program file can't create: \"%s\"", filePath); return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR; } diff --git a/samples/sample_c/platform/linux/manifold2/application/main.c b/samples/sample_c/platform/linux/manifold2/application/main.c index bbe252e2..556436e0 100644 --- a/samples/sample_c/platform/linux/manifold2/application/main.c +++ b/samples/sample_c/platform/linux/manifold2/application/main.c @@ -57,7 +57,7 @@ /* Private constants ---------------------------------------------------------*/ #define DJI_LOG_PATH "Logs/DJI" -#define DJI_LOG_INDEX_FILE_NAME "Logs/latest" +#define DJI_LOG_INDEX_FILE_NAME "Logs/index" #define DJI_LOG_FOLDER_NAME "Logs" #define DJI_LOG_PATH_MAX_SIZE (128) #define DJI_LOG_FOLDER_NAME_MAX_SIZE (32) @@ -143,9 +143,9 @@ int main(int argc, char **argv) if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { USER_LOG_ERROR("get aircraft version info error"); } else { - USER_LOG_INFO("Aircraft version is V%d.%d.%d.%d", aircraftInfoVersion.debugVersion, - aircraftInfoVersion.modifyVersion, aircraftInfoVersion.minorVersion, - aircraftInfoVersion.majorVersion); + USER_LOG_INFO("Aircraft version is V%d.%d.%d.%d", aircraftInfoVersion.majorVersion, + aircraftInfoVersion.minorVersion, aircraftInfoVersion.modifyVersion, + aircraftInfoVersion.debugVersion); } } @@ -699,6 +699,8 @@ static T_DjiReturnCode DjiUser_LocalWriteFsInit(const char *path) } } + sprintf(systemCmd, "ln -sfrv %s " DJI_LOG_FOLDER_NAME "/latest.log", filePath); + system(systemCmd); return djiReturnCode; } diff --git a/samples/sample_c/platform/rtos_freertos/stm32f4_discovery/application/application.c b/samples/sample_c/platform/rtos_freertos/stm32f4_discovery/application/application.c index db540a39..54bcdecc 100644 --- a/samples/sample_c/platform/rtos_freertos/stm32f4_discovery/application/application.c +++ b/samples/sample_c/platform/rtos_freertos/stm32f4_discovery/application/application.c @@ -242,7 +242,6 @@ void DjiUser_StartTask(void const *argument) returnCode = DjiTest_CameraEmuBaseStartService(); if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { USER_LOG_ERROR("camera emu common init error"); - goto out; } } #endif diff --git a/samples/sample_c/platform/rtos_freertos/stm32f4_discovery/project/mdk/mdk_app.uvprojx b/samples/sample_c/platform/rtos_freertos/stm32f4_discovery/project/mdk/mdk_app.uvprojx index 3d191056..85a7b396 100644 --- a/samples/sample_c/platform/rtos_freertos/stm32f4_discovery/project/mdk/mdk_app.uvprojx +++ b/samples/sample_c/platform/rtos_freertos/stm32f4_discovery/project/mdk/mdk_app.uvprojx @@ -1,1471 +1,1471 @@ - - -2.1 -
### uVision Project, (C) Keil Software
- - -mdk_app -0x4 -ARM-ADS - - -STM32F407VGTx -STMicroelectronics -IROM(0x08000000,0x100000) IRAM(0x20000000,0x20000) IRAM2(0x10000000,0x10000) CPUTYPE("Cortex-M4") FPU2 CLOCK(8000000) ELITTLE - - -UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F407VGTx$CMSIS\Flash\STM32F4xx_1024.FLM)) - -$$Device:STM32F407VGTx$Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h - - - - - - - - - -$$Device:STM32F407VGTx$CMSIS\SVD\STM32F40x.svd -0 -0 - - - - - - -0 -0 -0 -0 -1 - -.\Objects\ -mdk_app -1 -0 -0 -0 -0 -.\build -1 -0 -0 - -0 -0 -C:\Keil_v5\ARM\ARMCC\Bin\fromelf.exe .\Objects\mdk_app.axf --bin --output .\dji_sdk_demo_rtos.bin - -0 -0 -0 -0 - - -0 -0 -C:\Keil_v5\ARM\ARMCC\Bin\fromelf.exe .\Objects\mdk_app.axf --bin --output .\dji_sdk_demo_rtos.bin - -0 -0 -0 -0 - - -0 -0 -C:\Keil_v5\ARM\ARMCC\Bin\fromelf.exe .\Objects\mdk_app.axf --bin --output .\dji_sdk_demo_rtos.bin - -0 -0 - -0 - -Keil.STM32F4xx_DFP.2.9.0 - - -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 - - -1 - - -SARMCM3.DLL - -DCM.DLL --pCM4 -SARMCM3.DLL --MPU -TCM.DLL --pCM4 - - - -1 -0 -0 -0 -16 - - -0 -1 -1 -1 -1 -1 -1 -1 -0 -1 - - -1 -1 -1 -1 -1 -1 -0 -1 -0 -1 - -0 -12 - - - - - - - - - - - - - -STLink\ST-LINKIII-KEIL_SWO.dll - - - - -1 -0 -0 -1 -1 -4100 - -1 -STLink\ST-LINKIII-KEIL_SWO.dll - - - - - -0 - - - -0 -1 -1 -1 -1 -1 -1 -1 -0 -1 -1 -0 -1 -1 -0 -0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -0 -0 -"Cortex-M3" - -0 -0 -0 -1 -1 -0 -0 -0 -1 -0 -8 -1 -0 -0 -3 -3 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 -0 -0 -0 -1 -0 - - -0 -0x08010000 -0x0 - - -0 -0x08010000 -0x0 - - -0 -0x08010000 -0x0 - - -0 -0x08010000 -0x0 - - -0 -0x08010000 -0x0 - - -0 -0x08010000 -0x0 - - -0 -0x20000000 -0x20000 - - -1 -0x08010000 -0x70000 - - -0 -0x08010000 -0x0 - - -0 -0x08010000 -0x0 - - -0 -0x08010000 -0x0 - - -0 -0x08010000 -0x0 - - -1 -0x08010000 -0x70000 - - -0 -0x08010000 -0x0 - - -0 -0x08010000 -0x0 - - -0 -0x08010000 -0x0 - - -0 -0x08010000 -0x0 - - -0 -0x20000000 -0x20000 - - -0 -0x10000000 -0x20000 - - - - - -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 - - -DHSE_VALUE=8000000 --diag_suppress=188,177,550,940,66,546 --gnu --split_sections -DUSE_BOOTLOADER=1 -DUSE_USB_HOST_UART=1 -USE_HAL_DRIVER, STM32F407xx, SYSTEM_ARCH_RTOS=1 - -..\..\..\..\..\..\..\psdk_lib\include; ..\..\..\..\..\module_sample; ..\..\..\common\osal; ..\..\application; ..\..; ..\..\hal; ..\..\drivers\BSP; ..\..\drivers\CMSIS\Include; ..\..\drivers\Device\ST\STM32F4xx; ..\..\drivers\STM32F4xx_HAL_Driver\Inc; ..\..\drivers\USB_HOST\App; ..\..\drivers\USB_HOST\Target; ..\..\middlewares\ST\STM32_USB_Host_Library\Class\CDC\Inc; ..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc; ..\..\middlewares\Third_Party\FreeRTOS\Source\include; ..\..\middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F; ..\..\middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS - - - -0 -0 -0 -0 -0 -0 -0 -0 -0 - ---cpreproc --cpreproc_opts=-DUSE_HAL_DRIVER,-DSTM32F407xx,-DSYSTEM_ARCH_RTOS=1 - - - - - - -1 -0 -0 -0 -0 -0 -0 -0 - - - - - - - - - - - -api_sample - - -1 -cJSON.c -..\..\..\..\..\module_sample\utils\cJSON.c - - -1 -file_binary_array_list_en.c -..\..\..\..\..\module_sample\widget\file_binary_array_list_en.c - - -1 -file_binary_array_list_en.c -..\..\..\..\..\module_sample\widget_interaction_test\file_binary_array_list_en.c - - -1 -test_camera_manager.c -..\..\..\..\..\module_sample\camera_manager\test_camera_manager.c - - -1 -test_data_transmission.c -..\..\..\..\..\module_sample\data_transmission\test_data_transmission.c - - -1 -test_fc_subscription.c -..\..\..\..\..\module_sample\fc_subscription\test_fc_subscription.c - - -1 -test_flight_control.c -..\..\..\..\..\module_sample\flight_control\test_flight_control.c - - -1 -test_gimbal_manager.c -..\..\..\..\..\module_sample\gimbal_manager\test_gimbal_manager.c - - -1 -test_hms.c -..\..\..\..\..\module_sample\hms\test_hms.c - - -1 -test_payload_cam_emu_base.c -..\..\..\..\..\module_sample\camera_emu\test_payload_cam_emu_base.c - - -1 -test_payload_collaboration.c -..\..\..\..\..\module_sample\payload_collaboration\test_payload_collaboration.c - - -1 -test_payload_gimbal_emu.c -..\..\..\..\..\module_sample\gimbal_emu\test_payload_gimbal_emu.c - - -1 -test_payload_xport.c -..\..\..\..\..\module_sample\xport\test_payload_xport.c - - -1 -test_positioning.c -..\..\..\..\..\module_sample\positioning\test_positioning.c - - -1 -test_power_management.c -..\..\..\..\..\module_sample\power_management\test_power_management.c - - -1 -test_time_sync.c -..\..\..\..\..\module_sample\time_sync\test_time_sync.c - - -1 -test_upgrade.c -..\..\..\..\..\module_sample\upgrade\test_upgrade.c - - -1 -test_upgrade_common_file_transfer.c -..\..\..\..\..\module_sample\upgrade\test_upgrade_common_file_transfer.c - - -1 -test_upgrade_platform_opt.c -..\..\..\..\..\module_sample\upgrade\test_upgrade_platform_opt.c - - -1 -test_waypoint_v2.c -..\..\..\..\..\module_sample\waypoint_v2\test_waypoint_v2.c - - -1 -test_waypoint_v3.c -..\..\..\..\..\module_sample\waypoint_v3\test_waypoint_v3.c - - -1 -test_widget.c -..\..\..\..\..\module_sample\widget\test_widget.c - - -1 -test_widget_interaction.c -..\..\..\..\..\module_sample\widget_interaction_test\test_widget_interaction.c - - -1 -test_widget_speaker.c -..\..\..\..\..\module_sample\widget\test_widget_speaker.c - - -1 -util_buffer.c -..\..\..\..\..\module_sample\utils\util_buffer.c - - -1 -util_file.c -..\..\..\..\..\module_sample\utils\util_file.c - - -1 -util_md5.c -..\..\..\..\..\module_sample\utils\util_md5.c - - -1 -util_misc.c -..\..\..\..\..\module_sample\utils\util_misc.c - - -1 -util_time.c -..\..\..\..\..\module_sample\utils\util_time.c - - - - -application - - -1 -application.c -..\..\application\application.c - - -1 -hal_uart.c -..\..\hal\hal_uart.c - - -1 -main.c -..\..\application\main.c - - -1 -osal.c -..\..\..\common\osal\osal.c - - - - -bsp - - -1 -apply_high_power.c -..\..\drivers\BSP\apply_high_power.c - - -1 -dji_ringbuffer.c -..\..\drivers\BSP\dji_ringbuffer.c - - -1 -flash_if.c -..\..\drivers\BSP\flash_if.c - - -1 -freertos.c -..\..\drivers\BSP\freertos.c - - -1 -led.c -..\..\drivers\BSP\led.c - - -1 -pps.c -..\..\drivers\BSP\pps.c - - -2 -startup_stm32f407xx.s -..\..\drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f407xx.s - - -1 -stm32f4xx_hal_msp.c -..\..\drivers\BSP\stm32f4xx_hal_msp.c - - -1 -stm32f4xx_hal_timebase_tim.c -..\..\drivers\BSP\stm32f4xx_hal_timebase_tim.c - - -1 -stm32f4xx_it.c -..\..\drivers\BSP\stm32f4xx_it.c - - -1 -system_stm32f4xx.c -..\..\drivers\BSP\system_stm32f4xx.c - - -1 -uart.c -..\..\drivers\BSP\uart.c - - -1 -upgrade_platform_opt_stm32.c -..\..\drivers\BSP\upgrade_platform_opt_stm32.c - - -1 -usbh_cdc.c -..\..\middlewares\ST\STM32_USB_Host_Library\Class\CDC\Src\usbh_cdc.c - - -1 -usbh_core.c -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Src\usbh_core.c - - -1 -usbh_ctlreq.c -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Src\usbh_ctlreq.c - - -1 -usbh_ioreq.c -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Src\usbh_ioreq.c - - -1 -usbh_pipes.c -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Src\usbh_pipes.c - - - - -drv/stm32f4_hal_driver - - -1 -stm32f4xx_hal.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c - - -1 -stm32f4xx_hal_cortex.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c - - -1 -stm32f4xx_hal_dma.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c - - -1 -stm32f4xx_hal_dma_ex.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c - - -1 -stm32f4xx_hal_exti.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c - - -1 -stm32f4xx_hal_flash.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c - - -1 -stm32f4xx_hal_flash_ex.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c - - -1 -stm32f4xx_hal_flash_ramfunc.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c - - -1 -stm32f4xx_hal_gpio.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c - - -1 -stm32f4xx_hal_hcd.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_hcd.c - - -1 -stm32f4xx_hal_pwr.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c - - -1 -stm32f4xx_hal_pwr_ex.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c - - -1 -stm32f4xx_hal_rcc.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c - - -1 -stm32f4xx_hal_rcc_ex.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c - - -1 -stm32f4xx_hal_tim.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c - - -1 -stm32f4xx_hal_tim_ex.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c - - -1 -stm32f4xx_hal_uart.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c - - -1 -stm32f4xx_ll_usb.c -..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_usb.c - - - - -include - - -5 -application.h -..\..\application\application.h - - -5 -apply_high_power.h -..\..\drivers\BSP\apply_high_power.h - - -5 -atomic.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\atomic.h - - -5 -button.h -..\..\drivers\BSP\button.h - - -5 -cmsis_armcc.h -..\..\drivers\CMSIS\Include\cmsis_armcc.h - - -5 -cmsis_armclang.h -..\..\drivers\CMSIS\Include\cmsis_armclang.h - - -5 -cmsis_compiler.h -..\..\drivers\CMSIS\Include\cmsis_compiler.h - - -5 -cmsis_gcc.h -..\..\drivers\CMSIS\Include\cmsis_gcc.h - - -5 -cmsis_iccarm.h -..\..\drivers\CMSIS\Include\cmsis_iccarm.h - - -5 -cmsis_os.h -..\..\middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.h - - -5 -cmsis_version.h -..\..\drivers\CMSIS\Include\cmsis_version.h - - -5 -core_armv8mbl.h -..\..\drivers\CMSIS\Include\core_armv8mbl.h - - -5 -core_armv8mml.h -..\..\drivers\CMSIS\Include\core_armv8mml.h - - -5 -core_cm0.h -..\..\drivers\CMSIS\Include\core_cm0.h - - -5 -core_cm0plus.h -..\..\drivers\CMSIS\Include\core_cm0plus.h - - -5 -core_cm1.h -..\..\drivers\CMSIS\Include\core_cm1.h - - -5 -core_cm23.h -..\..\drivers\CMSIS\Include\core_cm23.h - - -5 -core_cm3.h -..\..\drivers\CMSIS\Include\core_cm3.h - - -5 -core_cm33.h -..\..\drivers\CMSIS\Include\core_cm33.h - - -5 -core_cm4.h -..\..\drivers\CMSIS\Include\core_cm4.h - - -5 -core_cm7.h -..\..\drivers\CMSIS\Include\core_cm7.h - - -5 -core_sc000.h -..\..\drivers\CMSIS\Include\core_sc000.h - - -5 -core_sc300.h -..\..\drivers\CMSIS\Include\core_sc300.h - - -5 -croutine.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\croutine.h - - -5 -deprecated_definitions.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\deprecated_definitions.h - - -5 -dji_aircraft_info.h -..\..\..\..\..\..\..\psdk_lib\include\dji_aircraft_info.h - - -5 -dji_camera_manager.h -..\..\..\..\..\..\..\psdk_lib\include\dji_camera_manager.h - - -5 -dji_core.h -..\..\..\..\..\..\..\psdk_lib\include\dji_core.h - - -5 -dji_error.h -..\..\..\..\..\..\..\psdk_lib\include\dji_error.h - - -5 -dji_fc_subscription.h -..\..\..\..\..\..\..\psdk_lib\include\dji_fc_subscription.h - - -5 -dji_flight_controller.h -..\..\..\..\..\..\..\psdk_lib\include\dji_flight_controller.h - - -5 -dji_gimbal.h -..\..\..\..\..\..\..\psdk_lib\include\dji_gimbal.h - - -5 -dji_gimbal_manager.h -..\..\..\..\..\..\..\psdk_lib\include\dji_gimbal_manager.h - - -5 -dji_high_speed_data_channel.h -..\..\..\..\..\..\..\psdk_lib\include\dji_high_speed_data_channel.h - - -5 -dji_hms.h -..\..\..\..\..\..\..\psdk_lib\include\dji_hms.h - - -5 -dji_hms_customization.h -..\..\..\..\..\..\..\psdk_lib\include\dji_hms_customization.h - - -5 -dji_hms_info_table.h -..\..\..\..\..\..\..\psdk_lib\include\dji_hms_info_table.h - - -5 -dji_hms_manager.h -..\..\..\..\..\..\..\psdk_lib\include\dji_hms_manager.h - - -5 -dji_liveview.h -..\..\..\..\..\..\..\psdk_lib\include\dji_liveview.h - - -5 -dji_logger.h -..\..\..\..\..\..\..\psdk_lib\include\dji_logger.h - - -5 -dji_low_speed_data_channel.h -..\..\..\..\..\..\..\psdk_lib\include\dji_low_speed_data_channel.h - - -5 -dji_mop_channel.h -..\..\..\..\..\..\..\psdk_lib\include\dji_mop_channel.h - - -5 -dji_payload_camera.h -..\..\..\..\..\..\..\psdk_lib\include\dji_payload_camera.h - - -5 -dji_perception.h -..\..\..\..\..\..\..\psdk_lib\include\dji_perception.h - - -5 -dji_platform.h -..\..\..\..\..\..\..\psdk_lib\include\dji_platform.h - - -5 -dji_positioning.h -..\..\..\..\..\..\..\psdk_lib\include\dji_positioning.h - - -5 -dji_power_management.h -..\..\..\..\..\..\..\psdk_lib\include\dji_power_management.h - - -5 -dji_ringbuffer.h -..\..\drivers\BSP\dji_ringbuffer.h - - -5 -dji_sdk_app_info.h -..\..\application\dji_sdk_app_info.h - - -5 -dji_sdk_config.h -..\..\application\dji_sdk_config.h - - -5 -dji_time_sync.h -..\..\..\..\..\..\..\psdk_lib\include\dji_time_sync.h - - -5 -dji_typedef.h -..\..\..\..\..\..\..\psdk_lib\include\dji_typedef.h - - -5 -dji_upgrade.h -..\..\..\..\..\..\..\psdk_lib\include\dji_upgrade.h - - -5 -dji_version.h -..\..\..\..\..\..\..\psdk_lib\include\dji_version.h - - -5 -dji_waypoint_v2.h -..\..\..\..\..\..\..\psdk_lib\include\dji_waypoint_v2.h - - -5 -dji_waypoint_v2_type.h -..\..\..\..\..\..\..\psdk_lib\include\dji_waypoint_v2_type.h - - -5 -dji_waypoint_v3.h -..\..\..\..\..\..\..\psdk_lib\include\dji_waypoint_v3.h - - -5 -dji_widget.h -..\..\..\..\..\..\..\psdk_lib\include\dji_widget.h - - -5 -dji_xport.h -..\..\..\..\..\..\..\psdk_lib\include\dji_xport.h - - -5 -event_groups.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\event_groups.h - - -5 -flash_if.h -..\..\drivers\BSP\flash_if.h - - -5 -FreeRTOS.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\FreeRTOS.h - - -5 -FreeRTOSConfig.h -..\..\application\FreeRTOSConfig.h - - -5 -hal_uart.h -..\..\hal\hal_uart.h - - -5 -led.h -..\..\drivers\BSP\led.h - - -5 -list.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\list.h - - -5 -message_buffer.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\message_buffer.h - - -5 -mpu_armv7.h -..\..\drivers\CMSIS\Include\mpu_armv7.h - - -5 -mpu_armv8.h -..\..\drivers\CMSIS\Include\mpu_armv8.h - - -5 -mpu_prototypes.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\mpu_prototypes.h - - -5 -mpu_wrappers.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h - - -5 -osal.h -..\..\..\common\osal\osal.h - - -5 -portable.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\portable.h - - -5 -portmacro.h -..\..\middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F\portmacro.h - - -5 -pps.h -..\..\drivers\BSP\pps.h - - -5 -projdefs.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\projdefs.h - - -5 -queue.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\queue.h - - -5 -semphr.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\semphr.h - - -5 -stack_macros.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\stack_macros.h - - -5 -StackMacros.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\StackMacros.h - - -5 -stm32f4xx_hal.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h - - -5 -stm32f4xx_hal_conf.h -..\..\drivers\BSP\stm32f4xx_hal_conf.h - - -5 -stm32f4xx_hal_cortex.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h - - -5 -stm32f4xx_hal_def.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h - - -5 -stm32f4xx_hal_dma.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h - - -5 -stm32f4xx_hal_dma_ex.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h - - -5 -stm32f4xx_hal_exti.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h - - -5 -stm32f4xx_hal_flash.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h - - -5 -stm32f4xx_hal_flash_ex.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h - - -5 -stm32f4xx_hal_flash_ramfunc.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h - - -5 -stm32f4xx_hal_gpio.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h - - -5 -stm32f4xx_hal_gpio_ex.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h - - -5 -stm32f4xx_hal_hcd.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_hcd.h - - -5 -stm32f4xx_hal_pwr.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h - - -5 -stm32f4xx_hal_pwr_ex.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h - - -5 -stm32f4xx_hal_rcc.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h - - -5 -stm32f4xx_hal_rcc_ex.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h - - -5 -stm32f4xx_hal_tim.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim.h - - -5 -stm32f4xx_hal_tim_ex.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim_ex.h - - -5 -stm32f4xx_hal_uart.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h - - -5 -stm32f4xx_it.h -..\..\drivers\BSP\stm32f4xx_it.h - - -5 -stm32f4xx_ll_usb.h -..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usb.h - - -5 -stream_buffer.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\stream_buffer.h - - -5 -sysmem.h -..\..\drivers\BSP\sysmem.h - - -5 -task.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\task.h - - -5 -timers.h -..\..\middlewares\Third_Party\FreeRTOS\Source\include\timers.h - - -5 -tz_context.h -..\..\drivers\CMSIS\Include\tz_context.h - - -5 -uart.h -..\..\drivers\BSP\uart.h - - -5 -upgrade_platform_opt_stm32.h -..\..\drivers\BSP\upgrade_platform_opt_stm32.h - - -5 -usb_host.h -..\..\drivers\USB_HOST\App\usb_host.h - - -5 -usbh_cdc.h -..\..\middlewares\ST\STM32_USB_Host_Library\Class\CDC\Inc\usbh_cdc.h - - -5 -usbh_cdc.h -..\..\middlewares\ST\STM32_USB_Host_Library\Class\CDC\Inc\usbh_cdc.h - - -5 -usbh_conf.h -..\..\drivers\USB_HOST\Target\usbh_conf.h - - -5 -usbh_core.h -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_core.h - - -5 -usbh_core.h -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_core.h - - -5 -usbh_ctlreq.h -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_ctlreq.h - - -5 -usbh_ctlreq.h -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_ctlreq.h - - -5 -usbh_def.h -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_def.h - - -5 -usbh_def.h -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_def.h - - -5 -usbh_ioreq.h -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_ioreq.h - - -5 -usbh_ioreq.h -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_ioreq.h - - -5 -usbh_pipes.h -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_pipes.h - - -5 -usbh_pipes.h -..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_pipes.h - - - - -lib - - -4 -libpayload.lib -..\..\..\..\..\..\..\psdk_lib\lib\armcc_cortex-m4\libpayload.lib - - - - -mid/freertos/port - - -1 -cmsis_os.c -..\..\middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c - - -1 -heap_4.c -..\..\middlewares\Third_Party\FreeRTOS\Source\portable\MemMang\heap_4.c - - -1 -port.c -..\..\middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F\port.c - - - - -mid/freertos/src - - -1 -croutine.c -..\..\middlewares\Third_Party\FreeRTOS\Source\croutine.c - - -1 -event_groups.c -..\..\middlewares\Third_Party\FreeRTOS\Source\event_groups.c - - -1 -list.c -..\..\middlewares\Third_Party\FreeRTOS\Source\list.c - - -1 -queue.c -..\..\middlewares\Third_Party\FreeRTOS\Source\queue.c - - -1 -tasks.c -..\..\middlewares\Third_Party\FreeRTOS\Source\tasks.c - - -1 -timers.c -..\..\middlewares\Third_Party\FreeRTOS\Source\timers.c - - - - -usb_host - - -1 -usb_host.c -..\..\drivers\USB_HOST\App\usb_host.c - - -1 -usbh_conf.c -..\..\drivers\USB_HOST\Target\usbh_conf.c - - - - - - -
+ + +2.1 +
### uVision Project, (C) Keil Software
+ + +mdk_app +0x4 +ARM-ADS + + +STM32F407VGTx +STMicroelectronics +IROM(0x08000000,0x100000) IRAM(0x20000000,0x20000) IRAM2(0x10000000,0x10000) CPUTYPE("Cortex-M4") FPU2 CLOCK(8000000) ELITTLE + + +UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F407VGTx$CMSIS\Flash\STM32F4xx_1024.FLM)) + +$$Device:STM32F407VGTx$Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h + + + + + + + + + +$$Device:STM32F407VGTx$CMSIS\SVD\STM32F40x.svd +0 +0 + + + + + + +0 +0 +0 +0 +1 + +.\Objects\ +mdk_app +1 +0 +0 +0 +0 +.\build +1 +0 +0 + +0 +0 +C:\Keil_v5\ARM\ARMCC\Bin\fromelf.exe .\Objects\mdk_app.axf --bin --output .\dji_sdk_demo_rtos.bin + +0 +0 +0 +0 + + +0 +0 +C:\Keil_v5\ARM\ARMCC\Bin\fromelf.exe .\Objects\mdk_app.axf --bin --output .\dji_sdk_demo_rtos.bin + +0 +0 +0 +0 + + +0 +0 +C:\Keil_v5\ARM\ARMCC\Bin\fromelf.exe .\Objects\mdk_app.axf --bin --output .\dji_sdk_demo_rtos.bin + +0 +0 + +0 + +Keil.STM32F4xx_DFP.2.9.0 + + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 + + +1 + + +SARMCM3.DLL + +DCM.DLL +-pCM4 +SARMCM3.DLL +-MPU +TCM.DLL +-pCM4 + + + +1 +0 +0 +0 +16 + + +0 +1 +1 +1 +1 +1 +1 +1 +0 +1 + + +1 +1 +1 +1 +1 +1 +0 +1 +0 +1 + +0 +12 + + + + + + + + + + + + + +STLink\ST-LINKIII-KEIL_SWO.dll + + + + +1 +0 +0 +1 +1 +4100 + +1 +STLink\ST-LINKIII-KEIL_SWO.dll + + + + + +0 + + + +0 +1 +1 +1 +1 +1 +1 +1 +0 +1 +1 +0 +1 +1 +0 +0 +1 +1 +1 +1 +1 +1 +1 +1 +1 +0 +0 +"Cortex-M3" + +0 +0 +0 +1 +1 +0 +0 +0 +1 +0 +8 +1 +0 +0 +3 +3 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +1 +0 + + +0 +0x08010000 +0x0 + + +0 +0x08010000 +0x0 + + +0 +0x08010000 +0x0 + + +0 +0x08010000 +0x0 + + +0 +0x08010000 +0x0 + + +0 +0x08010000 +0x0 + + +0 +0x20000000 +0x20000 + + +1 +0x08010000 +0x70000 + + +0 +0x08010000 +0x0 + + +0 +0x08010000 +0x0 + + +0 +0x08010000 +0x0 + + +0 +0x08010000 +0x0 + + +1 +0x08010000 +0x70000 + + +0 +0x08010000 +0x0 + + +0 +0x08010000 +0x0 + + +0 +0x08010000 +0x0 + + +0 +0x08010000 +0x0 + + +0 +0x20000000 +0x20000 + + +0 +0x10000000 +0x20000 + + + + + +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 + + -DHSE_VALUE=8000000 --diag_suppress=188,177,550,940,66,546 --gnu --split_sections -DUSE_BOOTLOADER=1 -DUSE_USB_HOST_UART=1 +USE_HAL_DRIVER, STM32F407xx, SYSTEM_ARCH_RTOS=1 + +..\..\..\..\..\..\..\psdk_lib\include; ..\..\..\..\..\module_sample; ..\..\..\common\osal; ..\..\application; ..\..; ..\..\hal; ..\..\drivers\BSP; ..\..\drivers\CMSIS\Include; ..\..\drivers\Device\ST\STM32F4xx; ..\..\drivers\STM32F4xx_HAL_Driver\Inc; ..\..\drivers\USB_HOST\App; ..\..\drivers\USB_HOST\Target; ..\..\middlewares\ST\STM32_USB_Host_Library\Class\CDC\Inc; ..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc; ..\..\middlewares\Third_Party\FreeRTOS\Source\include; ..\..\middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F; ..\..\middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS + + + +0 +0 +0 +0 +0 +0 +0 +0 +0 + +--cpreproc --cpreproc_opts=-DUSE_HAL_DRIVER,-DSTM32F407xx,-DSYSTEM_ARCH_RTOS=1 + + + + + + +1 +0 +0 +0 +0 +0 +0 +0 + + + + + + + + + + + +api_sample + + +1 +cJSON.c +..\..\..\..\..\module_sample\utils\cJSON.c + + +1 +file_binary_array_list_en.c +..\..\..\..\..\module_sample\widget\file_binary_array_list_en.c + + +1 +file_binary_array_list_en.c +..\..\..\..\..\module_sample\widget_interaction_test\file_binary_array_list_en.c + + +1 +test_camera_manager.c +..\..\..\..\..\module_sample\camera_manager\test_camera_manager.c + + +1 +test_data_transmission.c +..\..\..\..\..\module_sample\data_transmission\test_data_transmission.c + + +1 +test_fc_subscription.c +..\..\..\..\..\module_sample\fc_subscription\test_fc_subscription.c + + +1 +test_flight_control.c +..\..\..\..\..\module_sample\flight_control\test_flight_control.c + + +1 +test_gimbal_manager.c +..\..\..\..\..\module_sample\gimbal_manager\test_gimbal_manager.c + + +1 +test_hms.c +..\..\..\..\..\module_sample\hms\test_hms.c + + +1 +test_payload_cam_emu_base.c +..\..\..\..\..\module_sample\camera_emu\test_payload_cam_emu_base.c + + +1 +test_payload_collaboration.c +..\..\..\..\..\module_sample\payload_collaboration\test_payload_collaboration.c + + +1 +test_payload_gimbal_emu.c +..\..\..\..\..\module_sample\gimbal_emu\test_payload_gimbal_emu.c + + +1 +test_payload_xport.c +..\..\..\..\..\module_sample\xport\test_payload_xport.c + + +1 +test_positioning.c +..\..\..\..\..\module_sample\positioning\test_positioning.c + + +1 +test_power_management.c +..\..\..\..\..\module_sample\power_management\test_power_management.c + + +1 +test_time_sync.c +..\..\..\..\..\module_sample\time_sync\test_time_sync.c + + +1 +test_upgrade.c +..\..\..\..\..\module_sample\upgrade\test_upgrade.c + + +1 +test_upgrade_common_file_transfer.c +..\..\..\..\..\module_sample\upgrade\test_upgrade_common_file_transfer.c + + +1 +test_upgrade_platform_opt.c +..\..\..\..\..\module_sample\upgrade\test_upgrade_platform_opt.c + + +1 +test_waypoint_v2.c +..\..\..\..\..\module_sample\waypoint_v2\test_waypoint_v2.c + + +1 +test_waypoint_v3.c +..\..\..\..\..\module_sample\waypoint_v3\test_waypoint_v3.c + + +1 +test_widget.c +..\..\..\..\..\module_sample\widget\test_widget.c + + +1 +test_widget_interaction.c +..\..\..\..\..\module_sample\widget_interaction_test\test_widget_interaction.c + + +1 +test_widget_speaker.c +..\..\..\..\..\module_sample\widget\test_widget_speaker.c + + +1 +util_buffer.c +..\..\..\..\..\module_sample\utils\util_buffer.c + + +1 +util_file.c +..\..\..\..\..\module_sample\utils\util_file.c + + +1 +util_md5.c +..\..\..\..\..\module_sample\utils\util_md5.c + + +1 +util_misc.c +..\..\..\..\..\module_sample\utils\util_misc.c + + +1 +util_time.c +..\..\..\..\..\module_sample\utils\util_time.c + + + + +application + + +1 +application.c +..\..\application\application.c + + +1 +hal_uart.c +..\..\hal\hal_uart.c + + +1 +main.c +..\..\application\main.c + + +1 +osal.c +..\..\..\common\osal\osal.c + + + + +bsp + + +1 +apply_high_power.c +..\..\drivers\BSP\apply_high_power.c + + +1 +dji_ringbuffer.c +..\..\drivers\BSP\dji_ringbuffer.c + + +1 +flash_if.c +..\..\drivers\BSP\flash_if.c + + +1 +freertos.c +..\..\drivers\BSP\freertos.c + + +1 +led.c +..\..\drivers\BSP\led.c + + +1 +pps.c +..\..\drivers\BSP\pps.c + + +2 +startup_stm32f407xx.s +..\..\drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f407xx.s + + +1 +stm32f4xx_hal_msp.c +..\..\drivers\BSP\stm32f4xx_hal_msp.c + + +1 +stm32f4xx_hal_timebase_tim.c +..\..\drivers\BSP\stm32f4xx_hal_timebase_tim.c + + +1 +stm32f4xx_it.c +..\..\drivers\BSP\stm32f4xx_it.c + + +1 +system_stm32f4xx.c +..\..\drivers\BSP\system_stm32f4xx.c + + +1 +uart.c +..\..\drivers\BSP\uart.c + + +1 +upgrade_platform_opt_stm32.c +..\..\drivers\BSP\upgrade_platform_opt_stm32.c + + +1 +usbh_cdc.c +..\..\middlewares\ST\STM32_USB_Host_Library\Class\CDC\Src\usbh_cdc.c + + +1 +usbh_core.c +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Src\usbh_core.c + + +1 +usbh_ctlreq.c +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Src\usbh_ctlreq.c + + +1 +usbh_ioreq.c +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Src\usbh_ioreq.c + + +1 +usbh_pipes.c +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Src\usbh_pipes.c + + + + +drv/stm32f4_hal_driver + + +1 +stm32f4xx_hal.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c + + +1 +stm32f4xx_hal_cortex.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c + + +1 +stm32f4xx_hal_dma.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c + + +1 +stm32f4xx_hal_dma_ex.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c + + +1 +stm32f4xx_hal_exti.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c + + +1 +stm32f4xx_hal_flash.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c + + +1 +stm32f4xx_hal_flash_ex.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c + + +1 +stm32f4xx_hal_flash_ramfunc.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c + + +1 +stm32f4xx_hal_gpio.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c + + +1 +stm32f4xx_hal_hcd.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_hcd.c + + +1 +stm32f4xx_hal_pwr.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c + + +1 +stm32f4xx_hal_pwr_ex.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c + + +1 +stm32f4xx_hal_rcc.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c + + +1 +stm32f4xx_hal_rcc_ex.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c + + +1 +stm32f4xx_hal_tim.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c + + +1 +stm32f4xx_hal_tim_ex.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c + + +1 +stm32f4xx_hal_uart.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c + + +1 +stm32f4xx_ll_usb.c +..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_usb.c + + + + +include + + +5 +application.h +..\..\application\application.h + + +5 +apply_high_power.h +..\..\drivers\BSP\apply_high_power.h + + +5 +atomic.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\atomic.h + + +5 +button.h +..\..\drivers\BSP\button.h + + +5 +cmsis_armcc.h +..\..\drivers\CMSIS\Include\cmsis_armcc.h + + +5 +cmsis_armclang.h +..\..\drivers\CMSIS\Include\cmsis_armclang.h + + +5 +cmsis_compiler.h +..\..\drivers\CMSIS\Include\cmsis_compiler.h + + +5 +cmsis_gcc.h +..\..\drivers\CMSIS\Include\cmsis_gcc.h + + +5 +cmsis_iccarm.h +..\..\drivers\CMSIS\Include\cmsis_iccarm.h + + +5 +cmsis_os.h +..\..\middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.h + + +5 +cmsis_version.h +..\..\drivers\CMSIS\Include\cmsis_version.h + + +5 +core_armv8mbl.h +..\..\drivers\CMSIS\Include\core_armv8mbl.h + + +5 +core_armv8mml.h +..\..\drivers\CMSIS\Include\core_armv8mml.h + + +5 +core_cm0.h +..\..\drivers\CMSIS\Include\core_cm0.h + + +5 +core_cm0plus.h +..\..\drivers\CMSIS\Include\core_cm0plus.h + + +5 +core_cm1.h +..\..\drivers\CMSIS\Include\core_cm1.h + + +5 +core_cm23.h +..\..\drivers\CMSIS\Include\core_cm23.h + + +5 +core_cm3.h +..\..\drivers\CMSIS\Include\core_cm3.h + + +5 +core_cm33.h +..\..\drivers\CMSIS\Include\core_cm33.h + + +5 +core_cm4.h +..\..\drivers\CMSIS\Include\core_cm4.h + + +5 +core_cm7.h +..\..\drivers\CMSIS\Include\core_cm7.h + + +5 +core_sc000.h +..\..\drivers\CMSIS\Include\core_sc000.h + + +5 +core_sc300.h +..\..\drivers\CMSIS\Include\core_sc300.h + + +5 +croutine.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\croutine.h + + +5 +deprecated_definitions.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\deprecated_definitions.h + + +5 +dji_aircraft_info.h +..\..\..\..\..\..\..\psdk_lib\include\dji_aircraft_info.h + + +5 +dji_camera_manager.h +..\..\..\..\..\..\..\psdk_lib\include\dji_camera_manager.h + + +5 +dji_core.h +..\..\..\..\..\..\..\psdk_lib\include\dji_core.h + + +5 +dji_error.h +..\..\..\..\..\..\..\psdk_lib\include\dji_error.h + + +5 +dji_fc_subscription.h +..\..\..\..\..\..\..\psdk_lib\include\dji_fc_subscription.h + + +5 +dji_flight_controller.h +..\..\..\..\..\..\..\psdk_lib\include\dji_flight_controller.h + + +5 +dji_gimbal.h +..\..\..\..\..\..\..\psdk_lib\include\dji_gimbal.h + + +5 +dji_gimbal_manager.h +..\..\..\..\..\..\..\psdk_lib\include\dji_gimbal_manager.h + + +5 +dji_high_speed_data_channel.h +..\..\..\..\..\..\..\psdk_lib\include\dji_high_speed_data_channel.h + + +5 +dji_hms.h +..\..\..\..\..\..\..\psdk_lib\include\dji_hms.h + + +5 +dji_hms_customization.h +..\..\..\..\..\..\..\psdk_lib\include\dji_hms_customization.h + + +5 +dji_hms_info_table.h +..\..\..\..\..\..\..\psdk_lib\include\dji_hms_info_table.h + + +5 +dji_hms_manager.h +..\..\..\..\..\..\..\psdk_lib\include\dji_hms_manager.h + + +5 +dji_liveview.h +..\..\..\..\..\..\..\psdk_lib\include\dji_liveview.h + + +5 +dji_logger.h +..\..\..\..\..\..\..\psdk_lib\include\dji_logger.h + + +5 +dji_low_speed_data_channel.h +..\..\..\..\..\..\..\psdk_lib\include\dji_low_speed_data_channel.h + + +5 +dji_mop_channel.h +..\..\..\..\..\..\..\psdk_lib\include\dji_mop_channel.h + + +5 +dji_payload_camera.h +..\..\..\..\..\..\..\psdk_lib\include\dji_payload_camera.h + + +5 +dji_perception.h +..\..\..\..\..\..\..\psdk_lib\include\dji_perception.h + + +5 +dji_platform.h +..\..\..\..\..\..\..\psdk_lib\include\dji_platform.h + + +5 +dji_positioning.h +..\..\..\..\..\..\..\psdk_lib\include\dji_positioning.h + + +5 +dji_power_management.h +..\..\..\..\..\..\..\psdk_lib\include\dji_power_management.h + + +5 +dji_ringbuffer.h +..\..\drivers\BSP\dji_ringbuffer.h + + +5 +dji_sdk_app_info.h +..\..\application\dji_sdk_app_info.h + + +5 +dji_sdk_config.h +..\..\application\dji_sdk_config.h + + +5 +dji_time_sync.h +..\..\..\..\..\..\..\psdk_lib\include\dji_time_sync.h + + +5 +dji_typedef.h +..\..\..\..\..\..\..\psdk_lib\include\dji_typedef.h + + +5 +dji_upgrade.h +..\..\..\..\..\..\..\psdk_lib\include\dji_upgrade.h + + +5 +dji_version.h +..\..\..\..\..\..\..\psdk_lib\include\dji_version.h + + +5 +dji_waypoint_v2.h +..\..\..\..\..\..\..\psdk_lib\include\dji_waypoint_v2.h + + +5 +dji_waypoint_v2_type.h +..\..\..\..\..\..\..\psdk_lib\include\dji_waypoint_v2_type.h + + +5 +dji_waypoint_v3.h +..\..\..\..\..\..\..\psdk_lib\include\dji_waypoint_v3.h + + +5 +dji_widget.h +..\..\..\..\..\..\..\psdk_lib\include\dji_widget.h + + +5 +dji_xport.h +..\..\..\..\..\..\..\psdk_lib\include\dji_xport.h + + +5 +event_groups.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\event_groups.h + + +5 +flash_if.h +..\..\drivers\BSP\flash_if.h + + +5 +FreeRTOS.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\FreeRTOS.h + + +5 +FreeRTOSConfig.h +..\..\application\FreeRTOSConfig.h + + +5 +hal_uart.h +..\..\hal\hal_uart.h + + +5 +led.h +..\..\drivers\BSP\led.h + + +5 +list.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\list.h + + +5 +message_buffer.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\message_buffer.h + + +5 +mpu_armv7.h +..\..\drivers\CMSIS\Include\mpu_armv7.h + + +5 +mpu_armv8.h +..\..\drivers\CMSIS\Include\mpu_armv8.h + + +5 +mpu_prototypes.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\mpu_prototypes.h + + +5 +mpu_wrappers.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h + + +5 +osal.h +..\..\..\common\osal\osal.h + + +5 +portable.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\portable.h + + +5 +portmacro.h +..\..\middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F\portmacro.h + + +5 +pps.h +..\..\drivers\BSP\pps.h + + +5 +projdefs.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\projdefs.h + + +5 +queue.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\queue.h + + +5 +semphr.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\semphr.h + + +5 +stack_macros.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\stack_macros.h + + +5 +StackMacros.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\StackMacros.h + + +5 +stm32f4xx_hal.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h + + +5 +stm32f4xx_hal_conf.h +..\..\drivers\BSP\stm32f4xx_hal_conf.h + + +5 +stm32f4xx_hal_cortex.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h + + +5 +stm32f4xx_hal_def.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h + + +5 +stm32f4xx_hal_dma.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h + + +5 +stm32f4xx_hal_dma_ex.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h + + +5 +stm32f4xx_hal_exti.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h + + +5 +stm32f4xx_hal_flash.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h + + +5 +stm32f4xx_hal_flash_ex.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h + + +5 +stm32f4xx_hal_flash_ramfunc.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h + + +5 +stm32f4xx_hal_gpio.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h + + +5 +stm32f4xx_hal_gpio_ex.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h + + +5 +stm32f4xx_hal_hcd.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_hcd.h + + +5 +stm32f4xx_hal_pwr.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h + + +5 +stm32f4xx_hal_pwr_ex.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h + + +5 +stm32f4xx_hal_rcc.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h + + +5 +stm32f4xx_hal_rcc_ex.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h + + +5 +stm32f4xx_hal_tim.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim.h + + +5 +stm32f4xx_hal_tim_ex.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim_ex.h + + +5 +stm32f4xx_hal_uart.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h + + +5 +stm32f4xx_it.h +..\..\drivers\BSP\stm32f4xx_it.h + + +5 +stm32f4xx_ll_usb.h +..\..\drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usb.h + + +5 +stream_buffer.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\stream_buffer.h + + +5 +sysmem.h +..\..\drivers\BSP\sysmem.h + + +5 +task.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\task.h + + +5 +timers.h +..\..\middlewares\Third_Party\FreeRTOS\Source\include\timers.h + + +5 +tz_context.h +..\..\drivers\CMSIS\Include\tz_context.h + + +5 +uart.h +..\..\drivers\BSP\uart.h + + +5 +upgrade_platform_opt_stm32.h +..\..\drivers\BSP\upgrade_platform_opt_stm32.h + + +5 +usb_host.h +..\..\drivers\USB_HOST\App\usb_host.h + + +5 +usbh_cdc.h +..\..\middlewares\ST\STM32_USB_Host_Library\Class\CDC\Inc\usbh_cdc.h + + +5 +usbh_cdc.h +..\..\middlewares\ST\STM32_USB_Host_Library\Class\CDC\Inc\usbh_cdc.h + + +5 +usbh_conf.h +..\..\drivers\USB_HOST\Target\usbh_conf.h + + +5 +usbh_core.h +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_core.h + + +5 +usbh_core.h +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_core.h + + +5 +usbh_ctlreq.h +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_ctlreq.h + + +5 +usbh_ctlreq.h +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_ctlreq.h + + +5 +usbh_def.h +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_def.h + + +5 +usbh_def.h +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_def.h + + +5 +usbh_ioreq.h +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_ioreq.h + + +5 +usbh_ioreq.h +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_ioreq.h + + +5 +usbh_pipes.h +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_pipes.h + + +5 +usbh_pipes.h +..\..\middlewares\ST\STM32_USB_Host_Library\Core\Inc\usbh_pipes.h + + + + +lib + + +4 +libpayload.lib +..\..\..\..\..\..\..\psdk_lib\lib\armcc_cortex-m4\libpayload.lib + + + + +mid/freertos/port + + +1 +cmsis_os.c +..\..\middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c + + +1 +heap_4.c +..\..\middlewares\Third_Party\FreeRTOS\Source\portable\MemMang\heap_4.c + + +1 +port.c +..\..\middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F\port.c + + + + +mid/freertos/src + + +1 +croutine.c +..\..\middlewares\Third_Party\FreeRTOS\Source\croutine.c + + +1 +event_groups.c +..\..\middlewares\Third_Party\FreeRTOS\Source\event_groups.c + + +1 +list.c +..\..\middlewares\Third_Party\FreeRTOS\Source\list.c + + +1 +queue.c +..\..\middlewares\Third_Party\FreeRTOS\Source\queue.c + + +1 +tasks.c +..\..\middlewares\Third_Party\FreeRTOS\Source\tasks.c + + +1 +timers.c +..\..\middlewares\Third_Party\FreeRTOS\Source\timers.c + + + + +usb_host + + +1 +usb_host.c +..\..\drivers\USB_HOST\App\usb_host.c + + +1 +usbh_conf.c +..\..\drivers\USB_HOST\Target\usbh_conf.c + + + + + + +