NEW: release DJI Payload-SDK version 3.13.1
Signed-off-by: DJI <dev@dji.com>
This commit is contained in:
26
README.md
26
README.md
@ -1,8 +1,8 @@
|
||||
# DJI Payload SDK (PSDK)
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## What is the DJI Payload SDK?
|
||||
|
||||
@ -23,20 +23,20 @@ to get the latest version information.
|
||||
|
||||
## Latest Release
|
||||
|
||||
The latest release version of PSDK is 3.13.0. This version of Payload SDK mainly add some new features support and fixed some
|
||||
The latest release version of PSDK is 3.13.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.
|
||||
|
||||
### Manifold 3 Support
|
||||
- **Supports M4D series drone dock versions (DJI Pilot app temporarily unsupported)**
|
||||
- **Enables PSDK advanced features for M4D**
|
||||
- **Enables MOP function for M400**
|
||||
- **Supports installation/uninstallation of Manifold 3 apps via DJI FlightHub**
|
||||
- **Enables rendering of Manifold 3 AI app recognition results in DJI FlightHub**
|
||||
### Released Feature List
|
||||
|
||||
### Fixes and Optimizations
|
||||
- **Fixed M300 PSDK low-speed data transmission failure from payload port to onboard port**
|
||||
- **Fixed M350 drone's inability to acquire real-time streams from Zenmuse P1 and Zenmuse L1**
|
||||
* Supports Mavic 3TA model
|
||||
|
||||
### Bug Fixes and Performance Improvements
|
||||
* Fixed an issue where the `DjiCore_Init` API failed on the Matrice 300.
|
||||
* Fixed an issue where quaternion data subscription failed for the Matrice 350 RTK.
|
||||
* Fixed occasional failures in the `DjiCore_Deinit` API.
|
||||
* Fixed occasional crashes caused by custom HMS modules.
|
||||
* Changed the default to not support RC-less flight. and exposed the `DjiFlightController_SetRCLostActionEnableStatus` API to disable or enable actions when the RC is lost.
|
||||
Note If you need to use RC-less flight, you must call this interface to disable RC-lost actions after `DjiFlightController_Init`. See the interface header file documentation for details.
|
||||
## License
|
||||
|
||||
Payload SDK codebase is MIT-licensed. Please refer to the LICENSE file for detailed information.
|
||||
|
||||
@ -298,6 +298,9 @@ typedef struct {
|
||||
/* Exported functions --------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Initialise flight controller module
|
||||
* @note If flight without RC is required, call DjiFlightController_SetRCLostActionEnableStatus(DJI_FLIGHT_CONTROLLER_DISABLE_RC_LOST_ACTION) after initialization.
|
||||
* Otherwise, when the remote controller goes offline, the configured RC-lost action
|
||||
* (e.g., return-to-home, auto-landing, hover, etc.) will be executed.
|
||||
* @param ridInfo: Must report the correct RID information before using PSDK to control the aircraft.
|
||||
* @return Execution result.
|
||||
*/
|
||||
@ -647,6 +650,10 @@ T_DjiReturnCode DjiFlightController_GetGeneralInfo(T_DjiFlightControllerGeneralI
|
||||
* if the command is disable, the aircraft will execute RC lost action when RC is lost but PSDK is running
|
||||
* the aircraft will execute RC lost action when RC is lost and PSDK is lost whatever the command is.
|
||||
* default command is disable.
|
||||
* If flight without RC is required, set DJI_FLIGHT_CONTROLLER_DISABLE_RC_LOST_ACTION.
|
||||
* Otherwise, when the remote controller goes offline, the configured RC-lost action
|
||||
* (e.g., return-to-home, auto-landing, hover, etc.) will be executed.
|
||||
*
|
||||
* @param executeRCLostActionOrNotWhenOnboardOn enable:1;disable:0
|
||||
* @return T_DjiReturnCode error code
|
||||
*/
|
||||
|
||||
@ -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 13 /*!< 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 2270 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */
|
||||
#define DJI_VERSION_BUILD 2277 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -66,6 +66,7 @@ start:
|
||||
<< "| [b] Slow rotate blade sample, only support on M400 |\n"
|
||||
<< "| [c] Select FTS pwm trigger position, support on M4/M4T/M4D/M4TD |\n"
|
||||
<< "| [d] Select FTS pwm trigger position, support on M400 |\n"
|
||||
<< "| [f] Flight controller sample - Set the RC lost action enable, execute the RC lost action when RC is lost |\n"
|
||||
<< std::endl;
|
||||
|
||||
std::cin >> inputSelectSample;
|
||||
@ -114,6 +115,9 @@ start:
|
||||
case 'd': // for m400
|
||||
DjiTest_FlightControlFtsPwmTriggerSample(DJI_MOUNT_POSITION_EXTENSION_PORT_V2_NO4, "DJI_MOUNT_POSITION_EXTENSION_PORT_V2_NO4");
|
||||
break;
|
||||
case 'f':
|
||||
DjiTest_FlightControlRunSample(E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_RC_LOST_ACTION_STATUS_ENBALE);
|
||||
break;
|
||||
case 'q':
|
||||
break;
|
||||
default:
|
||||
|
||||
0
samples/sample_c++/module_sample/liveview/test_liveview_entry.cpp
Normal file → Executable file
0
samples/sample_c++/module_sample/liveview/test_liveview_entry.cpp
Normal file → Executable file
@ -100,6 +100,7 @@ static void DjiTest_FlightControlArrestFlyingSample(void);
|
||||
static void DjiTest_FlightControlSetGetParamSample(void);
|
||||
static void DjiTest_FlightControlPassiveTriggerFtsSample(void);
|
||||
static void DjiTest_FlightControlSlowRotateMotorSample(void);
|
||||
static void DjiTest_FlightControlRCLostActionEnableSample(void);
|
||||
static T_DjiReturnCode DjiTest_TriggerFtsEventCallback(void);
|
||||
static void DjiTest_FlightControlSample(E_DjiTestFlightCtrlSampleSelect flightCtrlSampleSelect);
|
||||
|
||||
@ -116,6 +117,11 @@ T_DjiReturnCode DjiTest_FlightControlRunSample(E_DjiTestFlightCtrlSampleSelect f
|
||||
USER_LOG_ERROR("Init flight Control sample failed,error code:0x%08llX", returnCode);
|
||||
return returnCode;
|
||||
}
|
||||
returnCode = DjiFlightController_SetRCLostActionEnableStatus(DJI_FLIGHT_CONTROLLER_DISABLE_RC_LOST_ACTION);
|
||||
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
|
||||
USER_LOG_WARN("Set RC lost action status disable failed,error code:0x%08llX, That means the aircraft will execute the RC lost Action when RC is lost — RC-less flight not supported.", returnCode);
|
||||
// go through
|
||||
}
|
||||
|
||||
DjiTest_FlightControlSample(flightCtrlSampleSelect);
|
||||
|
||||
@ -980,6 +986,71 @@ static void DjiTest_FlightControlSlowRotateMotorSample(void)
|
||||
escStatus == DJI_FLIGHT_CONTROLLER_ALL_MOTOR_IN_SLOW_ROTATE_MODE ? "all" : "(error)");
|
||||
}
|
||||
|
||||
void DjiTest_FlightControlRCLostActionEnableSample()
|
||||
{
|
||||
T_DjiReturnCode returnCode;
|
||||
|
||||
USER_LOG_INFO("Flight control RC-lost-action-enable sample start");
|
||||
DjiTest_WidgetLogAppend("Flight control RC-lost-action-enable sample start");
|
||||
|
||||
USER_LOG_INFO("--> Prepare: Set RC Lost action enable, set RC lost action landing");
|
||||
returnCode = DjiFlightController_SetRCLostAction(DJI_FLIGHT_CONTROLLER_RC_LOST_ACTION_LANDING);
|
||||
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
|
||||
USER_LOG_ERROR("Set RC Lost action failed, error code: 0x%08X", returnCode);
|
||||
goto out;
|
||||
}
|
||||
|
||||
returnCode = DjiFlightController_SetRCLostActionEnableStatus(DJI_FLIGHT_CONTROLLER_ENABLE_RC_LOST_ACTION);
|
||||
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
|
||||
USER_LOG_ERROR("Set RC Lost action status enable failed, error code: 0x%08X", returnCode);
|
||||
goto out;
|
||||
}
|
||||
|
||||
USER_LOG_INFO("--> Step 1: Obtain joystick control authority");
|
||||
DjiTest_WidgetLogAppend("--> Step 1: Obtain joystick control authority");
|
||||
returnCode = DjiFlightController_ObtainJoystickCtrlAuthority();
|
||||
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
|
||||
USER_LOG_ERROR("Obtain joystick authority failed, error code: 0x%08X", returnCode);
|
||||
goto out;
|
||||
}
|
||||
s_osalHandler->TaskSleepMs(1000);
|
||||
|
||||
USER_LOG_INFO("--> Step 2: Take off\r\n");
|
||||
DjiTest_WidgetLogAppend("--> Step 2: Take off\r\n");
|
||||
if (!DjiTest_FlightControlMonitoredTakeoff()) {
|
||||
USER_LOG_ERROR("Take off failed");
|
||||
goto out;
|
||||
}
|
||||
USER_LOG_INFO("Successful take off\r\n");
|
||||
DjiTest_WidgetLogAppend("Successful take off\r\n");
|
||||
|
||||
USER_LOG_INFO("--> Step 3: Move to north:0(m), east:0(m), up:30(m) , yaw:0(degree) from current point");
|
||||
DjiTest_WidgetLogAppend("--> Step 3: Move to north:0(m), east:0(m), up:30(m) , yaw:0(degree) from current point");
|
||||
if (!DjiTest_FlightControlMoveByPositionOffset((T_DjiTestFlightControlVector3f) {0, 0, 30}, 0, 0.8, 1)) {
|
||||
USER_LOG_ERROR("Move to north:0(m), east:0(m), up:30(m) , yaw:0(degree) from current point failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
USER_LOG_INFO("--> Step 4: Turn off the RC and check if it RTHs and lands...");
|
||||
s_osalHandler->TaskSleepMs(1000);
|
||||
USER_LOG_INFO("--> Please Turn off the RC and check if it RTHs and lands...");
|
||||
s_osalHandler->TaskSleepMs(1000);
|
||||
USER_LOG_INFO("--> Please Turn off the RC and check if it RTHs and lands...");
|
||||
s_osalHandler->TaskSleepMs(1000);
|
||||
|
||||
USER_LOG_INFO("-> Step 5: Release joystick authority");
|
||||
DjiTest_WidgetLogAppend("-> Step 5: Release joystick authority");
|
||||
returnCode = DjiFlightController_ReleaseJoystickCtrlAuthority();
|
||||
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
|
||||
USER_LOG_ERROR("Release joystick authority failed, error code: 0x%08X", returnCode);
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
USER_LOG_INFO("Flight control RC-lost-action-enable sample end");
|
||||
DjiTest_WidgetLogAppend("Flight control RC-lost-action-enable sample end");
|
||||
}
|
||||
|
||||
void DjiTest_FlightControlSample(E_DjiTestFlightCtrlSampleSelect flightCtrlSampleSelect)
|
||||
{
|
||||
switch (flightCtrlSampleSelect) {
|
||||
@ -1015,6 +1086,10 @@ void DjiTest_FlightControlSample(E_DjiTestFlightCtrlSampleSelect flightCtrlSampl
|
||||
DjiTest_FlightControlSlowRotateMotorSample();
|
||||
break;
|
||||
}
|
||||
case E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_RC_LOST_ACTION_STATUS_ENBALE: {
|
||||
DjiTest_FlightControlRCLostActionEnableSample();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -44,6 +44,7 @@ typedef enum {
|
||||
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_SET_GET_PARAM,
|
||||
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_FTS_TRIGGER,
|
||||
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_SLOW_ROTATE_BLADE,
|
||||
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_RC_LOST_ACTION_STATUS_ENBALE,
|
||||
} E_DjiTestFlightCtrlSampleSelect;
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
@ -63,6 +63,7 @@ Description of the tags in the app.json configuration file:
|
||||
Indicates the English name of the application, which can be customized. The filling rules are as follows:
|
||||
* Maximum length limit is 32 bytes.
|
||||
* Only allow letters(a-zA-Z), numbers(0-9), hyphens(-), and dots(.), no other characters are permitted, and it must begin with a letter or number.
|
||||
* It cannot be "null".
|
||||
It is recommended that the application name has a connection to its functionality, and you should try to avoid duplication with other application names.
|
||||
It is advisable to avoid changing the application name afterward.
|
||||
This field can be used to display application information, such as in the application management interface, when the PILOT language is set to English, or other languages that are not Chinese, Japanese, or French.
|
||||
@ -104,7 +105,7 @@ Description of the tags in the app.json configuration file:
|
||||
|
||||
## description_en
|
||||
* Description:
|
||||
Indicates the English description of the application, which should be a string not exceeding 367 bytes in length, containing a detailed custom description of the application.
|
||||
Indicates the English description of the application, which should be a string not exceeding 367 bytes in length, containing a detailed custom description of the application, and it cannot be "null".
|
||||
The specific filling rules are as follows:
|
||||
* Each item within the brackets [] represents the content of each line, with the next item representing the content of the next line. If a line break is needed, multiple items can be filled in within the brackets [].
|
||||
This field can be used to display application information, such as in the application management interface, when the PILOT language is set to English, or other languages that are not Chinese, Japanese, or French, this field will display the application description.
|
||||
@ -146,7 +147,7 @@ Description of the tags in the app.json configuration file:
|
||||
|
||||
## maintainer_en
|
||||
* Description:
|
||||
Indicates the developer information of the application in English, which should be a string not exceeding 127 bytes in length.
|
||||
Indicates the developer information of the application in English, which should be a string not exceeding 127 bytes in length, and it cannot be "null".
|
||||
This field can be used to display application information, such as in the application management interface, when the PILOT language is set to English, or other languages that are not Chinese, Japanese, or French, this field will display the developer information of the application.
|
||||
* Data type:
|
||||
string
|
||||
|
||||
22
tools/build_dpk/build_dpk.sh
Normal file → Executable file
22
tools/build_dpk/build_dpk.sh
Normal file → Executable file
@ -89,6 +89,13 @@ if [ $(printf "%s" "$id" | wc -c) -gt 16 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$id" == "null" ]; then
|
||||
echo "Error, user_app_id field not comply with the specification, it should be the app id generated by the developer website's user center"
|
||||
echo "Please check app.json"
|
||||
echo "Document Specification: samples/sample_c/platform/linux/manifold3/app_json/README.md"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# prase and check version field
|
||||
version_regex='^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
|
||||
version=$(python3 -c "import json; print(json.load(open('$input_json_file'))['firmware_version'])")
|
||||
@ -145,6 +152,11 @@ elif [ $(printf "%s" "$name_en" | wc -c) -gt 32 ]; then
|
||||
echo "Please check app.json"
|
||||
echo "Document Specification: samples/sample_c/platform/linux/manifold3/app_json/README.md"
|
||||
exit 1
|
||||
elif [ "$name_en" == "null" ]; then
|
||||
echo "Error, name_en field cannot be 'null'"
|
||||
echo "Please check app.json"
|
||||
echo "Document Specification: samples/sample_c/platform/linux/manifold3/app_json/README.md"
|
||||
exit 1
|
||||
elif [[ ! $name_en =~ $regex ]]; then
|
||||
echo "Error, name_en field not comply with the specification"
|
||||
echo "Please check app.json"
|
||||
@ -215,6 +227,11 @@ if [ "$desc_en" == "" ]; then
|
||||
echo "Please check app.json"
|
||||
echo "Document Specification: samples/sample_c/platform/linux/manifold3/app_json/README.md"
|
||||
exit 1
|
||||
elif [ "$desc_en" == "null" ]; then
|
||||
echo "Error, description_en field cannot be 'null'"
|
||||
echo "Please check app.json"
|
||||
echo "Document Specification: samples/sample_c/platform/linux/manifold3/app_json/README.md"
|
||||
exit 1
|
||||
elif [ $(printf "%s" "$desc_en" | wc -c) -gt 367 ]; then
|
||||
echo "Error, desc_en field byte count:$(printf "%s" "$desc_en" | wc -c) over 367"
|
||||
echo "Please check app.json"
|
||||
@ -285,6 +302,11 @@ if [ "$maintainer_en" == "" ]; then
|
||||
echo "Please check app.json"
|
||||
echo "Document Specification: samples/sample_c/platform/linux/manifold3/app_json/README.md"
|
||||
exit 1
|
||||
elif [ "$maintainer_en" == "null" ]; then
|
||||
echo "Error, maintainer_en field cannot be 'null'"
|
||||
echo "Please check app.json"
|
||||
echo "Document Specification: samples/sample_c/platform/linux/manifold3/app_json/README.md"
|
||||
exit 1
|
||||
elif [ $(printf "%s" "$maintainer_en" | wc -c) -gt 127 ]; then
|
||||
echo "Error, maintainer_en field byte count:$(printf "%s" "$maintainer_en" | wc -c) over 127"
|
||||
echo "Please check app.json"
|
||||
|
||||
0
tools/file2c/file2c.exe
Normal file → Executable file
0
tools/file2c/file2c.exe
Normal file → Executable file
Reference in New Issue
Block a user