dji_error.hpp
Go to the documentation of this file.
1 
29 #ifndef DJI_ERROR_H
30 #define DJI_ERROR_H
31 
32 #ifdef STM32
33 #include <stdint.h>
34 #else
35 #include <cstdint>
36 #endif
37 #include <map>
38 #include "osdk_typedef.h"
39 
40 namespace DJI {
41 namespace OSDK {
42 
47 class ErrorCode {
48  public:
52  typedef uint8_t ModuleIDType;
53 
56  typedef uint8_t FunctionIDType;
57 
60  typedef uint32_t RawRetCodeType;
61 
64  static const uint8_t functionMaxCnt = 20;
67  enum ModuleID {
68  SysModule = 0,
69  RESERVE_1 = 1,
70  RESERVE_2 = 2,
71  RESERVE_3 = 3,
72  RESERVE_4 = 4,
73  RESERVE_5 = 5,
74  RESERVE_6 = 6,
75  RESERVE_7 = 7,
76  RESERVE_8 = 8,
77  RESERVE_9 = 9,
78  RESERVE_10 = 10,
79  FCModule = 11,
80  GimbalModule = 12,
81  CameraModule = 13,
82  PSDKModule = 14,
83  RCModule = 15,
84  BatteryModule = 16,
85  MissionV2Module = 17,
86  ModuleMaxCnt,
87  };
88 
92  SystemCommon = 0,
93  };
96  enum FCFunctionID {
97  FCControlTask = 0,
98  FCSubscribe = 1,
99  // FCWaypointMissionV1 = 2,
100  // FCWaypointMissionV2 = 3,
101  FCParameterTable = 4,
102  FCSetHomeLocation = 5,
103  FCAvoidObstacle = 6,
104  FCEmergencyBrake = 7,
105  // FCHotpointMission = 8,
106  };
107 
111  CameraCommon = 0,
112  };
113 
117  GimbalCommon = 0,
118  };
119 
123  PSDKCommon = 0,
124  };
125 
126  enum MissionV2FunctionId
127  {
128  MissionV2Common = 0,
129  };
130 
132  Success = 0x00000000,
133  AllocMemoryFailed = 0x00000001,
134  ReqNotSupported = 0x00000002,
135  Timeout = 0x00000003,
136  UnpackDataMismatch = 0x00000004,
137  InstInitParamInvalid = 0x00000005,
138  UserCallbackInvalid = 0x00000006,
139  UndefinedError = 0xFFFFFFFF,
140  };
141 
144  typedef int64_t ErrorCodeType;
145 
148  typedef struct ErrorCodeMsg {
149  ErrorCodeMsg(const char* moduleMsg, const char* errorMsg,
150  const char* solutionMsg)
151  : moduleMsg(moduleMsg), errorMsg(errorMsg), solutionMsg(solutionMsg){};
152  const char* moduleMsg;
153  const char* errorMsg;
154  const char* solutionMsg;
155  } ErrorCodeMsg;
156 
159  typedef std::map<const RawRetCodeType, ErrorCodeMsg> ErrorCodeMapType;
160 
161  typedef struct FunctionDataType
162  {
163  const char* FunctionName;
164  const ErrorCodeMapType (*getMap)();
165  } FunctionDataType;
166 
167  typedef struct ModuleDataType
168  {
169  const char* ModuleName;
170  const FunctionDataType *data;
171  } ModuleDataType;
172 
181  static constexpr ErrorCodeType getErrorCode(ModuleIDType moduleID,
182  FunctionIDType functionID,
183  RawRetCodeType rawRetCode) {
184  return (!rawRetCode) ? (
185  ((ErrorCodeType) ErrorCode::SysModule << moduleIDLeftMove)
186  | ((ErrorCodeType) ErrorCode::SystemCommon << functionIDLeftMove) |
187  (ErrorCodeType) 0x00000000) :
188  (((ErrorCodeType) moduleID << moduleIDLeftMove) |
189  ((ErrorCodeType) functionID << functionIDLeftMove) |
190  (ErrorCodeType) rawRetCode);
191  }
192 
198 
203  static const char* getModuleName(ErrorCodeType errCode);
204 
210 
216 
217  static ErrorCode::ErrorCodeType getLinkerErrorCode(E_OsdkStat cb_type);
218 
223  static ErrorCodeMsg getErrorCodeMsg(int64_t errCode);
224 
228  static void printErrorCodeMsg(int64_t errCode);
229 
230  class FlightControllerErr
231  {
232  public:
233  class ParamReadWriteErr
234  {
235  public:
236  static const ErrorCodeType Fail;
237  static const ErrorCodeType InvalidParameter;
238  };
239 
240  class SetHomeLocationErr
241  {
242  public:
243  static const ErrorCodeType Fail;
244  };
245 
246  class SetControlParam
247  {
248  public:
249  static const ErrorCodeType ObtainJoystickCtrlAuthoritySuccess;
250  static const ErrorCodeType ReleaseJoystickCtrlAuthoritySuccess;
251  static const ErrorCodeType ObtainJoystickCtrlAuthorityFail;
252  static const ErrorCodeType ReleaseJoystickCtrlAuthorityFail;
253  };
254 
255  };
259  public:
260  static const ErrorCodeType InvalidCMD;
261  static const ErrorCodeType Timeout;
262  static const ErrorCodeType OutOfMemory;
263  static const ErrorCodeType InvalidParam;
264  static const ErrorCodeType InvalidState;
265  static const ErrorCodeType TimeNotSync;
266  static const ErrorCodeType ParamSetFailed;
267  static const ErrorCodeType ParamGetFailed;
268  static const ErrorCodeType SDCardMISSING;
269  static const ErrorCodeType SDCardFull;
270  static const ErrorCodeType SDCardError;
271  static const ErrorCodeType SensorError;
272  static const ErrorCodeType SystemError;
273  static const ErrorCodeType ParamLenTooLong;
274  static const ErrorCodeType ModuleInactivated;
275  static const ErrorCodeType FWSeqNumNotInOrder;
276  static const ErrorCodeType FWCheckErr;
277  static const ErrorCodeType FlashWriteError;
278  static const ErrorCodeType FWInvalidType;
279  static const ErrorCodeType RCDisconnect;
280  static const ErrorCodeType HardwareErr;
281  static const ErrorCodeType UAVDisconnect;
282  static const ErrorCodeType UpgradeErrorNow;
283  static const ErrorCodeType UndefineError;
284  };
285 
289  public:
290  static const ErrorCodeType InvalidCMD;
291  static const ErrorCodeType Timeout;
292  static const ErrorCodeType OutOfMemory;
293  static const ErrorCodeType InvalidParam;
294  static const ErrorCodeType InvalidState;
295  static const ErrorCodeType TimeNotSync;
296  static const ErrorCodeType ParamSetFailed;
297  static const ErrorCodeType ParamGetFailed;
298  static const ErrorCodeType SDCardMISSING;
299  static const ErrorCodeType SDCardFull;
300  static const ErrorCodeType SDCardError;
301  static const ErrorCodeType SensorError;
302  static const ErrorCodeType SystemError;
303  static const ErrorCodeType ParamLenTooLong;
304  static const ErrorCodeType ModuleInactivated;
305  static const ErrorCodeType FWSeqNumNotInOrder;
306  static const ErrorCodeType FWCheckErr;
307  static const ErrorCodeType FlashWriteError;
308  static const ErrorCodeType FWInvalidType;
309  static const ErrorCodeType RCDisconnect;
310  static const ErrorCodeType HardwareErr;
311  static const ErrorCodeType UAVDisconnect;
312  static const ErrorCodeType UpgradeErrorNow;
313  static const ErrorCodeType UndefineError;
314  };
315 
319  public:
320  static const ErrorCodeType InvalidCMD;
321  static const ErrorCodeType Timeout;
322  static const ErrorCodeType OutOfMemory;
323  static const ErrorCodeType InvalidParam;
324  static const ErrorCodeType InvalidState;
325  static const ErrorCodeType TimeNotSync;
326  static const ErrorCodeType ParamSetFailed;
327  static const ErrorCodeType ParamGetFailed;
328  static const ErrorCodeType SDCardMISSING;
329  static const ErrorCodeType SDCardFull;
330  static const ErrorCodeType SDCardError;
331  static const ErrorCodeType SensorError;
332  static const ErrorCodeType SystemError;
333  static const ErrorCodeType ParamLenTooLong;
334  static const ErrorCodeType ModuleInactivated;
335  static const ErrorCodeType FWSeqNumNotInOrder;
336  static const ErrorCodeType FWCheckErr;
337  static const ErrorCodeType FlashWriteError;
338  static const ErrorCodeType FWInvalidType;
339  static const ErrorCodeType RCDisconnect;
340  static const ErrorCodeType HardwareErr;
341  static const ErrorCodeType UAVDisconnect;
342  static const ErrorCodeType UpgradeErrorNow;
343  static const ErrorCodeType UndefineError;
344  };
345 
348  class SysCommonErr {
349  public:
350  static const ErrorCodeType Success;
351  static const ErrorCodeType AllocMemoryFailed;
352  static const ErrorCodeType ReqNotSupported;
353  static const ErrorCodeType ReqTimeout;
354  static const ErrorCodeType UnpackDataMismatch;
355  static const ErrorCodeType InstInitParamInvalid;
356  static const ErrorCodeType UserCallbackInvalid;
357  static const ErrorCodeType UndefinedError;
358  };
359 
360  class WaypointV2MissionErr{
361  public:
362 
363  static const ErrorCodeType TRAJ_RESV;
364  static const ErrorCodeType TRAJ_INIT_WP_NUM_TOO_MANY ;
365  static const ErrorCodeType TRAJ_INIT_WP_NUM_TOO_FEW ;
366  static const ErrorCodeType TRAJ_INIT_INVALID_END_INDEX ;
367  static const ErrorCodeType TRAJ_UPLOAD_START_ID_GT_END_ID ;
368  static const ErrorCodeType TRAJ_UPLOAD_END_ID_GT_TOTAL_NUM ;
369  static const ErrorCodeType TRAJ_DOWNLOAD_WPS_NOT_IN_STORED_RAGNE ;
370  static const ErrorCodeType TRAJ_CUR_POS_IS_FAR_AWAY_FROM_FIRST_WP ;
371  static const ErrorCodeType TRAJ_ADJ_WPS_TOO_CLOSE ;
372  static const ErrorCodeType TRAJ_ADJ_WPS_TOO_FAR ;
373  static const ErrorCodeType TRAJ_UPLOAD_MAX_VEL_GT_GLOBAL ;
374  static const ErrorCodeType TRAJ_UPLOAD_LOCAL_CRUISE_VEL_GT_LOCAL_MAX ;
375  static const ErrorCodeType TRAJ_UPLOAD_LOCAL_CRUISE_VEL_GT_GLOBAL_MAX ;
376  static const ErrorCodeType TRAJ_INIT_INVALID_GLOBAL_MAX_VEL ;
377  static const ErrorCodeType TRAJ_GLOBAL_CRUISE_VEL_GT_MAX_VEL ;
378  static const ErrorCodeType TRAJ_INIT_INVALID_GOTO_FIRST_FLAG ;
379  static const ErrorCodeType TRAJ_INIT_INVALID_FINISHED_ACTION ;
380  static const ErrorCodeType TRAJ_INIT_INVALID_RC_LOST_ACTION;
381  static const ErrorCodeType TRAJ_UPLOAD_YAW_MODE_INVALID;
382  static const ErrorCodeType TRAJ_UPLOAD_YAW_CMD_NOT_IN_RANGE ;
383  static const ErrorCodeType TRAJ_UPLOAD_YAW_TURN_DIRECTION_INVALID;
384  static const ErrorCodeType TRAJ_UPLOAD_WP_TYPE_INVALID ;
385  static const ErrorCodeType TRAJ_GO_STOP_CMD_INVALID ;
386  static const ErrorCodeType TRAJ_INVALID_PAUSE_RECOVERY_CMD;
387  static const ErrorCodeType TRAJ_INVALID_BREAK_RESTORE_CMD ;
388  static const ErrorCodeType TRAJ_INIT_INVALID_REF_POINT ;
389  static const ErrorCodeType TRAJ_UPLOAD_CANNT_SET_WP_LINE_EXIT_TYPE;
390  static const ErrorCodeType TRAJ_DAMPING_DIS_GE_DIS_OF_ADJ_POINTS ;
391  static const ErrorCodeType TRAJ_INIT_INFO_NOT_UPLOADED ;
392  static const ErrorCodeType TRAJ_WP_HAS_NOT_UPLOADED ;
393  static const ErrorCodeType TRAJ_UPLOADED_WP_NOT_ENOUGH ;
394  static const ErrorCodeType TRAJ_GS_HAS_STARTED ;
395  static const ErrorCodeType TRAJ_GS_NOT_RUNNING ;
396  static const ErrorCodeType TRAJ_GS_NOT_RUNNING_FOR_PAUSE_RECOVERY;
397  static const ErrorCodeType TRAJ_GS_NOT_RUNNING_FOR_BREAK_RESTORE;
398  static const ErrorCodeType TRAJ_NOT_IN_WP_MIS ;
399  static const ErrorCodeType TRAJ_MIS_HAS_BEEN_PAUSED ;
400  static const ErrorCodeType TRAJ_MIS_NOT_PAUSED ;
401  static const ErrorCodeType TRAJ_MIS_HAS_BEEN_BROKEN ;
402  static const ErrorCodeType TRAJ_MIS_NOT_BROKEN ;
403  static const ErrorCodeType TRAJ_PAUSE_RECOVERY_NOT_SUPPORTED;
404  static const ErrorCodeType TRAJ_BREAK_RESTORE_NOT_SUPPORTED ;
405  static const ErrorCodeType TRAJ_NO_BREAK_POINT ;
406  static const ErrorCodeType TRAJ_NO_CUR_TRAJ_PROJECT ;
407  static const ErrorCodeType TRAJ_NO_NXT_TRAJ_PROJECT ;
408  static const ErrorCodeType TRAJ_NO_NNT_TRAJ_PROJECT ;
409  static const ErrorCodeType TRAJ_UPLOAD_WP_ID_NOT_CONTINUE ;
410  static const ErrorCodeType TRAJ_WP_LINE_ENTER_NOT_SET_TO_START_WP ;
411  static const ErrorCodeType TRAJ_INIT_WP_WHEN_PLAN_HAS_STARTED ;
412  static const ErrorCodeType TRAJ_DAMPING_DIS_EXCEED_RANGE ;
413  static const ErrorCodeType TRAJ_WAYPOINT_COOR_EXCEED_RANGE ;
414  static const ErrorCodeType TRAJ_FIRST_WP_TYPE_IS_WP_TURN_NO;
415  static const ErrorCodeType TRAJ_WP_EXCEED_RADIUS_LIMIT ;
416  static const ErrorCodeType TRAJ_WP_EXCEED_HEIGHT_LIMIT ;
417 
418 
419  static const ErrorCodeType COMMON_SUCCESS;
420  static const ErrorCodeType COMMON_INVALID_DATA_LENGTH;
421  static const ErrorCodeType COMMON_INVALD_FLOAT_NUM;
422  static const ErrorCodeType TRAJ_WP_VERSION_NO_MATCH;
423  static const ErrorCodeType COMMON_UNKNOWN;
424 
425  static const ErrorCodeType STATUS_RESV;
426  static const ErrorCodeType STATUS_WP_MIS_CHECK_FAIL;
427  static const ErrorCodeType STATUS_HOME_NOT_RECORDED;
428  static const ErrorCodeType STATUS_LOW_LOCATION_ACCURACY;
429  static const ErrorCodeType STATUS_RTK_CONDITION_IS_NOT_READY;
430 
431  static const ErrorCodeType SECURE_RESV;
432  static const ErrorCodeType SECURE_CROSS_NFZ;
433  static const ErrorCodeType SECURE_BAT_LOW;
434 
435  static const ErrorCodeType ACTION_COMMON_RESV;
436  static const ErrorCodeType ACTION_COMMON_ACTION_ID_DUPLICATED;
437  static const ErrorCodeType ACTION_COMMON_ACTION_ITEMS_SPACE_NOT_ENOUGH;
438  static const ErrorCodeType ACTION_COMMON_ACTION_SIZE_GT_BUF_SIZE;
439  static const ErrorCodeType ACTION_COMMON_ACTION_ID_NOT_FOUND;
440  static const ErrorCodeType ACTION_COMMON_DOWNLOAD_ACTION_ID_RANGE_ERROR;
441  static const ErrorCodeType ACTION_COMMON_NO_ACTION_ITEMS_STORED;
442 
443 
444  static const ErrorCodeType TRIGGER_RESV;
445  static const ErrorCodeType TRIGGER_TYPE_INVALID;
446  static const ErrorCodeType TRIGGER_REACH_WP_END_INDEX_LT_START_INDEX;
447  static const ErrorCodeType TRIGGER_REACH_WP_INVALID_INTERVAL_WP_NUM;
448  static const ErrorCodeType TRIGGER_REACH_WP_INVALID_AUTO_TERMINATE_WP_NUM;
449  static const ErrorCodeType TRIGGER_ASSOCIATE_INVALID_TYPE;
450  static const ErrorCodeType TRIGGER_SIMPLE_INTERVAL_INVALID_TYPE;
451 
452  static const ErrorCodeType ACTUATOR_COMMON_RESV;
453  static const ErrorCodeType ACTUATOR_COMMON_ACTUATOR_EXEC_NON_SUPPORTED;
454  static const ErrorCodeType ACTUATOR_COMMON_ACTUATOR_TYPE_INVALID;
455  static const ErrorCodeType ACTUATOR_COMMON_ACTUATOR_FUNC_INVALID;
456 
457  static const ErrorCodeType ACTUATOR_CAMERA_RESV;
458  static const ErrorCodeType ACTUATOR_CAMERA_SEND_SINGLE_SHOT_CMD_TO_CAMERA_FAIL;
459  static const ErrorCodeType ACTUATOR_CAMERA_SEND_VIDEO_START_CMD_TO_CAMERA_FAIL;
460  static const ErrorCodeType ACTUATOR_CAMERA_SEND_VIDEO_STOP_CMD_TO_CAMERA_FAIL;
461  static const ErrorCodeType ACTUATOR_CAMERA_FOCUS_PARAM_XY_INVALID;
462  static const ErrorCodeType ACTUATOR_CAMERA_SEND_FOCUS_CMD_TO_CAMERA_FAIL;
463  static const ErrorCodeType ACTUATOR_CAMERA_SEND_FOCALIZE_CMD_TO_CAMERA_FAIL;
464  static const ErrorCodeType ACTUATOR_CAMERA_FOCAL_DISTANCE_INVALID;
465  static const ErrorCodeType ACTUATOR_CAMERA_EXEC_FAIL;
466 
467  static const ErrorCodeType ACTUATOR_GIMBAL_RESV;
468  static const ErrorCodeType ACTUATOR_GIMBAL_INVALID_RPY_ANGLE_CTRL_CMD;
469  static const ErrorCodeType ACTUATOR_GIMBAL_INVALID_DURATION_CMD;
470  static const ErrorCodeType ACTUATOR_GIMBAL_FAIL_TO_ARRIVE_TGT_ANGLE;
471  static const ErrorCodeType ACTUATOR_GIMBAL_FAIL_TO_SEND_CMD_TO_GIMBAL;
472  static const ErrorCodeType ACTUATOR_GIMBAL_THIS_INDEX_OF_GIMBAL_NOT_DOING_UNIFORM_CTRL;
473 
474  static const ErrorCodeType ACTUATOR_FLIGHT_RESV;
475  static const ErrorCodeType ACTUATOR_FLIGHT_YAW_INVALID_YAW_ANGLE;
476  static const ErrorCodeType ACTUATOR_FLIGHT_YAW_TO_TGT_ANGLE_TIMEOUT;
477  static const ErrorCodeType ACTUATOR_FLIGHT_ACTION_YAW_OCCUPIED;
478  static const ErrorCodeType ACTUATOR_FLIGHT_CUR_AND_TGT_VEL_CLE_STATUE_EQUAL;
479 
480  static const ErrorCodeType ACTUATOR_PAYLOAD_RESV;
481  static const ErrorCodeType ACTUATOR_PAYLOAD_FAIL_TO_SEND_CMD_TO_PAYLOAD;
482  static const ErrorCodeType ACTUATOR_PAYLOAD_EXEC_FAILED;
483 
484  };
485 
491  class CommonACK {
492  public:
493  const static uint16_t SUCCESS;
494  const static uint16_t KEY_ERROR;
495  const static uint16_t NO_AUTHORIZATION_ERROR;
496  const static uint16_t NO_RIGHTS_ERROR;
497  const static uint16_t SYSTEM_ERROR;
498  const static uint16_t NO_RESPONSE_ERROR;
499 
500  // These error codes would return either from
501  // CMDSet Control::Task or from Missions
502  const static uint8_t MOTOR_FAIL_NONE;
514  const static uint8_t MOTOR_FAIL_COMPASS_ABNORMAL;
517  const static uint8_t MOTOR_FAIL_ASSISTANT_PROTECTED;
519  const static uint8_t MOTOR_FAIL_DEVICE_LOCKED;
539  const static uint8_t MOTOR_FAIL_IMU_SN_ERROR;
542  const static uint8_t MOTOR_FAIL_IMU_PREHEATING;
544  const static uint8_t MOTOR_FAIL_COMPASS_CALIBRATING;
546  const static uint8_t MOTOR_FAIL_IMU_NO_ATTITUDE;
548  const static uint8_t MOTOR_FAIL_NO_GPS_IN_NOVICE_MODE;
550  const static uint8_t MOTOR_FAIL_BATTERY_CELL_ERROR;
556  const static uint8_t MOTOR_FAIL_BATTERY_USER_LOW_LAND;
558  const static uint8_t MOTOR_FAIL_BATTERY_MAIN_VOL_LOW;
559  const static uint8_t MOTOR_FAIL_BATTERY_TEMP_VOL_LOW;
561  const static uint8_t MOTOR_FAIL_BATTERY_SMART_LOW_LAND;
564  const static uint8_t MOTOR_FAIL_BATTERY_NOT_READY;
566  const static uint8_t MOTOR_FAIL_RUNNING_SIMULATOR;
568  const static uint8_t MOTOR_FAIL_PACK_MODE;
572  const static uint8_t MOTOR_FAIL_IMU_ATTI_LIMIT;
574  const static uint8_t MOTOR_FAIL_NOT_ACTIVATED;
576  const static uint8_t MOTOR_FAIL_IN_FLYLIMIT_AREA;
579  const static uint8_t MOTOR_FAIL_IMU_BIAS_LIMIT;
581  const static uint8_t MOTOR_FAIL_ESC_ERROR;
585  const static uint8_t MOTOR_FAIL_IMU_INITING;
587  const static uint8_t MOTOR_FAIL_UPGRADING;
589  const static uint8_t MOTOR_FAIL_HAVE_RUN_SIM;
592  const static uint8_t MOTOR_FAIL_IMU_CALIBRATING;
595  const static uint8_t MOTOR_FAIL_TAKEOFF_TILT_TOO_LARGE;
596  const static uint8_t MOTOR_FAIL_RESERVED_31;
597  const static uint8_t MOTOR_FAIL_RESERVED_32;
598  const static uint8_t MOTOR_FAIL_RESERVED_33;
599  const static uint8_t MOTOR_FAIL_RESERVED_34;
600  const static uint8_t MOTOR_FAIL_RESERVED_35;
601  const static uint8_t MOTOR_FAIL_RESERVED_36;
602  const static uint8_t MOTOR_FAIL_RESERVED_37;
603  const static uint8_t MOTOR_FAIL_RESERVED_38;
604  const static uint8_t MOTOR_FAIL_RESERVED_39;
605  const static uint8_t MOTOR_FAIL_RESERVED_40;
607  const static uint8_t MOTOR_FAIL_INVALID_SN;
608  const static uint8_t MOTOR_FAIL_RESERVED_42;
609  const static uint8_t MOTOR_FAIL_RESERVED_43;
611  const static uint8_t MOTOR_FAIL_FLASH_OPERATING;
612  /* The GPS is disconnected. */
613  const static uint8_t MOTOR_FAIL_GPS_DISCONNECT;
614  const static uint8_t MOTOR_FAIL_INTERNAL_46;
617  const static uint8_t MOTOR_FAIL_RECORDER_ERROR;
619  const static uint8_t MOTOR_FAIL_INVALID_PRODUCT;
620  const static uint8_t MOTOR_FAIL_RESERVED_49;
621  const static uint8_t MOTOR_FAIL_RESERVED_50;
622  const static uint8_t MOTOR_FAIL_RESERVED_51;
623  const static uint8_t MOTOR_FAIL_RESERVED_52;
624  const static uint8_t MOTOR_FAIL_RESERVED_53;
625  const static uint8_t MOTOR_FAIL_RESERVED_54;
626  const static uint8_t MOTOR_FAIL_RESERVED_55;
627  const static uint8_t MOTOR_FAIL_RESERVED_56;
628  const static uint8_t MOTOR_FAIL_RESERVED_57;
629  const static uint8_t MOTOR_FAIL_RESERVED_58;
630  const static uint8_t MOTOR_FAIL_RESERVED_59;
631  const static uint8_t MOTOR_FAIL_RESERVED_60;
634  const static uint8_t MOTOR_FAIL_IMU_DISCONNECTED;
636  const static uint8_t MOTOR_FAIL_RC_CALIBRATING;
638  const static uint8_t MOTOR_FAIL_RC_CALI_DATA_OUT_RANGE;
639  /* RC calibration is unfinished. Please calibrate the RC. */
640  const static uint8_t MOTOR_FAIL_RC_QUIT_CALI;
641  /* The center value of RC is out of range. */
642  const static uint8_t MOTOR_FAIL_RC_CENTER_OUT_RANGE;
643  /* RC mapping has an exception. Please check RC channel mapping. */
644  const static uint8_t MOTOR_FAIL_RC_MAP_ERROR;
647  const static uint8_t MOTOR_FAIL_WRONG_AIRCRAFT_TYPE;
650  const static uint8_t MOTOR_FAIL_RESERVED_69;
651  const static uint8_t MOTOR_FAIL_RESERVED_70;
652  const static uint8_t MOTOR_FAIL_RESERVED_71;
653  const static uint8_t MOTOR_FAIL_RESERVED_72;
654  const static uint8_t MOTOR_FAIL_RESERVED_73;
656  const static uint8_t MOTOR_FAIL_NS_ABNORMAL;
660  const static uint8_t MOTOR_FAIL_TOPOLOGY_ABNORMAL;
662  const static uint8_t MOTOR_FAIL_RC_NEED_CALI;
664  const static uint8_t MOTOR_FAIL_INVALID_FLOAT;
668  const static uint8_t MOTOR_FAIL_M600_BAT_TOO_FEW;
671  const static uint8_t MOTOR_FAIL_M600_BAT_AUTH_ERR;
674  const static uint8_t MOTOR_FAIL_M600_BAT_COMM_ERR;
678  const static uint8_t MOTOR_FAIL_BATTERY_BOLTAHGE_DIFF_82;
680  const static uint8_t MOTOR_FAIL_INVALID_VERSION;
682  const static uint8_t MOTOR_FAIL_GIMBAL_GYRO_ABNORMAL;
688  const static uint8_t MOTOR_FAIL_GIMBAL_ESC_YAW_NO_DATA;
692  /* The gimbal is out of control. This happens only in M600. */
693  const static uint8_t MOTOR_FAIL_GIMBAL_OUT_OF_CONTROL;
696  const static uint8_t MOTOR_FAIL_GIMBAL_PITCH_SHOCK;
699  const static uint8_t MOTOR_FAIL_GIMBAL_ROLL_SHOCK;
702  const static uint8_t MOTOR_FAIL_GIMBAL_YAW_SHOCK;
704  const static uint8_t MOTOR_FAIL_IMU_CALI_SUCCESS;
707  const static uint8_t MOTOR_FAIL_TAKEOFF_EXCEPTION;
709  const static uint8_t MOTOR_FAIL_ESC_STALL_NEAR_GOUND;
711  const static uint8_t MOTOR_FAIL_ESC_UNBALANCE_ON_GRD;
714  const static uint8_t MOTOR_FAIL_ESC_PART_EMPTY_ON_GRD;
721  const static uint8_t MOTOR_FAIL_ENGINE_START_FAILED;
727  const static uint8_t MOTOR_FAIL_ROLL_OVER_ON_GRD;
729  const static uint8_t MOTOR_FAIL_BAT_VERSION_ERR;
731  const static uint8_t MOTOR_FAIL_RTK_INITING;
733  const static uint8_t MOTOR_FAIL_RTK_FAIL_TO_INIT;
734  const static uint8_t MOTOR_FAIL_RESERVED_104;
735  const static uint8_t MOTOR_FAIL_RESERVED_105;
736  const static uint8_t MOTOR_FAIL_RESERVED_106;
737  const static uint8_t MOTOR_FAIL_RESERVED_107;
738  const static uint8_t MOTOR_FAIL_RESERVED_108;
739  const static uint8_t MOTOR_FAIL_RESERVED_109;
741  const static uint8_t START_MOTOR_FAIL_MOTOR_STARTED;
742  const static uint8_t MOTOR_FAIL_INTERNAL_111;
744  const static uint8_t MOTOR_FAIL_ESC_CALIBRATING;
745  /* GPS signature is invalid because the GPS module
746  * has not received valid signature information for 2s. */
747  const static uint8_t MOTOR_FAIL_GPS_SIGNATURE_INVALID;
748  /* The gimbal is in calibration. */
749  const static uint8_t MOTOR_FAIL_GIMBAL_CALIBRATING;
751  const static uint8_t MOTOR_FAIL_FORCE_DISABLE;
755  const static uint8_t TAKEOFF_HEIGHT_EXCEPTION;
757  const static uint8_t MOTOR_FAIL_ESC_NEED_UPGRADE;
759  const static uint8_t MOTOR_FAIL_GYRO_DATA_NOT_MATCH;
761  const static uint8_t MOTOR_FAIL_APP_NOT_ALLOW;
763  const static uint8_t MOTOR_FAIL_COMPASS_IMU_MISALIGN;
765  const static uint8_t MOTOR_FAIL_FLASH_UNLOCK;
767  const static uint8_t MOTOR_FAIL_ESC_SCREAMING;
769  const static uint8_t MOTOR_FAIL_ESC_TEMP_HIGH;
771  const static uint8_t MOTOR_FAIL_BAT_ERR;
774  const static uint8_t IMPACT_IS_DETECTED;
776  const static uint8_t MOTOR_FAIL_MODE_FAILURE;
778  const static uint8_t MOTOR_FAIL_CRAFT_FAIL_LATELY;
780  const static uint8_t KILL_SWITCH_ON;
782  const static uint8_t MOTOR_FAIL_MOTOR_CODE_ERROR;
783  };
784 
791  public:
792  const static uint16_t SUCCESS;
793  const static uint16_t PARAMETER_ERROR;
794  const static uint16_t ENCODE_ERROR;
795  const static uint16_t NEW_DEVICE_ERROR;
796  const static uint16_t DJIGO_APP_NOT_CONNECTED;
797  const static uint16_t NETWORK_ERROR;
798  const static uint16_t SERVER_ACCESS_REFUSED;
799  const static uint16_t ACCESS_LEVEL_ERROR;
800  const static uint16_t OSDK_VERSION_ERROR;
801  };
802 
808  class ControlACK {
809  public:
813  typedef struct SetControl {
814  const static uint16_t RC_MODE_ERROR;
815  const static uint16_t RELEASE_CONTROL_SUCCESS;
816  const static uint16_t OBTAIN_CONTROL_SUCCESS;
817  const static uint16_t OBTAIN_CONTROL_IN_PROGRESS;
818  const static uint16_t RELEASE_CONTROL_IN_PROGRESS;
819  const static uint16_t RC_NEED_MODE_F;
820  const static uint16_t RC_NEED_MODE_P;
821  const static uint16_t IOC_OBTAIN_CONTROL_ERROR;
822  } SetControl;
823 
829  typedef struct Task {
830  const static uint16_t SUCCESS;
831  const static uint16_t MOTOR_ON;
832  const static uint16_t MOTOR_OFF;
833  const static uint16_t IN_AIR;
834  const static uint16_t NOT_IN_AIR;
835  const static uint16_t NO_HOMEPOINT;
836  const static uint16_t BAD_GPS;
837  // Do not consider as error?
838  const static uint16_t IN_SIMULATOR_MODE;
839  const static uint16_t ALREADY_RUNNING;
840  const static uint16_t NOT_RUNNING;
841  const static uint16_t INVAILD_COMMAND;
842  const static uint16_t NO_LANDING_GEAR;
843  // Do not consider as error?
844  const static uint16_t GIMBAL_MOUNTED;
845  const static uint16_t BAD_SENSOR;
846  const static uint16_t ALREADY_PACKED;
847  const static uint16_t NO_PACKED;
848  const static uint16_t PACKED_MODE_NOT_SUPPORTED;
849  } Task;
850 
851  /*
852  * Task ACKs Supported in firmware version < 3.3
853  */
854  typedef struct LegacyTask {
855  const static uint16_t SUCCESS;
856  const static uint16_t FAIL;
857  } LegacyTask;
858 
863  typedef struct SetArm {
864  const static uint16_t SUCCESS;
865  const static uint16_t OBTAIN_CONTROL_NEEDED_ERROR;
866  const static uint16_t ALREADY_ARMED_ERROR;
867  const static uint16_t AIRCRAFT_IN_AIR_ERROR;
868  } SetArm;
869 
870  typedef struct KillSwitch {
871  const static uint16_t SUCCESS;
872  } KillSwitch;
873 
874  enum ParamReadWrite : RawRetCodeType
875  {
876  PARAM_READ_WRITE_SUCCESS = 0,
877  PARAM_READ_WRITE_FAIL = 1,
878  PARAM_READ_WRITE_INVALID_PARAMETER = 2,
879  };
880 
881  enum SetHomeLocation : RawRetCodeType
882  {
883  SET_HOME_LOCATION_SUCCESS = 0,
884  SET_HOME_LOCATION_FAIL = 1,
885  };
886 
887  }; // Control class
888 
896  class SubscribeACK {
897  public:
898  const static uint8_t SUCCESS;
899  const static uint8_t ILLEGAL_DATA_LENGTH;
900  const static uint8_t VERSION_DOES_NOT_MATCH;
901  const static uint8_t PACKAGE_OUT_OF_RANGE;
902  const static uint8_t PACKAGE_ALREADY_EXISTS;
903  const static uint8_t PACKAGE_DOES_NOT_EXIST;
904  const static uint8_t ILLEGAL_FREQUENCY;
905  const static uint8_t PACKAGE_TOO_LARGE;
906  const static uint8_t PIPELINE_OVERFLOW;
907  const static uint8_t INTERNAL_ERROR_0X09;
908  const static uint8_t PACKAGE_EMPTY;
909  const static uint8_t INCORRECT_NUM_OF_TOPICS;
910  const static uint8_t ILLEGAL_UID;
911  const static uint8_t PERMISSION_DENY;
912  const static uint8_t MULTIPLE_SUBSCRIBE;
913  const static uint8_t SOURCE_DEVICE_OFFLINE;
914  const static uint8_t PAUSED;
915  const static uint8_t RESUMED;
916  const static uint8_t INTERNAL_ERROR_0X4A;
917  const static uint8_t FAILED_AUTHENTICATION;
918  const static uint8_t VERSION_VERSION_TOO_FAR;
919  const static uint8_t VERSION_UNKNOWN_ERROR;
920  const static uint8_t INTERNAL_ERROR_0XFF;
921  };
922 
928  class MissionACK {
929  public:
933  typedef struct Common {
934  const static uint8_t SUCCESS;
935  const static uint8_t WRONG_WAYPOINT_INDEX;
936  const static uint8_t RC_NOT_IN_MODE_F;
937  const static uint8_t OBTAIN_CONTROL_REQUIRED;
938  const static uint8_t CLOSE_IOC_REQUIRED;
939  const static uint8_t NOT_INITIALIZED;
940  const static uint8_t NOT_RUNNING;
941  const static uint8_t IN_PROGRESS;
944  const static uint8_t TASK_TIMEOUT;
945  const static uint8_t OTHER_MISSION_RUNNING;
947  const static uint8_t BAD_GPS;
948  const static uint8_t RTK_NOT_READY;
951  const static uint8_t LOW_BATTERY;
952  const static uint8_t VEHICLE_DID_NOT_TAKE_OFF;
953  const static uint8_t INVALID_PARAMETER;
961  const static uint8_t CONDITIONS_NOT_SATISFIED;
962  const static uint8_t CROSSING_NO_FLY_ZONE;
964  const static uint8_t UNRECORDED_HOME;
965  const static uint8_t AT_NO_FLY_ZONE;
968  const static uint8_t TOO_HIGH;
970  const static uint8_t TOO_LOW;
971  const static uint8_t TOO_FAR_FROM_HOME;
973  const static uint8_t NOT_SUPPORTED;
976  const static uint8_t TOO_FAR_FROM_CURRENT_POSITION;
977  const static uint8_t BEGGINER_MODE_NOT_SUPPORTED;
978  const static uint8_t TAKE_OFF_IN_PROGRESS;
979  const static uint8_t LANDING_IN_PROGRESS;
980  const static uint8_t RRETURN_HOME_IN_PROGRESS;
981  const static uint8_t START_MOTORS_IN_PROGRESS;
982  const static uint8_t INVALID_COMMAND;
983  const static uint8_t UNKNOWN_ERROR;
984  } Common;
985 
987  typedef struct Follow {
988  const static uint8_t TOO_FAR_FROM_YOUR_POSITION_LACK_OF_RADIO_CONNECTION;
989  const static uint8_t CUTOFF_TIME_OVERFLOW;
990  const static uint8_t GIMBAL_PITCH_ANGLE_OVERFLOW;
991  } Follow;
992 
994  typedef struct HotPoint {
995  const static uint8_t INVALID_RADIUS;
996  const static uint8_t YAW_RATE_OVERFLOW;
997  /*
998  * Start point given by user during HotPoint mission initialization is
999  * invalid.
1000  * Available options are :
1001  * 0 - North to the HP
1002  * 1 - South
1003  * 2 - West
1004  * 3 - East
1005  * 4 - Nearest Point
1006  */
1007  const static uint8_t INVALID_START_POINT;
1008  const static uint8_t INVALID_YAW_MODE;
1009  const static uint8_t TOO_FAR_FROM_HOTPOINT;
1010  const static uint8_t INVALID_PAREMETER;
1011  const static uint8_t INVALID_LATITUDE_OR_LONGITUTE;
1012  const static uint8_t INVALID_DIRECTION;
1013  const static uint8_t IN_PAUSED_MODE;
1014  const static uint8_t FAILED_TO_PAUSE;
1015  } HotPoint;
1016 
1018  typedef struct WayPoint {
1019  const static uint8_t INVALID_DATA;
1020  const static uint8_t INVALID_POINT_DATA;
1021  const static uint8_t TRACE_TOO_LONG;
1022  const static uint8_t TOTAL_DISTANCE_TOO_LONG;
1023  const static uint8_t POINT_OVERFLOW;
1024  const static uint8_t POINTS_TOO_CLOSE;
1025  const static uint8_t POINTS_TOO_FAR;
1026  const static uint8_t CHECK_FAILED;
1027  const static uint8_t INVALID_ACTION;
1028  const static uint8_t POINT_DATA_NOT_ENOUGH;
1029  const static uint8_t DATA_NOT_ENOUGH;
1030  const static uint8_t POINTS_NOT_ENOUGH;
1031  const static uint8_t IN_PROGRESS;
1032  const static uint8_t NOT_IN_PROGRESS;
1033  const static uint8_t INVALID_VELOCITY;
1034  // Backward Compatibility
1035  const static uint8_t& DISTANCE_OVERFLOW __attribute__((deprecated));
1036  const static uint8_t& TIMEOUT __attribute__((deprecated));
1037  } WayPoint;
1038 
1040  typedef struct IOC {
1041  const static uint8_t TOO_CLOSE_TO_HOME;
1042  const static uint8_t UNKNOWN_TYPE;
1043  } IOC;
1044 
1045  }; // Class Mission
1046 
1047  class WaypointV2ACK{
1048  public:
1049 /* The enum that defines the detail error code of common module */
1050  enum WaypointV2ErrorCodeCommon
1051  {
1052  GS_ERR_CODE_COMMON_SUCCESS = 0x00000,
1053  GS_ERR_CODE_COMMON_INVALID_DATA_LENGTH = 0x00001,
1054  GS_ERR_CODE_COMMON_INVALD_FLOAT_NUM = 0x00002,
1055  GS_ERR_CODE_TRAJ_WP_VERSION_NO_MATCH = 0x00003,
1056  GS_ERR_CODE_COMMON_UNKNOWN = 0x0ffff,
1057  } ;
1058 
1059 /* The enum that defines the detail error code of flight-trajectory module */
1060  enum WaypointV2ErrorCodeTraj
1061  {
1062  GS_ERR_CODE_TRAJ_RESV = 0x10000,
1063  GS_ERR_CODE_TRAJ_INIT_WP_NUM_TOO_MANY = 0x10001,
1064  GS_ERR_CODE_TRAJ_INIT_WP_NUM_TOO_FEW = 0x10002,
1065  GS_ERR_CODE_TRAJ_INIT_INVALID_END_INDEX = 0x10003,
1066  GS_ERR_CODE_TRAJ_UPLOAD_START_ID_GT_END_ID = 0x10004,
1067  GS_ERR_CODE_TRAJ_UPLOAD_END_ID_GT_TOTAL_NUM = 0x10005,
1068  GS_ERR_CODE_TRAJ_DOWNLOAD_WPS_NOT_IN_STORED_RAGNE = 0x10006,
1069  GS_ERR_CODE_TRAJ_CUR_POS_IS_FAR_AWAY_FROM_FIRST_WP = 0x10008,
1070  GS_ERR_CODE_TRAJ_ADJ_WPS_TOO_CLOSE = 0x1000a,
1071  GS_ERR_CODE_TRAJ_ADJ_WPS_TOO_FAR = 0x1000b,
1072  GS_ERR_CODE_TRAJ_UPLOAD_MAX_VEL_GT_GLOBAL = 0x1000c,
1073  GS_ERR_CODE_TRAJ_UPLOAD_LOCAL_CRUISE_VEL_GT_LOCAL_MAX = 0x1000d,
1074  GS_ERR_CODE_TRAJ_UPLOAD_LOCAL_CRUISE_VEL_GT_GLOBAL_MAX = 0x1000e,
1075  GS_ERR_CODE_TRAJ_INIT_INVALID_GLOBAL_MAX_VEL = 0x1000f,
1076  GS_ERR_CODE_TRAJ_GLOBAL_CRUISE_VEL_GT_MAX_VEL = 0x10010,
1077  GS_ERR_CODE_TRAJ_INIT_INVALID_GOTO_FIRST_FLAG = 0x10011,
1078  GS_ERR_CODE_TRAJ_INIT_INVALID_FINISHED_ACTION = 0x10012,
1079  GS_ERR_CODE_TRAJ_INIT_INVALID_RC_LOST_ACTION = 0x10013,
1080  GS_ERR_CODE_TRAJ_UPLOAD_YAW_MODE_INVALID = 0x10014,
1081  GS_ERR_CODE_TRAJ_UPLOAD_YAW_CMD_NOT_IN_RANGE = 0x10015,
1082  GS_ERR_CODE_TRAJ_UPLOAD_YAW_TURN_DIRECTION_INVALID = 0x10016,
1083  GS_ERR_CODE_TRAJ_UPLOAD_WP_TYPE_INVALID = 0x10017,
1084  GS_ERR_CODE_TRAJ_GO_STOP_CMD_INVALID = 0x10018,
1085  GS_ERR_CODE_TRAJ_INVALID_PAUSE_RECOVERY_CMD = 0x10019,
1086  GS_ERR_CODE_TRAJ_INVALID_BREAK_RESTORE_CMD = 0x1001a,
1087  GS_ERR_CODE_TRAJ_INIT_INVALID_REF_POINT = 0x1001b,
1088  GS_ERR_CODE_TRAJ_UPLOAD_CANNT_SET_WP_LINE_EXIT_TYPE = 0x1001d,
1089  GS_ERR_CODE_TRAJ_DAMPING_DIS_GE_DIS_OF_ADJ_POINTS = 0x1001c,
1090  GS_ERR_CODE_TRAJ_INIT_INFO_NOT_UPLOADED = 0x1001e,
1091  GS_ERR_CODE_TRAJ_WP_HAS_NOT_UPLOADED = 0x1001f,
1092  GS_ERR_CODE_TRAJ_UPLOADED_WP_NOT_ENOUGH = 0x10020,
1093  GS_ERR_CODE_TRAJ_GS_HAS_STARTED = 0x10021,
1094  GS_ERR_CODE_TRAJ_GS_NOT_RUNNING = 0x10022,
1095  GS_ERR_CODE_TRAJ_GS_NOT_RUNNING_FOR_PAUSE_RECOVERY = 0x10023,
1096  GS_ERR_CODE_TRAJ_GS_NOT_RUNNING_FOR_BREAK_RESTORE = 0x10024,
1097  GS_ERR_CODE_TRAJ_NOT_IN_WP_MIS = 0x10025,
1098  GS_ERR_CODE_TRAJ_MIS_HAS_BEEN_PAUSED = 0x10026,
1099  GS_ERR_CODE_TRAJ_MIS_NOT_PAUSED = 0x10027,
1100  GS_ERR_CODE_TRAJ_MIS_HAS_BEEN_BROKEN = 0x10028,
1101  GS_ERR_CODE_TRAJ_MIS_NOT_BROKEN = 0x10029,
1102  GS_ERR_CODE_TRAJ_PAUSE_RECOVERY_NOT_SUPPORTED = 0x1002a,
1103  GS_ERR_CODE_TRAJ_BREAK_RESTORE_NOT_SUPPORTED = 0x1002b,
1104  GS_ERR_CODE_TRAJ_NO_BREAK_POINT = 0x1002c,
1105  GS_ERR_CODE_TRAJ_NO_CUR_TRAJ_PROJECT = 0x1002d,
1106  GS_ERR_CODE_TRAJ_NO_NXT_TRAJ_PROJECT = 0x1002e,
1107  GS_ERR_CODE_TRAJ_NO_NNT_TRAJ_PROJECT = 0x1002f,
1108  GS_ERR_CODE_TRAJ_UPLOAD_WP_ID_NOT_CONTINUE = 0x10030,
1109  GS_ERR_CODE_TRAJ_WP_LINE_ENTER_NOT_SET_TO_START_WP = 0x10031,
1110  GS_ERR_CODE_TRAJ_INIT_WP_WHEN_PLAN_HAS_STARTED = 0x10032,
1111  GS_ERR_CODE_TRAJ_DAMPING_DIS_EXCEED_RANGE = 0x10033,
1112  GS_ERR_CODE_TRAJ_WAYPOINT_COOR_EXCEED_RANGE = 0x10034,
1113  GS_ERR_CODE_TRAJ_FIRST_WP_TYPE_IS_WP_TURN_NO = 0x10035,
1114  GS_ERR_CODE_TRAJ_WP_EXCEED_RADIUS_LIMIT = 0x10038,
1115  GS_ERR_CODE_TRAJ_WP_EXCEED_HEIGHT_LIMIT = 0x10039,
1116  } ;
1117 
1118 /* The enum that defines the detail error code of flight-status module */
1119  enum WaypointV2ErrorCodeStatus
1120  {
1121  GS_ERR_CODE_STATUS_RESV = 0x20000,
1122  GS_ERR_CODE_STATUS_WP_MIS_CHECK_FAIL = 0x20001,
1123  GS_ERR_CODE_STATUS_HOME_NOT_RECORDED = 0x20002,
1124  GS_ERR_CODE_STATUS_LOW_LOCATION_ACCURACY = 0x20003,
1125  GS_ERR_CODE_STATUS_RTK_CONDITION_IS_NOT_READY = 0x20005,
1126  } ;
1127 
1128 /* The enum that defines the detail error code of flight-secure module */
1129  enum WaypointV2ErrorCodeSecure
1130  {
1131  GS_ERR_CODE_SECURE_RESV = 0x30000,
1132  GS_ERR_CODE_SECURE_CROSS_NFZ = 0x30001,
1133  GS_ERR_CODE_SECURE_BAT_LOW = 0x30002,
1134  } ;
1135 
1136 /* The enum that defines the detail error code of action-common module */
1137  enum WaypointV2ErrorCodeActionCommon
1138  {
1139  GS_ERR_CODE_ACTION_COMMON_RESV = 0x400000,
1140  GS_ERR_CODE_ACTION_COMMON_ACTION_ID_DUPLICATED = 0x400001,
1141  GS_ERR_CODE_ACTION_COMMON_ACTION_ITEMS_SPACE_NOT_ENOUGH = 0x400002,
1142  GS_ERR_CODE_ACTION_COMMON_ACTION_SIZE_GT_BUF_SIZE = 0x400003,
1143  GS_ERR_CODE_ACTION_COMMON_ACTION_ID_NOT_FOUND = 0x400004,
1144  GS_ERR_CODE_ACTION_COMMON_DOWNLOAD_ACTION_ID_RANGE_ERROR = 0x400005,
1145  GS_ERR_CODE_ACTION_COMMON_NO_ACTION_ITEMS_STORED = 0x400006,
1146  } ;
1147 
1148 /* The enum that defines the detail error code of trigger module */
1149  enum WaypointV2ErrorCodeTriggerModule
1150  {
1151  GS_ERR_CODE_TRIGGER_RESV = 0x410000,
1152  GS_ERR_CODE_TRIGGER_TYPE_INVALID = 0x410001,
1153  GS_ERR_CODE_TRIGGER_REACH_WP_END_INDEX_LT_START_INDEX = 0x410021,
1154  GS_ERR_CODE_TRIGGER_REACH_WP_INVALID_INTERVAL_WP_NUM = 0x410022,
1155  GS_ERR_CODE_TRIGGER_REACH_WP_INVALID_AUTO_TERMINATE_WP_NUM = 0x410023,
1156  GS_ERR_CODE_TRIGGER_ASSOCIATE_INVALID_TYPE = 0x410041,
1157  GS_ERR_CODE_TRIGGER_SIMPLE_INTERVAL_INVALID_TYPE = 0x410081,
1158  } ;
1159 
1160 /* The enum that defines the detail error code of actuator-common module */
1161  enum WaypointV2ErrorCodeActuatorCommon
1162  {
1163  GS_ERR_CODE_ACTUATOR_COMMON_RESV = 0x420000,
1164  GS_ERR_CODE_ACTUATOR_COMMON_ACTUATOR_EXEC_NON_SUPPORTED = 0x420001,
1165  GS_ERR_CODE_ACTUATOR_COMMON_ACTUATOR_TYPE_INVALID = 0x420002,
1166  GS_ERR_CODE_ACTUATOR_COMMON_ACTUATOR_FUNC_INVALID = 0x420003,
1167  } ;
1168 
1169 /* The enum that defines the detail error code of action-camera module */
1170  enum WaypointV2ErrorCodeActuatorCamera
1171  {
1172  GS_ERR_CODE_ACTUATOR_CAMERA_RESV = 0x430000,
1173  GS_ERR_CODE_ACTUATOR_CAMERA_SEND_SINGLE_SHOT_CMD_TO_CAMERA_FAIL = 0x430001,
1174  GS_ERR_CODE_ACTUATOR_CAMERA_SEND_VIDEO_START_CMD_TO_CAMERA_FAIL = 0x430002,
1175  GS_ERR_CODE_ACTUATOR_CAMERA_SEND_VIDEO_STOP_CMD_TO_CAMERA_FAIL = 0x430003,
1176  GS_ERR_CODE_ACTUATOR_CAMERA_FOCUS_PARAM_XY_INVALID = 0x430004,
1177  GS_ERR_CODE_ACTUATOR_CAMERA_SEND_FOCUS_CMD_TO_CAMERA_FAIL = 0x430005,
1178  GS_ERR_CODE_ACTUATOR_CAMERA_SEND_FOCALIZE_CMD_TO_CAMERA_FAIL = 0x430006,
1179  GS_ERR_CODE_ACTUATOR_CAMERA_FOCAL_DISTANCE_INVALID = 0x430007,
1180  GS_ERR_CODE_ACTUATOR_CAMERA_EXEC_FAIL = 0x430100,
1184  } ;
1185 
1186 /* The enum that defines the detail error code of action-gimbal module */
1187  enum WaypointV2ErrorCodeActuatorGimbal
1188  {
1189  GS_ERR_CODE_ACTUATOR_GIMBAL_RESV = 0x440000,
1190  GS_ERR_CODE_ACTUATOR_GIMBAL_INVALID_RPY_ANGLE_CTRL_CMD = 0x440001,
1191  GS_ERR_CODE_ACTUATOR_GIMBAL_INVALID_DURATION_CMD = 0x440002,
1192  GS_ERR_CODE_ACTUATOR_GIMBAL_FAIL_TO_ARRIVE_TGT_ANGLE = 0x440003,
1193  GS_ERR_CODE_ACTUATOR_GIMBAL_FAIL_TO_SEND_CMD_TO_GIMBAL = 0x440004,
1194  GS_ERR_CODE_ACTUATOR_GIMBAL_THIS_INDEX_OF_GIMBAL_NOT_DOING_UNIFORM_CTRL = 0x440005,
1195  } ;
1196 
1197 /* The enum that defines the detail error code of action-flight module */
1198  enum WaypointV2ErrorCodeActuatorFlight
1199  {
1200  GS_ERR_CODE_ACTUATOR_FLIGHT_RESV = 0x460000,
1201  GS_ERR_CODE_ACTUATOR_FLIGHT_YAW_INVALID_YAW_ANGLE = 0x460001,
1202  GS_ERR_CODE_ACTUATOR_FLIGHT_YAW_TO_TGT_ANGLE_TIMEOUT = 0x460002,
1203  GS_ERR_CODE_ACTUATOR_FLIGHT_ACTION_YAW_OCCUPIED = 0x460003,
1204  GS_ERR_CODE_ACTUATOR_FLIGHT_CUR_AND_TGT_VEL_CLE_STATUE_EQUAL = 0x460004,
1205  } ;
1206 
1207  enum WaypointV2ErrorCodeActuatorPayload
1208  {
1209  GS_ERR_CODE_ACTUATOR_PAYLOAD_RESV = 0x470000,
1210  GS_ERR_CODE_ACTUATOR_PAYLOAD_FAIL_TO_SEND_CMD_TO_PAYLOAD = 0x470001,
1211  GS_ERR_CODE_ACTUATOR_PAYLOAD_EXEC_FAILED = 0x470002,
1212  } ;
1213 
1214  };
1215 
1222  class MFIOACK {
1223  public:
1227  typedef struct init {
1228  const static uint8_t SUCCESS;
1229  const static uint8_t UNKNOWN_ERROR;
1230  const static uint8_t PORT_NUMBER_ERROR;
1231  const static uint8_t PORT_MODE_ERROR;
1232  const static uint8_t PORT_DATA_ERROR;
1233  } init;
1234 
1238  typedef struct set {
1239  const static uint8_t SUCCESS;
1241  const static uint8_t CHANNEL_ERROR;
1243  const static uint8_t PORT_NOT_MAPPED_ERROR;
1244  } set;
1245 
1249  typedef struct get {
1250  const static uint8_t SUCCESS;
1251  } get;
1252 
1253  }; // Class MFIO
1254 
1255 
1257  SUCCESS = 0x00,
1270  TIMEOUT = 0xE1,
1278  SD_CARD_FULL = 0xE9,
1279  SD_CARD_ERROR = 0xEA,
1280  SENSOR_ERROR = 0xEB,
1281  SYSTEM_ERROR = 0xEC,
1284  USER_UNBOND = 0xEF,
1301  };
1302  private:
1303  static const uint8_t moduleIDLeftMove = 40;
1304  static const uint8_t functionIDLeftMove = 32;
1305 
1308  static const std::pair<const ErrorCode::ErrorCodeType, ErrorCode::ErrorCodeMsg> PSDKCommonErrData[];
1309 
1312  static const ErrorCodeMapType getPSDKCommonErrorMap();
1313 
1316  static const std::pair<const ErrorCode::ErrorCodeType, ErrorCode::ErrorCodeMsg> CameraCommonErrData[];
1317 
1320  static const ErrorCodeMapType getCameraCommonErrorMap();
1321 
1324  static const std::pair<const ErrorCode::ErrorCodeType, ErrorCode::ErrorCodeMsg> GimbalCommonErrData[];
1325 
1328  static const ErrorCodeMapType getGimbalCommonErrorMap();
1329 
1332  static const std::pair<const ErrorCode::ErrorCodeType, ErrorCode::ErrorCodeMsg> SystemCommonErrData[];
1333 
1336  static const ErrorCodeMapType getWaypointV2CommonErrorMap();
1337 
1338  static const std::pair<const ErrorCode::ErrorCodeType, ErrorCode::ErrorCodeMsg> WaypointV2CommonErrData[];
1339 
1340 
1343  static const ErrorCodeMapType getSystemCommonErrorMap();
1344 
1347  static const FunctionDataType GimbalFunction[functionMaxCnt];
1348 
1351  static const FunctionDataType CameraFunction[functionMaxCnt];
1352 
1355  static const FunctionDataType PSDKFunction[functionMaxCnt];
1356 
1359  static const FunctionDataType SystemFunction[functionMaxCnt];
1360 
1361  static const FunctionDataType WaypointV2Function[functionMaxCnt];
1364  static const ModuleDataType module[ModuleMaxCnt];
1365 
1366 
1367 }; // Class ErrorCode
1368 
1369 } // namespace OSDK
1370 } // namespace DJI
1371 
1372 #endif /* DJI_ERROR_H */
camera api error code
Definition: dji_error.hpp:318
static const uint8_t MOTOR_FAIL_ESC_UNBALANCE_ON_GRD
Definition: dji_error.hpp:711
static const uint8_t MOTOR_FAIL_TAKEOFF_EXCEPTION
Definition: dji_error.hpp:707
static const uint8_t MOTOR_FAIL_BAT_ERR
Definition: dji_error.hpp:771
system releated error code
Definition: dji_error.hpp:348
CMDID: SetControl.
Definition: dji_error.hpp:813
static const uint8_t MOTOR_FAIL_IMU_PREHEATING
Definition: dji_error.hpp:542
static const uint8_t functionMaxCnt
Function max count of each module.
Definition: dji_error.hpp:64
Definition: dji_error.hpp:1283
static const uint8_t MOTOR_FAIL_TOPOLOGY_ABNORMAL
Definition: dji_error.hpp:660
Common ACK Error Codes.
Definition: dji_error.hpp:491
static const uint8_t PORT_NOT_MAPPED_ERROR
Definition: dji_error.hpp:1243
static ErrorCode::RawRetCodeType getRawRetCode(ErrorCodeType errCode)
Get the raw reture code from errCode.
Definition: dji_error.cpp:961
CMDID: Task.
Definition: dji_error.hpp:829
struct DJI::OSDK::ErrorCode::ControlACK::SetArm SetArm
CMDID: SetArm supported in products with firmware version < 3.3.
static const uint8_t MOTOR_FAIL_BATTERY_VOLTAGE_TOO_LOW
Definition: dji_error.hpp:554
static const uint8_t MOTOR_FAIL_CRAFT_FAIL_LATELY
Definition: dji_error.hpp:778
Definition: dji_error.hpp:1270
static const uint8_t MOTOR_FAIL_COMPASS_ABNORMAL
Definition: dji_error.hpp:514
static const uint8_t MOTOR_FAIL_FLASH_UNLOCK
Definition: dji_error.hpp:765
static const uint8_t MOTOR_FAIL_ESC_NEED_UPGRADE
Definition: dji_error.hpp:757
static const uint8_t TOO_HIGH
Definition: dji_error.hpp:968
Definition: dji_error.hpp:1276
static const uint8_t MOTOR_FAIL_INVALID_PRODUCT
Definition: dji_error.hpp:619
static const uint8_t MOTOR_FAIL_FLASH_OPERATING
Definition: dji_error.hpp:611
static const uint8_t MOTOR_FAIL_BATTERY_COMMUNICATION_ERROR
Definition: dji_error.hpp:552
static const uint8_t MOTOR_FAIL_RC_CALI_DATA_OUT_RANGE
Definition: dji_error.hpp:638
WayPoint Mission ACK Error Code.
Definition: dji_error.hpp:1018
static const uint8_t MOTOR_FAIL_GIMBAL_PITCH_SHOCK
Definition: dji_error.hpp:696
static const uint8_t MOTOR_FAIL_RUNNING_SIMULATOR
Definition: dji_error.hpp:566
static const uint8_t MOTOR_FAIL_TAKEOFF_TILT_TOO_LARGE
Definition: dji_error.hpp:595
int64_t ErrorCodeType
Unified error type.
Definition: dji_error.hpp:144
Definition: dji_error.hpp:135
struct DJI::OSDK::ErrorCode::MissionACK::IOC IOC
IOC ACK Mission Error Code.
Definition: dji_error.hpp:1290
PSDK module.
Definition: dji_psdk_module.hpp:43
struct DJI::OSDK::ErrorCode::ControlACK::Task Task
CMDID: Task.
static const uint8_t TAKEOFF_HEIGHT_EXCEPTION
Definition: dji_error.hpp:755
static const uint8_t CHANNEL_ERROR
Definition: dji_error.hpp:1241
DJI_CMD_RETURN_CODE
Definition: dji_error.hpp:1256
IOC ACK Mission Error Code.
Definition: dji_error.hpp:1040
static const uint8_t BAD_GPS
Definition: dji_error.hpp:947
static const uint8_t MOTOR_FAIL_FORCE_DISABLE
Definition: dji_error.hpp:751
CMDID: get.
Definition: dji_error.hpp:1249
Definition: dji_error.hpp:133
struct DJI::OSDK::ErrorCode::MFIOACK::init init
CMDID: init.
static const uint8_t MOTOR_FAIL_COMPASS_IMU_MISALIGN
Definition: dji_error.hpp:763
struct DJI::OSDK::ErrorCode::ControlACK::SetControl SetControl
CMDID: SetControl.
static const ErrorCodeType InvalidCMD
Definition: dji_error.hpp:320
static constexpr ErrorCodeType getErrorCode(ModuleIDType moduleID, FunctionIDType functionID, RawRetCodeType rawRetCode)
Build error code.
Definition: dji_error.hpp:181
static const ErrorCodeType Success
Definition: dji_error.hpp:350
static const uint8_t MOTOR_FAIL_SOME_MODULE_NOT_CONFIGURED
Definition: dji_error.hpp:649
Definition: dji_error.hpp:1294
static const uint8_t MOTOR_FAIL_IMU_NO_ATTITUDE
Definition: dji_error.hpp:546
SYSTEM_ERROR_RAW_CODE
Definition: dji_error.hpp:131
static const uint8_t MOTOR_FAIL_BATTERY_SMART_LOW_LAND
Definition: dji_error.hpp:561
CMDID: init.
Definition: dji_error.hpp:1227
static const uint8_t MOTOR_FAIL_GIMBAL_YAW_SHOCK
Definition: dji_error.hpp:702
static const uint8_t MOTOR_FAIL_GIMBAL_GYRO_ABNORMAL
Definition: dji_error.hpp:682
FCFunctionID
Function ID used with FCModule in error codes.
Definition: dji_error.hpp:96
Definition: dji_error.hpp:137
static const uint8_t MOTOR_FAIL_BAT_VERSION_ERR
Definition: dji_error.hpp:729
struct DJI::OSDK::ErrorCode::MissionACK::WayPoint WayPoint
WayPoint Mission ACK Error Code.
Definition: dji_error.hpp:138
static const uint8_t MOTOR_FAIL_INVALID_SN
Definition: dji_error.hpp:607
CameraModule of PayloadNode.
Definition: dji_camera_module.hpp:41
static const ErrorCodeType InvalidCMD
Definition: dji_error.hpp:290
uint8_t FunctionIDType
Function ID type used in OnboardSDK Unified error.
Definition: dji_error.hpp:56
gimbal api error code
Definition: dji_error.hpp:288
static const uint8_t MOTOR_FAIL_NS_ABNORMAL
Definition: dji_error.hpp:656
Definition: dji_error.hpp:1269
static const uint8_t MOTOR_FAIL_GIMBAL_ESC_ROLL_NO_DATA
Definition: dji_error.hpp:686
static const uint8_t UNRECORDED_HOME
Definition: dji_error.hpp:964
Definition: dji_error.hpp:1277
static const uint8_t MOTOR_FAIL_ESC_CALIBRATING
Definition: dji_error.hpp:744
Definition: dji_error.hpp:1281
CMDSet: Activation ACK Error Codes.
Definition: dji_error.hpp:790
static ErrorCodeMsg getErrorCodeMsg(int64_t errCode)
Get error code messages from errCode.
Definition: dji_error.cpp:913
static const uint8_t MOTOR_FAIL_NOT_ACTIVATED
Definition: dji_error.hpp:574
static const uint8_t MOTOR_FAIL_RC_NEED_CALI
Definition: dji_error.hpp:662
Definition: dji_error.hpp:1279
static const uint8_t MOTOR_FAIL_APP_NOT_ALLOW
Definition: dji_error.hpp:761
uint8_t ModuleIDType
Module ID type used in OnboardSDK Unified error.
Definition: dji_error.hpp:52
Definition: dji_error.hpp:1291
static const uint8_t MOTOR_FAIL_IMU_BIAS_LIMIT
Definition: dji_error.hpp:579
static const uint8_t MOTOR_FAIL_IMU_NEED_ADV_CALIBRATION
Definition: dji_error.hpp:537
static const uint8_t MOTOR_FAIL_WRONG_AIRCRAFT_TYPE
Definition: dji_error.hpp:647
Definition: dji_error.hpp:1300
struct DJI::OSDK::ErrorCode::MFIOACK::get get
CMDID: get.
HotPoint Mission ACK Error Code.
Definition: dji_error.hpp:994
Mission ACK Error Codes.
Definition: dji_error.hpp:928
static const uint8_t MOTOR_FAIL_GIMBAL_ROLL_SHOCK
Definition: dji_error.hpp:699
static void printErrorCodeMsg(int64_t errCode)
Print error code messages to console.
Definition: dji_error.cpp:933
static const ErrorCodeType InvalidCMD
Definition: dji_error.hpp:260
static ErrorCode::FunctionIDType getFunctionID(ErrorCodeType errCode)
Get the function name from errCode.
Definition: dji_error.cpp:957
static const uint8_t MOTOR_FAIL_ESC_PART_EMPTY_ON_GRD
Definition: dji_error.hpp:714
static const uint8_t MOTOR_FAIL_IMU_CALI_SUCCESS
Definition: dji_error.hpp:704
static const uint8_t MOTOR_FAIL_M600_BAT_TOO_FEW
Definition: dji_error.hpp:668
static const uint8_t MOTOR_FAIL_UPGRADING
Definition: dji_error.hpp:587
Definition: dji_error.hpp:1298
Definition: dji_error.hpp:1297
static const uint8_t MOTOR_FAIL_BATTERY_CELL_ERROR
Definition: dji_error.hpp:550
static const uint8_t MOTOR_FAIL_GIMBAL_FIRM_IS_UPDATING
Definition: dji_error.hpp:691
Definition: dji_error.hpp:134
Definition: dji_error.hpp:1288
static const uint8_t MOTOR_FAIL_PACK_MODE
Definition: dji_error.hpp:568
Definition: dji_error.hpp:1278
Definition: dji_error.hpp:1289
CMDSet: Control ACK Error Codes.
Definition: dji_error.hpp:808
static const uint8_t MOTOR_FAIL_IMU_INITING
Definition: dji_error.hpp:585
Definition: dji_error.hpp:136
static const uint8_t MOTOR_FAIL_DEVICE_LOCKED
Definition: dji_error.hpp:519
Definition: dji_error.hpp:1284
Definition: dji_error.hpp:1259
static const uint8_t MOTOR_FAIL_RECORDER_ERROR
Definition: dji_error.hpp:617
static ErrorCode::ModuleIDType getModuleID(ErrorCodeType errCode)
Get the module ID from errCode.
Definition: dji_error.cpp:944
static const uint8_t MOTOR_FAIL_INVALID_VERSION
Definition: dji_error.hpp:680
struct DJI::OSDK::ErrorCode::MissionACK::Follow Follow
Follow Mission ACK Error Code.
static const uint8_t MOTOR_FAIL_IMU_SN_ERROR
Definition: dji_error.hpp:539
ModuleID
Module ID used in OnboardSDK Unified error.
Definition: dji_error.hpp:67
static const uint8_t MOTOR_FAIL_M600_BAT_AUTH_ERR
Definition: dji_error.hpp:671
Definition: dji_error.hpp:1295
static const uint8_t MOTOR_FAIL_ESC_STALL_NEAR_GOUND
Definition: dji_error.hpp:709
static const uint8_t MOTOR_FAIL_NO_GPS_IN_NOVICE_MODE
Definition: dji_error.hpp:548
static const uint8_t IMPACT_IS_DETECTED
Definition: dji_error.hpp:774
Releated messages about error codes.
Definition: dji_error.hpp:148
static const uint8_t KILL_SWITCH_ON
Definition: dji_error.hpp:780
static const uint8_t MOTOR_FAIL_MODE_FAILURE
Definition: dji_error.hpp:776
static const uint8_t MOTOR_FAIL_BATTERY_USER_LOW_LAND
Definition: dji_error.hpp:556
static const uint8_t TRACE_TOO_LONG
Definition: dji_error.hpp:1021
static const uint8_t TOO_FAR_FROM_CURRENT_POSITION
Definition: dji_error.hpp:976
static const uint8_t MOTOR_FAIL_BATTERY_NOT_READY
Definition: dji_error.hpp:564
static const uint8_t MOTOR_FAIL_ESC_SCREAMING
Definition: dji_error.hpp:767
struct DJI::OSDK::ErrorCode::MissionACK::Common Common
Common Mission ACK codes.
SystemFunctionID
Function ID used with SystemModule in error codes.
Definition: dji_error.hpp:91
Definition: dji_error.hpp:1262
Definition: dji_error.hpp:1257
static const uint8_t MOTOR_FAIL_M600_BAT_DIF_VOLT_LARGE_1
Definition: dji_error.hpp:677
Follow Mission ACK Error Code.
Definition: dji_error.hpp:987
static const uint8_t MOTOR_FAIL_COMPASS_CALIBRATING
Definition: dji_error.hpp:544
Common Mission ACK codes.
Definition: dji_error.hpp:933
Definition: dji_error.hpp:1275
static const uint8_t MOTOR_FAIL_ENGINE_START_FAILED
Definition: dji_error.hpp:721
static const uint8_t MOTOR_FAIL_M600_BAT_COMM_ERR
Definition: dji_error.hpp:674
static const uint8_t MOTOR_FAIL_AUTO_TAKEOFF_LAUNCH_FAILED
Definition: dji_error.hpp:724
static const uint8_t MOTOR_FAIL_IN_FLYLIMIT_AREA
Definition: dji_error.hpp:576
static const uint8_t MOTOR_FAIL_INVALID_FLOAT
Definition: dji_error.hpp:664
struct DJI::OSDK::ErrorCode::MissionACK::HotPoint HotPoint
HotPoint Mission ACK Error Code.
GimbalFunctionID
Function ID used with GimbalModule in error codes.
Definition: dji_error.hpp:116
static const uint8_t CONDITIONS_NOT_SATISFIED
Definition: dji_error.hpp:961
static const uint8_t TASK_TIMEOUT
Definition: dji_error.hpp:944
static const uint8_t MOTOR_FAIL_HAVE_RUN_SIM
Definition: dji_error.hpp:589
static const uint8_t MOTOR_FAIL_RTK_INITING
Definition: dji_error.hpp:731
static const char * getModuleName(ErrorCodeType errCode)
Get the module name from errCode.
Definition: dji_error.cpp:948
static const uint8_t MOTOR_FAIL_MOTOR_CODE_ERROR
Definition: dji_error.hpp:782
static const uint8_t MOTOR_FAIL_RC_CALIBRATING
Definition: dji_error.hpp:636
Definition: dji_ack.cpp:38
static const uint8_t MOTOR_FAIL_IMU_ATTI_LIMIT
Definition: dji_error.hpp:572
static const uint8_t LOW_BATTERY
Definition: dji_error.hpp:951
Definition: dji_error.hpp:1271
Definition: dji_error.hpp:139
PSDKFunctionID
Function ID used with PSDKModule in error codes.
Definition: dji_error.hpp:122
static const uint8_t MOTOR_FAIL_ASSISTANT_PROTECTED
Definition: dji_error.hpp:517
static const uint8_t MOTOR_FAIL_IMU_CALIBRATING
Definition: dji_error.hpp:592
struct DJI::OSDK::ErrorCode::MFIOACK::set set
CMDID: set.
gimbal module
Definition: dji_gimbal_module.hpp:45
static const uint8_t MOTOR_FAIL_RTK_FAIL_TO_INIT
Definition: dji_error.hpp:733
camera api error code
Definition: dji_error.hpp:258
static const uint8_t MOTOR_FAIL_GIMBAL_ESC_PITCH_NO_DATA
Definition: dji_error.hpp:684
static const uint8_t NOT_SUPPORTED
Definition: dji_error.hpp:973
static const uint8_t MOTOR_FAIL_GYRO_DATA_NOT_MATCH
Definition: dji_error.hpp:759
static const uint8_t MOTOR_FAIL_IMU_DISCONNECTED
Definition: dji_error.hpp:634
static const uint8_t TOO_LOW
Definition: dji_error.hpp:970
CMDID: set.
Definition: dji_error.hpp:1238
static const uint8_t MOTOR_FAIL_BATTERY_MAIN_VOL_LOW
Definition: dji_error.hpp:558
uint32_t RawRetCodeType
RawRetCode ID type used in OnboardSDK Unified error.
Definition: dji_error.hpp:60
CameraFunctionID
Function ID used with CameraModule in error codes.
Definition: dji_error.hpp:110
CMDSet: MFIO.
Definition: dji_error.hpp:1222
static const uint8_t START_MOTOR_FAIL_MOTOR_STARTED
Definition: dji_error.hpp:741
Definition: dji_error.hpp:1280
Definition: dji_error.hpp:1260
std::map< const RawRetCodeType, ErrorCodeMsg > ErrorCodeMapType
Map container type of errCode ID and msg.
Definition: dji_error.hpp:159
Definition: dji_error.hpp:132
static const uint8_t TOTAL_DISTANCE_TOO_LONG
Definition: dji_error.hpp:1022
Definition: dji_error.hpp:1258
static const uint8_t MOTOR_FAIL_GIMBAL_ESC_YAW_NO_DATA
Definition: dji_error.hpp:688
static const uint8_t MOTOR_FAIL_ROLL_OVER_ON_GRD
Definition: dji_error.hpp:727
struct DJI::OSDK::ErrorCode::ErrorCodeMsg ErrorCodeMsg
Releated messages about error codes.
static const uint8_t MOTOR_FAIL_ESC_ERROR
Definition: dji_error.hpp:581
CMDID: SetArm supported in products with firmware version < 3.3.
Definition: dji_error.hpp:863
CMDSet: Subscribe.
Definition: dji_error.hpp:896
Definition: dji_error.hpp:47
static const uint8_t MOTOR_FAIL_ESC_TEMP_HIGH
Definition: dji_error.hpp:769