diff --git a/README.md b/README.md index 614d3ab..4b65f43 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # DJI Payload SDK (PSDK) -![](https://img.shields.io/badge/version-V3.11.0-orange.svg) -![](https://img.shields.io/badge/platform-linux_|_rtos-purple.svg) -![](https://img.shields.io/badge/license-MIT-pink.svg) +![](https://img.shields.io/badge/version-V3.11.1-yellow.svg) +![](https://img.shields.io/badge/platform-linux_|_rtos-pink.svg) +![](https://img.shields.io/badge/license-MIT-red.svg) ## What is the DJI Payload SDK? @@ -23,10 +23,12 @@ to get the latest version information. ## Latest Release -The latest release version of PSDK is 3.11.0. This version of Payload SDK mainly add some new features support and fixed some +The latest release version of PSDK is 3.11.1. This version of Payload SDK mainly add some new features support and fixed some bugs. Please refer to the release notes for detailed changes list. -* Supports Matrice 4TD/4D models +* Fixed the issue where the Matrice 4D or Matrice 4TD E-Port Lite interface was not recognized on FlightHub 2. +* Fixed the crash issue when using the DjiCore_Delnit interface. +* Fixed the occasional crash issue when transmitting video streams through the USB bulk channel on Matrice 350 RTK. ## License diff --git a/psdk_lib/include/dji_version.h b/psdk_lib/include/dji_version.h index a34a229..92dd16e 100644 --- a/psdk_lib/include/dji_version.h +++ b/psdk_lib/include/dji_version.h @@ -35,9 +35,9 @@ 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 11 /*!< DJI SDK minor version num, when add functionality in a backwards compatible manner changes. Range from 0 to 99. */ -#define DJI_VERSION_MODIFY 0 /*!< DJI SDK modify version num, when have backwards compatible bug fixes changes. Range from 0 to 99. */ +#define DJI_VERSION_MODIFY 1 /*!< 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 2206 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */ +#define DJI_VERSION_BUILD 2212 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */ /* Exported types ------------------------------------------------------------*/ diff --git a/psdk_lib/lib/aarch64-linux-gnu-gcc/libpayloadsdk.a b/psdk_lib/lib/aarch64-linux-gnu-gcc/libpayloadsdk.a index 3b8b5c6..9730048 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-linux-gnueabi-gcc/libpayloadsdk.a b/psdk_lib/lib/arm-linux-gnueabi-gcc/libpayloadsdk.a index cfabf08..de8027f 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 2485e34..12075f8 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/armcc_cortex-m4/libpayload.lib b/psdk_lib/lib/armcc_cortex-m4/libpayload.lib index b3d923c..969d9c4 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 cac8604..b28c231 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/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 30259b8..135a689 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 @@ -47,6 +47,9 @@ static T_DjiReturnCode DjiTest_RunSystemCmd(char *systemCmdStr); T_DjiReturnCode DjiUpgradePlatformLinux_RebootSystem(void) { // attention: you need su permission to reboot system + + USER_LOG_INFO("reboot -h now"); + return DjiTest_RunSystemCmd("reboot -h now"); } @@ -56,6 +59,8 @@ T_DjiReturnCode DjiUpgradePlatformLinux_CleanUpgradeProgramFileStoreArea(void) snprintf(cmdBuffer, DJI_TEST_CMD_CALL_MAX_LEN, "rm -rf %s*", DJI_TEST_UPGRADE_FILE_DIR); + USER_LOG_INFO("%s", cmdBuffer); + return DjiTest_RunSystemCmd(cmdBuffer); } @@ -66,6 +71,9 @@ T_DjiReturnCode DjiUpgradePlatformLinux_ReplaceOldProgram(void) snprintf(cmdBuffer, DJI_TEST_CMD_CALL_MAX_LEN, "cp -f %s*_V*.*.*.bin %s", DJI_TEST_UPGRADE_FILE_DIR, DJI_TEST_UPGRADE_OLD_FIRMWARE_PATH); + + USER_LOG_INFO("%s", cmdBuffer); + returnCode = DjiTest_RunSystemCmd(cmdBuffer); if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) { USER_LOG_ERROR("Replace old program file error"); @@ -74,6 +82,8 @@ T_DjiReturnCode DjiUpgradePlatformLinux_ReplaceOldProgram(void) snprintf(cmdBuffer, DJI_TEST_CMD_CALL_MAX_LEN, "chmod 777 %s", DJI_TEST_UPGRADE_OLD_FIRMWARE_PATH); + USER_LOG_INFO("%s", cmdBuffer); + return DjiTest_RunSystemCmd(cmdBuffer); } @@ -89,6 +99,8 @@ T_DjiReturnCode DjiUpgradePlatformLinux_SetUpgradeRebootState(const T_DjiUpgrade return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR; } + USER_LOG_INFO("set upgrade reboot state to %s, state %d", DJI_REBOOT_STATE_FILE_NAME, upgradeEndInfo->upgradeEndState); + res = fwrite((uint8_t *) upgradeEndInfo, 1, sizeof(T_DjiUpgradeEndInfo), rebootStateFile); if (res != sizeof(T_DjiUpgradeEndInfo)) { USER_LOG_ERROR("Write data len is not equal"); @@ -111,6 +123,7 @@ T_DjiReturnCode DjiUpgradePlatformLinux_GetUpgradeRebootState(bool *isUpgradeReb rebootStateFile = fopen(DJI_REBOOT_STATE_FILE_NAME, "r"); if (rebootStateFile == NULL) { *isUpgradeReboot = false; + USER_LOG_INFO("isUpgradeReboot false"); return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS; } @@ -120,8 +133,12 @@ T_DjiReturnCode DjiUpgradePlatformLinux_GetUpgradeRebootState(bool *isUpgradeReb *isUpgradeReboot = false; goto out; } + + USER_LOG_INFO("isUpgradeReboot true"); *isUpgradeReboot = true; + USER_LOG_INFO("upgrade end state is %d", upgradeEndInfo->upgradeEndState); + out: fclose(rebootStateFile); return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS; @@ -129,12 +146,23 @@ out: T_DjiReturnCode DjiUpgradePlatformLinux_CleanUpgradeRebootState(void) { + USER_LOG_INFO("rm -f %s", DJI_REBOOT_STATE_FILE_NAME); + return DjiTest_RunSystemCmd("rm -f "DJI_REBOOT_STATE_FILE_NAME); } T_DjiReturnCode DjiUpgradePlatformLinux_CreateUpgradeProgramFile(const T_DjiUpgradeFileInfo *fileInfo) { char filePath[DJI_FILE_PATH_SIZE_MAX]; + char cmdBuffer[DJI_TEST_CMD_CALL_MAX_LEN]; + + snprintf(cmdBuffer, DJI_TEST_CMD_CALL_MAX_LEN, "mkdir -p %s", DJI_TEST_UPGRADE_FILE_DIR); + + USER_LOG_INFO("%s", cmdBuffer); + + DjiTest_RunSystemCmd(cmdBuffer); + + USER_LOG_INFO("create %s%s", DJI_TEST_UPGRADE_FILE_DIR, fileInfo->fileName); s_upgradeProgramFile = NULL; snprintf(filePath, DJI_FILE_PATH_SIZE_MAX, "%s%s", DJI_TEST_UPGRADE_FILE_DIR, fileInfo->fileName); @@ -199,6 +227,8 @@ T_DjiReturnCode DjiUpgradePlatformLinux_CloseUpgradeProgramFile(void) return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER; } + USER_LOG_INFO("close upgrade program file"); + fclose(s_upgradeProgramFile); s_upgradeProgramFile = NULL;