NEW: release DJI Payload-SDK version 3.3
Signed-off-by: DJI-Martin <DJI-Martin@dji.com>
This commit is contained in:
@ -36,7 +36,6 @@ extern "C" {
|
||||
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Information related to mobile APP.
|
||||
@ -72,6 +71,14 @@ T_DjiReturnCode DjiAircraftInfo_GetBaseInfo(T_DjiAircraftInfoBaseInfo *baseInfo)
|
||||
*/
|
||||
T_DjiReturnCode DjiAircraftInfo_GetMobileAppInfo(T_DjiMobileAppInfo *mobileAppInfo);
|
||||
|
||||
/**
|
||||
* @brief Get connection status of payload and aircraft.
|
||||
* @note Update period: 1Hz
|
||||
* @param isConnected: pointer to connection status.
|
||||
* @return Execution result.
|
||||
*/
|
||||
T_DjiReturnCode DjiAircraftInfo_GetConnectionStatus(bool *isConnected);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -521,7 +521,7 @@ typedef struct {
|
||||
int16_t screenX; /*! Unit: 0.1% */
|
||||
int16_t screenY; /*! Unit: 0.1% */
|
||||
bool enable_lidar;
|
||||
bool exception;
|
||||
uint8_t exception;
|
||||
} T_DjiCameraManagerLaserRangingInfo;
|
||||
|
||||
typedef T_DjiReturnCode (*DjiCameraManagerDownloadFileDataCallback)(T_DjiDownloadFilePacketInfo packetInfo,
|
||||
@ -1005,6 +1005,7 @@ T_DjiReturnCode DjiCameraManager_DeleteFileByIndex(E_DjiMountPosition position,
|
||||
|
||||
/**
|
||||
* @brief Get the camera laser ranging info of the selected camera mounted position.
|
||||
* @note Maximum data update frequency: 5Hz.
|
||||
* @param position: the mount position of the camera
|
||||
* @param laserRangingInfo: the pointer to the camera laser ranging info
|
||||
* @return Execution result.
|
||||
|
@ -771,8 +771,8 @@ typedef T_DjiVector3f T_DjiFcSubscriptionGpsVelocity;
|
||||
* @brief GPS details topic data structure.
|
||||
*/
|
||||
typedef struct GpsDetail {
|
||||
dji_f32_t hdop; /*!< Horizontal dilution of precision, <1: ideal, 1-2: excellent, 2-5: good, 5-10: moderate, 10-20: fair, >20: poor. */
|
||||
dji_f32_t pdop; /*!< Position dilution of precision, <1: ideal, 1-2: excellent, 2-5: good, 5-10: moderate, 10-20: fair, >20: poor. */
|
||||
dji_f32_t hdop; /*!< Horizontal dilution of precision, unit: 0.01, eg: 100 = 1.00, <1: ideal, 1-2: excellent, 2-5: good, 5-10: moderate, 10-20: fair, >20: poor. */
|
||||
dji_f32_t pdop; /*!< Position dilution of precision, unit: 0.01, eg: 100 = 1.00, <1: ideal, 1-2: excellent, 2-5: good, 5-10: moderate, 10-20: fair, >20: poor. */
|
||||
dji_f32_t fixState; /*!< GPS fix state, and can be any value of ::E_DjiFcSubscriptionGpsFixState. Value other than ::E_DjiFcSubscriptionGpsFixState is invalid. */
|
||||
dji_f32_t vacc; /*!< Vertical position accuracy (mm), the smaller, the better. */
|
||||
dji_f32_t hacc; /*!< Horizontal position accuracy (mm), the smaller, the better. */
|
||||
@ -1152,6 +1152,18 @@ T_DjiReturnCode DjiFcSubscription_SubscribeTopic(E_DjiFcSubscriptionTopic topic,
|
||||
E_DjiDataSubscriptionTopicFreq frequency,
|
||||
DjiReceiveDataOfTopicCallback callback);
|
||||
|
||||
/**
|
||||
* @brief Unsubscribe a topic in blocking mode. Before unsubscribing any data from aircraft, DjiFcSubscription_Init()
|
||||
* and DjiFcSubscription_SubscribeTopic() function has to be called,
|
||||
* @details User can unsubscribe a topic by specifying topic name, but the topic must be unsubscribed in the order of subscription.
|
||||
* @note Topic to be unsubscribed must have been subscribed.
|
||||
* @note Topic to be unsubscribed must be in the order of subscription, similar to a queue, subscription is similar to enqueue,
|
||||
* unsubscription is similar to dequeue.
|
||||
* @param topic: topic name to be unsubscribed.
|
||||
* @return Execution result.
|
||||
*/
|
||||
T_DjiReturnCode DjiFcSubscription_UnSubscribeTopic(E_DjiFcSubscriptionTopic topic);
|
||||
|
||||
/**
|
||||
* @brief Get the latest data value and timestamp in aircraft time system when sending the data from aircraft of specified
|
||||
* topic. If the specified topic has not been subscribed successfully, this function will return the error code.
|
||||
|
@ -228,6 +228,11 @@ typedef enum {
|
||||
DJI_FLIGHT_CONTROLLER_STABLE_CONTROL_MODE_ENABLE = 1 /*!< Enable the stable mode */
|
||||
} E_DjiFlightControllerStableControlMode;
|
||||
|
||||
typedef enum {
|
||||
DJI_FLIGHT_CONTROLLER_ENABLE_RC_LOST_ACTION = 0,
|
||||
DJI_FLIGHT_CONTROLLER_DISABLE_RC_LOST_ACTION = 1,
|
||||
} E_DjiFlightControllerRCLostActionEnableStatus;
|
||||
|
||||
/**
|
||||
* @brief Joystick mode.
|
||||
* @note You need to set joystick mode first before start to send joystick command to aircraft.
|
||||
@ -597,6 +602,25 @@ T_DjiReturnCode DjiFlightController_CancelEmergencyBrakeAction(void);
|
||||
*/
|
||||
T_DjiReturnCode DjiFlightController_GetGeneralInfo(T_DjiFlightControllerGeneralInfo *generalInfo);
|
||||
|
||||
/*! @brief The command decides whether execute RC lost action or not when osdk is running
|
||||
* @note This setting only affects the behavior of the drone when the RC lost and the OSDK is connected.
|
||||
* if the command is enable, the drone will not execute rc lost action when rc is lost but OSDK is running;
|
||||
* if the command is disable, the drone will execute rc lost action when rc is lost but OSDK is running
|
||||
* the drone will execute rc lost action when rc is lost and OSDK is lost whatever the command is.
|
||||
* default command is disable.
|
||||
* @param executeRCLostActionOrNotWhenOnboardOn enable:1;disable:0
|
||||
* @return T_DjiReturnCode error code
|
||||
*/
|
||||
T_DjiReturnCode
|
||||
DjiFlightController_SetRCLostActionEnableStatus(E_DjiFlightControllerRCLostActionEnableStatus command);
|
||||
|
||||
/*! @brief get rc lost action enable status(enable or disable)
|
||||
* @param command executeRCLostActionOrNotWhenOnboardOn, enable:1;disable:0
|
||||
* @return T_DjiReturnCode error code
|
||||
*/
|
||||
T_DjiReturnCode
|
||||
DjiFlightController_GetEnableRCLostActionStatus(E_DjiFlightControllerRCLostActionEnableStatus *command);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -57,11 +57,17 @@ typedef enum {
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_H20T_WIDE = 1,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_H20T_ZOOM = 2,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_H20T_IR = 3,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_H20N_WIDE = 1,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_H20N_ZOOM = 2,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_H20N_IR = 3,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_M30_ZOOM = 1,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_M30_WIDE = 2,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_M30T_ZOOM = 1,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_M30T_WIDE = 2,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_M30T_IR = 3
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_M30T_IR = 3,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_M3E_VIS = 1,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_M3T_VIS = 1,
|
||||
DJI_LIVEVIEW_CAMERA_SOURCE_M3T_IR = 2,
|
||||
} E_DjiLiveViewCameraSource;
|
||||
|
||||
/**
|
||||
@ -96,9 +102,10 @@ T_DjiReturnCode DjiLiveview_StartH264Stream(E_DjiLiveViewCameraPosition position
|
||||
/**
|
||||
* @brief Stop the FPV or Camera H264 Stream by selected position.
|
||||
* @param position: point out which camera to output the H264 stream
|
||||
* @param source: point out which sub camera to output the H264 stream
|
||||
* @return Execution result.
|
||||
*/
|
||||
T_DjiReturnCode DjiLiveview_StopH264Stream(E_DjiLiveViewCameraPosition position);
|
||||
T_DjiReturnCode DjiLiveview_StopH264Stream(E_DjiLiveViewCameraPosition position, E_DjiLiveViewCameraSource source);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ typedef struct {
|
||||
|
||||
/* Exported functions --------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Add the console function and level for Onboard SDK.
|
||||
* @brief Add the console function and level for Payload SDK.
|
||||
* @note When registering the console, you need to provide the method of the console and the level corresponding to
|
||||
* the method. Log levels from high to low are Debug, Info, Warn, and Error, the log function module can print all
|
||||
* logs not higher than the specified level. Maximum support for registering eight different console methods at the
|
||||
@ -86,6 +86,12 @@ typedef struct {
|
||||
*/
|
||||
T_DjiReturnCode DjiLogger_AddConsole(T_DjiLoggerConsole *console);
|
||||
|
||||
/**
|
||||
* @brief Remove the console function and level for Payload SDK.
|
||||
* @param console: pointer to the console function.
|
||||
* @return Execution result.
|
||||
*/
|
||||
T_DjiReturnCode DjiLogger_RemoveConsole(T_DjiLoggerConsole *console);
|
||||
/**
|
||||
* @brief Print out the selected level log of the specified format by the registration method.
|
||||
* @note The registered method is printed according to the corresponding level. If the level of the console is lower
|
||||
|
@ -87,6 +87,12 @@ typedef enum {
|
||||
DJI_HAL_UART_NUM_1,
|
||||
} E_DjiHalUartNum;
|
||||
|
||||
typedef enum {
|
||||
DJI_HAL_USB_BULK_NUM_0 = 0,
|
||||
DJI_HAL_USB_BULK_NUM_1,
|
||||
DJI_HAL_USB_BULK_NUM_MAX,
|
||||
} E_DjiHalUsbBulkNum;
|
||||
|
||||
typedef enum {
|
||||
DJI_SOCKET_MODE_UDP,
|
||||
DJI_SOCKET_MODE_TCP,
|
||||
@ -142,10 +148,16 @@ typedef struct {
|
||||
typedef struct {
|
||||
uint16_t pid;
|
||||
uint16_t vid;
|
||||
uint8_t bulkChannelNum;
|
||||
T_DjiHalUsbBulkChannelInfo *channelInfo;
|
||||
T_DjiHalUsbBulkChannelInfo channelInfo[DJI_HAL_USB_BULK_NUM_MAX];
|
||||
} T_DjiHalUsbBulkDeviceInfo;
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
uint16_t vid;
|
||||
uint16_t pid;
|
||||
} usbNetAdapter;
|
||||
} T_DjiHalNetworkDeviceInfo;
|
||||
|
||||
typedef struct {
|
||||
T_DjiReturnCode (*UsbBulkInit)(T_DjiHalUsbBulkInfo usbBulkInfo, T_DjiUsbBulkHandle *usbBulkHandle);
|
||||
|
||||
@ -164,6 +176,8 @@ typedef struct {
|
||||
T_DjiReturnCode (*NetworkInit)(const char *ipAddr, const char *netMask, T_DjiNetworkHandle *networkHandle);
|
||||
|
||||
T_DjiReturnCode (*NetworkDeInit)(T_DjiNetworkHandle networkHandle);
|
||||
|
||||
T_DjiReturnCode (*NetworkGetDeviceInfo)(T_DjiHalNetworkDeviceInfo *deviceInfo);
|
||||
} T_DjiHalNetworkHandler;
|
||||
|
||||
typedef struct {
|
||||
@ -317,19 +331,31 @@ T_DjiReturnCode DjiPlatform_RegSocketHandler(const T_DjiSocketHandler *socketHan
|
||||
|
||||
/**
|
||||
* @brief Get the handler of osal interfaces.
|
||||
* @return Execution result.
|
||||
* @return Pointer to osal handler.
|
||||
*/
|
||||
T_DjiOsalHandler *DjiPlatform_GetOsalHandler(void);
|
||||
|
||||
/**
|
||||
* @brief Get the handler of usb bulk interfaces.
|
||||
* @return Pointer to usb bulk handler.
|
||||
*/
|
||||
T_DjiHalUsbBulkHandler *DjiPlatform_GetHalUsbBulkHandler(void);
|
||||
|
||||
/**
|
||||
* @brief Get the handler of network interfaces.
|
||||
* @return Pointer to network handler.
|
||||
*/
|
||||
T_DjiHalNetworkHandler *DjiPlatform_GetHalNetworkHandler(void);
|
||||
|
||||
/**
|
||||
* @brief Get the handler of file-system interfaces.
|
||||
* @return Execution result.
|
||||
* @return Pointer to file-system handler.
|
||||
*/
|
||||
T_DjiFileSystemHandler *DjiPlatform_GetFileSystemHandler(void);
|
||||
|
||||
/**
|
||||
* @brief Get the handler of socket interfaces.
|
||||
* @return Execution result.
|
||||
* @return Pointer to socket handler.
|
||||
*/
|
||||
T_DjiSocketHandler *DjiPlatform_GetSocketHandler(void);
|
||||
|
||||
|
@ -91,6 +91,7 @@ typedef enum {
|
||||
DJI_AIRCRAFT_SERIES_M200_V2 = 1,
|
||||
DJI_AIRCRAFT_SERIES_M300 = 2,
|
||||
DJI_AIRCRAFT_SERIES_M30 = 3,
|
||||
DJI_AIRCRAFT_SERIES_M3 = 4,
|
||||
} E_DjiAircraftSeries;
|
||||
|
||||
typedef enum {
|
||||
@ -101,6 +102,8 @@ typedef enum {
|
||||
DJI_AIRCRAFT_TYPE_M300_RTK = 60, /*!< Aircraft type is Matrice 300 RTK. */
|
||||
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_M3T = 79, /*!< Aircraft type is Mavic 3T. */
|
||||
} E_DjiAircraftType;
|
||||
|
||||
/**
|
||||
@ -119,6 +122,8 @@ typedef enum {
|
||||
DJI_CAMERA_TYPE_L1, /*!< Camera type is L1. */
|
||||
DJI_CAMERA_TYPE_M30, /*!< Camera type is M30. */
|
||||
DJI_CAMERA_TYPE_M30T, /*!< Camera type is M30T. */
|
||||
DJI_CAMERA_TYPE_M3E, /*!< Camera type is M3E. */
|
||||
DJI_CAMERA_TYPE_M3T, /*!< Camera type is M3T. */
|
||||
} E_DjiCameraType;
|
||||
|
||||
/**
|
||||
|
@ -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 2 /*!< DJI SDK minor version num, when add functionality in a backwards compatible manner changes. Range from 0 to 99. */
|
||||
#define DJI_VERSION_MINOR 3 /*!< 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 1569 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */
|
||||
#define DJI_VERSION_BUILD 1659 /*!< DJI SDK version build info, when jenkins trigger build changes. Range from 0 to 65535. */
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
|
||||
|
@ -170,23 +170,26 @@ typedef struct {
|
||||
} T_DjiWidgetHandlerListItem;
|
||||
|
||||
typedef struct {
|
||||
uint16_t size;
|
||||
uint32_t uuid;
|
||||
uint8_t md5Sum[16];
|
||||
} T_DjiWidgetTtsDataInfo;
|
||||
union {
|
||||
/*! When event is 'DJI_WIDGET_TRANSMIT_DATA_EVENT_START', the buf contains file name, uuid and decoder bitrate. */
|
||||
struct {
|
||||
uint8_t fileName[32];
|
||||
uint8_t fileUuid[32];
|
||||
uint32_t fileDecodeBitrate;
|
||||
} transDataStartContent;
|
||||
|
||||
typedef struct {
|
||||
uint16_t size;
|
||||
uint32_t uuid;
|
||||
uint8_t md5Sum[16];
|
||||
} T_DjiWidgetVoiceDataInfo;
|
||||
/*! When event is 'DJI_WIDGET_TRANSMIT_DATA_EVENT_START', the buf contains file md5 sum. */
|
||||
struct {
|
||||
uint8_t md5Sum[16];
|
||||
} transDataEndContent;
|
||||
};
|
||||
} T_DjiWidgetTransDataContent;
|
||||
|
||||
typedef struct {
|
||||
E_DjiWidgetSpeakerState state;
|
||||
E_DjiWidgetSpeakerWorkMode workMode;
|
||||
E_DjiWidgetSpeakerPlayMode playMode;
|
||||
uint8_t volume;
|
||||
uint32_t uuid;
|
||||
} T_DjiWidgetSpeakerState;
|
||||
|
||||
typedef struct {
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user