DJI Payload SDK  1.5.3
psdk_payload_gimbal.h
Go to the documentation of this file.
1 /**
2  **********************************************************************
3  * @file psdk_payload_gimbal.h
4  * @version V1.0.0
5  * @date 2017/11/10
6  * @brief This is the header file for "psdk_payload_gimbal.c", defining the
7  * structures and (exported) function prototypes.
8  *
9  * @copyright (c) 2017-2018 DJI. All rights reserved.
10  *
11  * All information contained herein is, and remains, the property of DJI.
12  * The intellectual and technical concepts contained herein are proprietary
13  * to DJI and may be covered by U.S. and foreign patents, patents in process,
14  * and protected by trade secret or copyright law. Dissemination of this
15  * information, including but not limited to data and other proprietary
16  * material(s) incorporated within the information, in any form, is strictly
17  * prohibited without the express written consent of DJI.
18  *
19  * If you receive this source code without DJI’s authorization, you may not
20  * further disseminate the information, and you must immediately remove the
21  * source code and notify DJI of its removal. DJI reserves the right to pursue
22  * legal actions against you for any loss(es) or damage(s) caused by your
23  * failure to do so.
24  *
25  *********************************************************************
26  */
27 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef PSDK_GIMBAL_H
30 #define PSDK_GIMBAL_H
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /* Includes ------------------------------------------------------------------*/
37 #include "psdk_upper.h"
38 #include "psdk_cmdset.h"
39 
40 /** @addtogroup PSDK
41  * @{
42  */
43 
44 /** @addtogroup PSDK_Gimbal
45  * @{
46  */
47 
48 /* Exported constants --------------------------------------------------------*/
49 /* Exported macros -----------------------------------------------------------*/
50 /* Exported types ------------------------------------------------------------*/
51 
52 /** @addtogroup Gimbal_Exported_Types
53  * @{
54  */
55 
56 /** @defgroup Gimbal_Callback_Related Callback Related
57  * @{
58  */
59 
60 /**
61  * @brief Function list for handling gimbal commands.
62  * @details This structure type is used to define a list that
63  * includes all the callback functions related gimbal function:
64  * 1. Get gimbal state
65  * 2. Set gimbal mode
66  * 3. Gimbal return head
67  * 4. Control gimbal speed
68  * 5. Start gimbal calibration
69  * 6. Get gimbbal calibration progress
70  */
71 typedef struct {
72  ///Get gimbal state callback function.
73  void (*GetGimbalState)(const T_PsdkGimbalGetGimbalStateReq *req, T_PsdkGimbalGetGimbalStateAck *ack);
74  ///Set gimbal mode callback function.
75  void (*SetGimbalMode)(const T_PsdkGimbalSetGimbalModeReq *req, T_PsdkGimbalSetGimbalModeAck *ack);
76  ///Control gimbal return head callback function.
77  void (*ReturnHead)(const T_PsdkGimbalReturnHeadReq *req, T_PsdkGimbalReturnHeadAck *ack);
78  ///Control gimbal angle speed callback function.
79  void (*ControlSpeed)(const T_PsdkGimbalControlSpeedReq *req, T_PsdkGimbalControlSpeedAck *ack);
80  ///Control gimbal angle callback function.
81  void (*ControlAngle)(const T_PsdkGimbalControlAngleReq *req, T_PsdkGimbalControlAngleAck *ack);
82  ///Control gimbal joint angle callback function.
83  void (*ControlJointAngle)(const T_PsdkGimbalControlJointAngleReq *req, T_PsdkGimbalControlJointAngleAck *ack);
84  ///Gimbal calibration callback function.
85  void (*StartCalibration)(const T_PsdkGimbalStartCalibrationReq *req, T_PsdkGimbalStartCalibrationAck *ack);
86  /// Get gimbal additional status callback function.
87  /// @note The callback function will be called at 50 Hz. The average rotation speed of the gimbal within 20ms after
88  /// the callback function is called is approximately equal to the reported rotation speed.
89  void (*GetGimbalAdditionalStatus)(const T_PsdkGimbalGetGimbalAdditionalStatusReq *req,
91  ///Get gimbal calibration progress callback function.
92  void (*GetCaliProgress)(const T_PsdkGimbalGetCaliProgressReq *req, T_PsdkGimbalGetCaliProgressAck *ack);
94 
95 /**
96  * @}
97  */
98 
99 /**
100  * @}
101  */
102 
103 /* Exported variables --------------------------------------------------------*/
104 /* Exported functions --------------------------------------------------------*/
105 
106 /** @defgroup Gimbal_Exported_Functions Exported Functions
107  * @{
108  */
109 
110 E_PsdkStat PsdkGimbal_Init(T_PsdkUpper *psdkUpper, const T_PsdkGimbalHandler *gimbalHandler);
111 
112 /**
113  * @}
114  */
115 
116 /* Private constants ---------------------------------------------------------*/
117 /* Private macros ------------------------------------------------------------*/
118 /* Private types -------------------------------------------------------------*/
119 /* Private variables ---------------------------------------------------------*/
120 /* Private functions ---------------------------------------------------------*/
121 
122 /**
123  * @}
124  */
125 
126 /**
127  * @}
128  */
129 
130 #ifdef __cplusplus
131 }
132 #endif
133 
134 #endif //PSDK_PAYLOAD_GIMBAL_H
135 
136 /****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/
Set gimbal mode command ack data structure.
Definition: psdk_cmdset_gimbal.h:149
Control gimbal calibration command request data structure.
Definition: psdk_cmdset_gimbal.h:230
This is a structure type for defining a top-level structure for the integration of your application w...
Definition: psdk_upper.h:113
Control gimbal joint angle command request data structure.
Definition: psdk_cmdset_gimbal.h:212
Control gimbal joint angle command ack data structure.
Definition: psdk_cmdset_gimbal.h:221
Control gimbal angle speed command ack data structure.
Definition: psdk_cmdset_gimbal.h:185
Control gimbal calibration command ack data structure.
Definition: psdk_cmdset_gimbal.h:237
Control gimbal return head command ack data structure.
Definition: psdk_cmdset_gimbal.h:165
Get gimbal state command request data structure.
Definition: psdk_cmdset_gimbal.h:111
Control gimbal angle command ack data structure.
Definition: psdk_cmdset_gimbal.h:203
Function list for handling gimbal commands.
Definition: psdk_payload_gimbal.h:71
Get gimbal calibration progress command request data structure.
Definition: psdk_cmdset_gimbal.h:246
This is the header file for "psdk_upper.c", defining the structures and (exported) function prototype...
Get gimbal additional status command request data structure.
Definition: psdk_cmdset_gimbal.h:264
Control gimbal angle speed command request data structure.
Definition: psdk_cmdset_gimbal.h:174
Set gimbal mode command request data structure.
Definition: psdk_cmdset_gimbal.h:142
Control gimbal angle command request data structure.
Definition: psdk_cmdset_gimbal.h:194
Control gimbal return head command request data structure.
Definition: psdk_cmdset_gimbal.h:158
Get gimbal additional status command ack data structure.
Definition: psdk_cmdset_gimbal.h:271
Get gimbal calibration progress command ack data structure.
Definition: psdk_cmdset_gimbal.h:253
Get gimbal state command ack data structure.
Definition: psdk_cmdset_gimbal.h:118
This file defines the PSDK command set.