dji_camera_module.hpp
Go to the documentation of this file.
1 
29 #ifndef ONBOARDSDK_DJI_CAMERA_MODULE_HPP
30 #define ONBOARDSDK_DJI_CAMERA_MODULE_HPP
31 
32 #include "dji_command.hpp"
33 #include "dji_payload_base.hpp"
34 #include "dji_type.hpp"
35 #include "dji_vehicle_callback.hpp"
36 
37 namespace DJI {
38 namespace OSDK {
41 class CameraModule : public PayloadBase {
42  public:
45  enum WorkMode {
61  PLAYBACK = 2,
73  BROADCAST = 4,
78  };
79 
87  SINGLE = DJI_CAMERA_TAKE_PHOTO_TYPE_NORMAL,
93  HDR = DJI_CAMERA_TAKE_PHOTO_TYPE_HDR,
98  BURST = DJI_CAMERA_TAKE_PHOTO_TYPE_BURST,
105  AEB = DJI_CAMERA_TAKE_PHOTO_TYPE_AEB,
113  INTERVAL = DJI_CAMERA_TAKE_PHOTO_TYPE_TIME_LAPSE,
118  RAW_BURST = DJI_CAMERA_TAKE_PHOTO_TYPE_RAW_BURST,
124  EHDR = DJI_CAMERA_TAKE_PHOTO_TYPE_EHDR,
128  REGIONAL_SR = 0x16,
133  };
134 
140  1,
142  };
143 
152  };
153 
170  };
171 
196  };
200  enum FocusMode {
205  MANUAL = 0,
211  AUTO = 1,
217  AFC = 2,
222  };
223 
226  enum ShutterMode {
232  };
233 
305  };
306 
309  enum ISO {
337  ISO_UNKNOWN = 0xFFFF,
338  };
339 
344  N_5_0 = 1,
346  N_4_7 = 2,
348  N_4_3 = 3,
350  N_4_0 = 4,
352  N_3_7 = 5,
354  N_3_3 = 6,
356  N_3_0 = 7,
358  N_2_7 = 8,
360  N_2_3 = 9,
362  N_2_0 = 10,
364  N_1_7 = 11,
366  N_1_3 = 12,
368  N_1_0 = 13,
370  N_0_7 = 14,
372  N_0_3 = 15,
374  N_0_0 = 16,
376  P_0_3 = 17,
378  P_0_7 = 18,
380  P_1_0 = 19,
382  P_1_3 = 20,
384  P_1_7 = 21,
386  P_2_0 = 22,
388  P_2_3 = 23,
390  P_2_7 = 24,
392  P_3_0 = 25,
394  P_3_3 = 26,
396  P_3_7 = 27,
398  P_4_0 = 28,
400  P_4_3 = 29,
402  P_4_7 = 30,
404  P_5_0 = 31,
406  FIXED = 0xFF,
408  UNKNOWN = 0xFFFF,
409  };
410 
414  enum FunctionID {
415  FUNCTION_SIMPLE_SHOT = 0,
416  FUNCTION_RECORD_VIDEO = 1,
417  FUNCTION_SET_WORKING_MODE = 3,
418  FUNCTION_GET_WORKING_MODE = 4,
419  FUNCTION_SET_FOCUS_PARAMETER = 7,
420  FUNCTION_SET_EXPOSURE_MODE = 8,
421  FUNCTION_GET_EXPOSURE_MODE = 9,
422  FUNCTION_SET_FOCUS_MODE = 10,
423  FUNCTION_GET_FOCUS_MODE = 11,
424  FUNCTION_SET_EV_PARAMETER = 12,
425  FUNCTION_GET_EV_PARAMETER = 13,
426  FUNCTION_GET_FOCUS_PARAMETER = 14,
427  FUNCTION_SET_POINT_ZOOM_MODE = 15,
428  FUNCTION_GET_POINT_ZOOM_MODE = 16,
429  FUNCTION_POINT_ZOOM_CTRL = 17,
430  FUNCTION_SET_ZOOM_PARAMETER = 19,
431  FUNCTION_GET_ZOOM_PARAMETER = 20,
432  FUNCTION_SET_ISO_PARAMETER = 22,
433  FUNCTION_GET_ISO_PARAMETER = 23,
434  FUNCTION_SET_SHUTTER_SPEED = 24,
435  FUNCTION_GET_SHUTTER_SPEED = 25,
436  FUNCTION_SET_APERTURE_SIZE = 26,
437  FUNCTION_GET_APERTURE_SIZE = 27,
438  FUNCTION_SET_METERING_MODE = 28,
439  FUNCTION_GET_METERING_MODE = 29,
440  FUNCTION_SET_SPOT_FOCUS_AERA = 30,
441  FUNCTION_GET_SPOT_FOCUS_AERA = 31,
442  FUNCTION_SET_SHOT_MODE = 32,
443  FUNCTION_GET_SHOT_MODE = 33,
444  FUNCTION_CONTROL_OPTIZOOM = 34,
445  };
446 
451  enum Aperture {
454  F_1_DOT_6 = 160,
456  F_1_DOT_7 = 170,
458  F_1_DOT_8 = 180,
460  F_2 = 200,
462  F_2_DOT_2 = 220,
464  F_2_DOT_4 = 240,
466  F_2_DOT_5 = 250,
468  F_2_DOT_6 = 260,
470  F_2_DOT_8 = 280,
472  F_3_DOT_2 = 320,
474  F_3_DOT_4 = 340,
476  F_3_DOT_5 = 350,
478  F_4 = 400,
480  F_4_DOT_5 = 450,
482  F_4_DOT_8 = 480,
484  F_5 = 500,
486  F_5_DOT_6 = 560,
488  F_6_DOT_3 = 630,
490  F_6_DOT_8 = 680,
492  F_7_DOT_1 = 710,
494  F_8 = 800,
496  F_9 = 900,
498  F_9_DOT_6 = 960,
500  F_10 = 1000,
502  F_11 = 1100,
504  F_13 = 1300,
506  F_14 = 1400,
508  F_16 = 1600,
510  F_18 = 1800,
512  F_19 = 1900,
514  F_20 = 2000,
516  F_22 = 2200,
518  F_UNKNOWN = 0xFFFF,
519  };
520 
524  ZOOM_OUT = 0,
528  ZOOM_IN = 1,
529  };
530 
531  enum ZoomSpeed {
532  SLOWEST = 72,
533  SLOW = 73,
535  NORMAL = 75,
537  FAST = 77,
538  FASTEST = 78,
539  };
540 
541  typedef enum
542  {
543  DJI_CAMERA_FOCUS_MODE_MANUAL = 0, // 手动对焦
544  DJI_CAMERA_FOCUS_MODE_SHOT_AF = 1, // 自动对焦
545  DJI_CAMERA_FOCUS_MODE_CONTIN_AF = 2, // 连续自动对焦
546  DJI_CAMERA_FOCUS_MODE_MANUAL_FINE = 3, // 手动精细对焦(自动对焦后,再手动进行精细对焦)
547  } DJI_CAMERA_FOCUS_MODE;
548  typedef enum
549  {
550  DJI_CAMERA_DJPH1_CALIBRATE_RESULT_IDLE = 0,
551  DJI_CAMERA_DJPH1_CALIBRATE_RESULT_SUCCESS = 1,
552  DJI_CAMERA_DJPH1_CALIBRATE_RESULT_TOOCLOSE = 2,
553  } DJI_CAMERA_DJPH1_CALIBRATE_RESULT;
554 // X5相机协议类型
555  typedef enum
556  {
557  DJI_X5_CAMERA_PROTOCOL_TYPE_DEFAULT = 0, // 默认协议
558  DJI_X5_CAMERA_PROTOCOL_TYPE_ASSISTANT_FOCUS = 1, // 辅助对焦
559  DJI_X5_CAMERA_PROTOCOL_TYPE_CMODE = 2, // CMode协议
560  } DJI_X5_CAMERA_PROTOCOL_TYPE;
561 
562 #pragma pack(1)
563 // ========== structs ==========
564  typedef struct dji_camera_focus_area_struct
565  {
566  // 点对焦区域X
567  float focus_index_x;
568  // 点对焦区域Y
569  float focus_index_y;
570  } dji_camera_focus_area_struct;
571 
572  typedef struct dji_camera_aperture_range
573  {
574  // 最小光圈Size 实际值X100, 这才是最大光圈 最小的值
575  uint16_t min_aperture_size;
576  // 最大光圈Size 实际值X100, 这才是最小光圈, 最大的值
577  uint16_t max_aperture_size;
578  } dji_camera_aperture_range;
579 
580  typedef struct dji_camera_assist_digital_zoom_para
581  {
582  // 手动对焦时的数字对焦辅助 0关闭,1开启
583  uint8_t mf_assist_state:1;
584  // 自动对焦时的数字对焦辅助 0关闭,1开启
585  uint8_t af_assist_state:1;
586  uint8_t reserved :6;
587  } dji_camera_assist_digital_zoom_para;
588 
589  typedef struct dji_camera_real_focus_area_struct
590  {
591  // X轴实际对焦窗口起始下标
592  uint8_t focus_index_x;
593  // X轴实际对焦窗口个数
594  // 220&240下推送为0时,由app决定显示对焦框的大小
595  uint8_t focus_count_x;
596  // Y轴实际对焦窗口起始下标
597  uint8_t focus_index_y;
598  // Y轴实际对焦窗口个数
599  // 220&240下推送为0时,由app决定显示对焦框的大小
600  uint8_t focus_count_y;
601  } dji_camera_real_focus_area_struct;
602 
603  typedef struct dji_camera_focusing_state
604  {
605  // 0: Idle, 1: Focusing, 2: Successful, 3: Failed, 4: Unknown
606  uint8_t state :2;
607  uint8_t is_back_to_center:1;
608  uint8_t reserved :5;
609  } dji_camera_focusing_state;
610 
611  typedef struct dji_camera_lens_state
612  {
613  // 机身对焦模式
614  uint8_t camera_body_focusing_mode:2; // enum-type: DJI_CAMERA_FOCUS_MODE
615  // 镜头对焦模式
616  uint8_t camera_lens_focusing_mode:2; // enum-type: DJI_CAMERA_FOCUS_MODE
617  // 变焦特性 (0 = 手动,1 = 电动)
618  uint8_t auto_focal_lenstype :1;
619  // 定焦特性 (0 = AF 镜头,1 = MF 镜头)
620  uint8_t fix_focal_lenstype :1;
621  // 镜头焦距特性(0 = 定焦镜头,1 = 变焦镜头)
622  uint8_t lens_focal_distancetype :1;
623  // 镜头连接状态,0 = 未连接,1 = 已连接
624  uint8_t connect_state :1;
625  } dji_camera_lens_state;
626 // ========== structs end ======
627 
628 // ========== commands =========
629 // 该命令用于推送相机镜头参数
630  typedef struct dji_camera_len_para_push
631  {
632  // 相机镜头状态
633  dji_camera_lens_state lens_state;
634  // 最大电机行程
635  uint16_t max_focus_engine_scole;
636  // 当前电机行程
637  uint16_t cur_focus_engine_value;
638  // 当前物距
639  float object_distance;
640  // 光圈范围
641  dji_camera_aperture_range aperture_range;
642  // 对焦区域
643  dji_camera_focus_area_struct focus_area;
644  // 对焦状态
645  dji_camera_focusing_state focusing_state;
646  // 合焦概率
647  uint8_t focusing_probability;
648  // 最小焦距(单位 0.1mm)
649  uint16_t min_focus_length;
650  // 最大焦距 (单位 0.1mm)
651  uint16_t max_focus_length;
652  // 当前焦距 (单位 0.1mm)
653  uint16_t current_focus_length;
654  // 焦距最小变化量 (单位 0.1mm)
655  uint16_t min_focus_interval;
656  dji_camera_assist_digital_zoom_para assist_digital_zoom_para;
657  uint8_t focal_window_size_x;
658  uint8_t focal_window_size_y;
659  uint8_t assist_zoom_working;
660  // 实际对焦区域,将视图切分为格子然后通过起始index跟格子数确定对焦窗口。HG210有 12x8 个格子
661  dji_camera_real_focus_area_struct real_focus_area;
662  // X5相机协议
663  uint8_t x5_camera_protocol_type; // enum-type: DJI_X5_CAMERA_PROTOCOL_TYPE
664  // 自动对焦时的 对焦电机状态0 =正常, 1= 初始化失败, 2=电机卡住, 3=电机损坏 其它reserved
665  uint8_t af_focus_state;
666  // 镜头标定状态 0 = 未标定 1 = 已标定 2= 标定中
667  uint8_t calibrate_state;
668  // MF标定操作执行结果
669  uint8_t djph1_calibrate_result; // enum-type: DJI_CAMERA_DJPH1_CALIBRATE_RESULT
670  // 镜头标定的无穷远位置 用于app一键无穷远
671  uint16_t calibrate_infinity_len;
672  // cleandirt状态
673  uint8_t ffcamera_clean_dirt_status;
674  // 是否支持连续的数字变焦,1为支持,0为不支持。
675  uint8_t support_continuous_dzoom;
676  // 数字变焦的起始等效焦距值。此值一般为光学变焦的tele值,最小单位为0.1mm;例如,数值变焦起始等效焦距值为48.0mm,此值为480。
677  uint16_t dzoom_start_focus_length;
678  // 目标焦距 (单位 0.1mm),用户设置的希望达到的焦距。
679  // 如果是用速度模式设置焦距,则目标焦距和当前焦距相同。
680  uint16_t target_focus_length;
681  } dji_camera_len_para_push;
682 
687  typedef struct CommonAck {
688  uint8_t ret_code;
689  } CommonAck; // pack(1)
690 
693  typedef uint8_t
699  typedef uint8_t PhotoAEBCountData;
700 
704  typedef uint8_t PhotoNumBurstData;
705 
708  typedef struct PhotoIntervalData {
711  int16_t timeInterval;
713 
716  typedef struct CaptureParamData {
720  uint8_t conticapType;
722  } CaptureParamData; // pack(1)
723 
724  typedef enum :uint8_t
725  {
726  DJI_CAMERA_CONTI_CAP_TYPE_SINGLE = 0, // 单拍
727  DJI_CAMERA_CONTI_CAP_TYPE_MULTIPLE = 1, // 多拍
728  DJI_CAMERA_CONTI_CAP_TYPE_TIMELAPSE = 2, // 延时
729  } DJI_CAMERA_CONTI_CAP_TYPE;
730 
731  typedef struct dji_camera_timelapse_capture_with_ms
732  {
734  DJI_CAMERA_CONTI_CAP_TYPE timelapse_type; // enum-type: DJI_CAMERA_CONTI_CAP_TYPE
736  uint8_t timelapse_count;
739  uint16_t timelapse_interval;
742  uint16_t timelapse_interval_ms;
743  } dji_camera_timelapse_capture_with_ms;
744 
747  typedef struct CaptureParamReq {
751  } CaptureParamReq; // pack(1)
752 
755  typedef struct CaptureParamAck {
756  uint8_t ret_code;
759  } CaptureParamAck; // pack(1)
760 
763  typedef struct RecordVideoReq {
764  uint8_t recording_control : 2;
766  uint8_t
768  uint8_t reserved : 2;
769  } RecordVideoReq; // pack(1)
770 
773  typedef uint8_t WorkModeData;
778  typedef struct WorkModeReq {
780  } WorkModeReq; // pack(1)
781 
785  typedef struct WorkModeAck {
786  uint8_t ret_code;
788  } WorkModeAck; // pack(1)
789 
792  typedef struct ShootPhotoReq {
795  } ShootPhotoReq; // pack(1)
796 
799  typedef uint8_t
804  typedef struct FocusModeReq {
806  } FocusModeReq; // pack(1)
807 
810  typedef struct FocusModeAck {
811  uint8_t ret_code;
813  } FocusModeAck; // pack(1)
814 
817  typedef uint8_t
822  typedef struct ExposureModeReq {
825  uint8_t reserve;
826  } ExposureModeReq; // pack(1)
827 
830  typedef struct ExposureModeAck {
831  uint8_t ret_code;
834  uint8_t reserve;
835  } ExposureModeAck; // pack(1)
836 
840  typedef uint8_t zoomDirectionData;
841 
845  typedef uint8_t zoomSpeedData;
846 
849  typedef struct zoomOptiParamType {
854  union {
855  struct {
856  uint8_t zoomDirection;
858  uint8_t padding;
859  } zoomContiParam;
860  uint16_t
862  } zoomParam;
864 
865  // Camera zoom parameters
866  typedef struct zoom_config_t
867  {
868  uint8_t digital_zoom_mode : 2; /* 0:step 1:position 2:continuous */
869  uint8_t digital_reserve : 1; /* reserve */
870  uint8_t digital_zoom_enable : 1; /* 0:not_ctrl 1:ctrl */
871  uint8_t optical_zoom_mode : 2; /* 0:step 1:position 2:continuous */
872  uint8_t optical_reserve : 1; /* reserve */
873  uint8_t optical_zoom_enable : 1; /* 0:not_ctrl 1:ctrl */
874  } zoom_config_t;
875 
876  typedef union zoom_param_t
877  {
878  struct
879  {
880  uint16_t zoom_cont_speed : 8; /* continuous speed 0~100 */
881  uint16_t zoom_cont_direction : 1;
882  uint16_t zoom_cont_reserve : 7;
883  }cont_param;
884  struct
885  {
886  uint16_t zoom_step_level : 8; /* level time * 100 = 1 times */
887  uint16_t zoom_step_direction : 1;
888  uint16_t zoom_step_reserve : 7;
889  }step_param;
890  struct
891  {
892  uint16_t zoom_pos_level; /* 180 = 1.8times */
893  }pos_param;
894  } zoom_param_t;
895 
896  typedef struct camera_zoom_data_type
897  {
898  zoom_config_t zoom_config;
899  zoom_param_t optical_zoom_param;
900  zoom_param_t digital_zoom_param;
901  }camera_zoom_data_type;
902 
905  typedef struct zoomOptiParamReq {
908 
911  typedef uint8_t TapZoomEnableData;
912 
915  typedef uint8_t TapZoomMultiplierData;
916 
919  typedef struct TapZoomEnableReq {
922  } TapZoomEnableReq; // pack(1)
923 
927  typedef struct TapZoomEnableAck {
928  uint8_t ret_code;
931  } TapZoomEnableAck; // pack(1)
932 
935  typedef struct FloatPoint {
936  float x;
937  float y;
938  } FloatPoint; // pack(1)
939 
942  typedef FloatPoint TapZoomPosData; // pack(1)
943 
946  typedef FloatPoint TapFocusPosData; // pack(1)
947 
951  typedef struct FloatPointReq {
953  } FloatPointReq;
954 
958  typedef FloatPointReq TapZoomPosReq; // pack(1)
959 
963  typedef FloatPointReq TapFocusPosReq; // pack(1)
964 
968  typedef struct TapFocusPosAck {
969  uint8_t ret_code;
971  int8_t hor_region_num;
972  int8_t ver_region_num;
973  } TapFocusPosAck; // pack(1)
974 
977  typedef uint8_t ISOParamData;
981  typedef struct ISOParamReq {
983  } ISOParamReq; // pack(1)
984 
987  typedef struct ISOParamAck {
988  uint8_t ret_code;
990  } ISOParamAck; // pack(1)
991 
995  typedef uint16_t ApertureData;
996 
999  typedef struct ApertureReq {
1001  } ApertureReq; // pack(1)
1002 
1005  typedef struct ApertureAck {
1006  uint8_t ret_code;
1008  } ApertureAck; // pack(1)
1009 
1012  typedef struct ShutterParamType {
1013  uint16_t integer_part : 15;
1014  uint16_t reciprocal : 1;
1015  uint8_t decimal_part;
1016  } ShutterSpeedType; // pack(1)
1017 
1021  typedef uint8_t ShutterSpeedData; // pack(1)
1022 
1025  typedef struct ShutterReq {
1026  uint8_t shutter_mode;
1028  } ShutterReq; // pack(1)
1029 
1032  typedef struct ShutterAck {
1033  uint8_t ret_code;
1034  uint8_t shutter_mode;
1035  ShutterSpeedType shutter;
1036  } ShutterAck; // pack(1)
1037 
1040  typedef uint8_t
1048  typedef struct ExposureCompensationReq {
1050  ev;
1051  } ExposureCompensationReq; // pack(1)
1052 
1056  typedef struct ExposureCompensationAck {
1057  uint8_t ret_code;
1060  } ExposureCompensationAck; // pack(1)
1061 
1062 #pragma pack()
1063 
1066  typedef struct UCBRetCodeHandler {
1067  void (*UserCallBack)(ErrorCode::ErrorCodeType errCode, UserData userData);
1068 
1069  UserData userData;
1071 
1074  template <typename T>
1076  void (*UserCallBack)(ErrorCode::ErrorCodeType errCode, T param,
1077  UserData userData);
1078 
1079  UserData userData;
1080  };
1081 
1084  template <typename T>
1086 
1087  public:
1088  CameraModule(Linker* linker, PayloadIndexType payloadIndex,
1089  std::string name, bool enable);
1090 
1091  ~CameraModule();
1092 
1093  public:
1104  void startShootPhotoAsync(
1105  ShootPhotoMode mode,
1106  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1107  UserData userData);
1108 
1117  int timeout);
1118 
1127  void stopShootPhotoAsync(
1128  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1129  UserData userData);
1130 
1137 
1149  ShootPhotoMode takePhotoMode,
1150  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1151  UserData userData);
1152 
1161  int timeout);
1162 
1174  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1175  ShootPhotoMode takePhotoMode, UserData userData),
1176  UserData userData);
1177 
1186  int timeout);
1187 
1200  PhotoBurstCount count,
1201  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1202  UserData userData);
1203 
1212  int timeout);
1213 
1225  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1226  PhotoBurstCount count, UserData userData),
1227  UserData userData);
1228 
1237  int timeout);
1238 
1249  void setPhotoAEBCountAsync(
1250  PhotoAEBCount count,
1251  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1252  UserData userData);
1253 
1262  int timeout);
1263 
1274  void getPhotoAEBCountAsync(
1275  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1276  PhotoAEBCount count, UserData userData),
1277  UserData userData);
1278 
1287  int timeout);
1288 
1301  PhotoIntervalData intervalSetting,
1302  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1303  UserData userData);
1304 
1313  PhotoIntervalData intervalSetting, int timeout);
1314 
1327  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1328  PhotoIntervalData intervalSetting,
1329  UserData userData),
1330  UserData userData);
1331 
1340  PhotoIntervalData& intervalSetting, int timeout);
1341 
1350  void startRecordVideoAsync(
1351  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1352  UserData userData);
1353 
1360 
1369  void stopRecordVideoAsync(
1370  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1371  UserData userData);
1372 
1379 
1390  void setModeAsync(WorkMode mode,
1391  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1392  UserData userData),
1393  UserData userData);
1394 
1402  ErrorCode::ErrorCodeType setModeSync(WorkMode mode, int timeout);
1403 
1413  void getModeAsync(void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1414  WorkMode workingMode,
1415  UserData userData),
1416  UserData userData);
1417 
1425  ErrorCode::ErrorCodeType getModeSync(WorkMode& workingMode, int timeout);
1426 
1437  void setFocusModeAsync(FocusMode mode,
1438  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1439  UserData userData),
1440  UserData userData);
1441 
1450 
1460  void getFocusModeAsync(void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1461  FocusMode mode,
1462  UserData userData),
1463  UserData userData);
1464 
1472  ErrorCode::ErrorCodeType getFocusModeSync(FocusMode& focusMode, int timeout);
1473 
1491  void setFocusTargetAsync(
1492  TapFocusPosData tapFocusPos,
1493  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1494  UserData userData);
1495 
1511  int timeout);
1512 
1522  void getFocusTargetAsync(void (*UserCallBack)(ErrorCode::ErrorCodeType,
1523  TapFocusPosData tapFocusPos,
1524  UserData userData),
1525  UserData userData);
1526 
1535  int timeout);
1536 
1550  zoomDirectionData zoomDirection, zoomSpeedData zoomSpeed,
1551  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1552  UserData userData);
1553 
1564  zoomDirectionData zoomDirection, zoomSpeedData zoomSpeed, int timeout);
1565 
1566 
1576  ErrorCode::ErrorCodeType setOpticalZoomFactorSync(float factor, int timeout);
1577 
1588  float &factor, int timeout);
1589 
1599  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1600  UserData userData);
1601 
1608 
1621  bool param,
1622  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1623  UserData userData);
1624 
1632  ErrorCode::ErrorCodeType setTapZoomEnabledSync(bool param, int timeout);
1633 
1644  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, bool param,
1645  UserData userData),
1646  UserData userData);
1647 
1654  ErrorCode::ErrorCodeType getTapZoomEnabledSync(bool& param, int timeout);
1655 
1667  TapZoomMultiplierData param,
1668  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1669  UserData userData);
1670 
1679  int timeout);
1680 
1691  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1692  TapZoomMultiplierData param, UserData userData),
1693  UserData userData);
1694 
1702  TapZoomMultiplierData& param, int timeout);
1703 
1713  void tapZoomAtTargetAsync(
1714  TapZoomPosData tapZoomPos,
1715  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1716  UserData userData);
1717 
1725  int timeout);
1726 
1749  void setExposureModeAsync(
1750  ExposureMode mode,
1751  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1752  UserData userData);
1753 
1762 
1784  void getExposureModeAsync(
1785  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, ExposureMode mode,
1786  UserData userData),
1787  UserData userData);
1788 
1797 
1808  void setISOAsync(ISO iso,
1809  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1810  UserData userData),
1811  UserData userData);
1812 
1820  ErrorCode::ErrorCodeType setISOSync(ISO iso, int timeout);
1821 
1831  void getISOAsync(void (*UserCallBack)(ErrorCode::ErrorCodeType, ISO iso,
1832  UserData userData),
1833  UserData userData);
1834 
1842  ErrorCode::ErrorCodeType getISOSync(ISO& iso, int timeout);
1843 
1854  void setApertureAsync(Aperture size,
1855  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1856  UserData userData),
1857  UserData userData);
1858 
1867 
1878  void getApertureAsync(void (*UserCallBack)(ErrorCode::ErrorCodeType,
1879  Aperture size, UserData userData),
1880  UserData userData);
1881 
1890 
1901  void setShutterSpeedAsync(
1902  ShutterSpeed shutterSpeed,
1903  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1904  UserData userData);
1905 
1914  int timeout);
1915 
1925  void getShutterSpeedAsync(
1926  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1927  ShutterSpeed shutterSpeed, UserData userData),
1928  UserData userData);
1929 
1938  int timeout);
1939 
1952  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData),
1953  UserData userData);
1954 
1963  int timeout);
1964 
1975  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
1976  ExposureCompensation ev, UserData userData),
1977  UserData userData);
1978 
1987  int timeout);
1988 
1995  ErrorCode::ErrorCodeType obtainDownloadRightSync(bool enable, int timeout);
1996 
1997  std::string getCameraVersion();
1998  std::string getFirmwareVersion();
1999 
2000  typedef struct LensInfoPacketType {
2001  uint32_t updateTimeStamp; //ms
2002  dji_camera_len_para_push data;
2003  } LensInfoPacketType;
2004  void updateLensInfo(dji_camera_len_para_push data);
2005  LensInfoPacketType getLensInfo();
2006 
2007  private:
2008  LensInfoPacketType lensInfo;
2009  T_OsdkMutexHandle lensUpdatedMutex;
2010 
2019  static void getTapZoomEnabledDecoder(ErrorCode::ErrorCodeType retCode,
2020  TapZoomEnableAck data, UserData userData);
2021 
2030  static void getTapZoomMultiplierDecoder(ErrorCode::ErrorCodeType retCode,
2031  TapZoomEnableAck data,
2032  UserData userData);
2033 
2042  static void getShootPhotoModeDataDecoder(ErrorCode::ErrorCodeType retCode,
2043  CaptureParamData captureParam,
2044  UserData userData);
2053  static void getPhotoBurstCountDecoder(ErrorCode::ErrorCodeType retCode,
2054  CaptureParamData captureParam,
2055  UserData userData);
2056 
2057  static void getPhotoAEBCountDecoder(ErrorCode::ErrorCodeType retCode,
2058  CaptureParamData captureParam,
2059  UserData userData);
2068  static void getPhotoIntervalDatasDecoder(ErrorCode::ErrorCodeType retCode,
2069  CaptureParamData captureParam,
2070  UserData userData);
2071 
2072  static void callbackToSetTapZoomMultiplier(ErrorCode::ErrorCodeType retCode,
2073  bool enable, UserData userData);
2074  static void callbackToSetTapZoomEnabled(ErrorCode::ErrorCodeType retCode,
2075  TapZoomMultiplierData multiplier,
2076  UserData userData);
2077  static void callbackToSetShootPhotoMode(ErrorCode::ErrorCodeType retCode,
2078  CaptureParamData captureParam,
2079  UserData userData);
2080  static void callbackToSetPhotoBurstCount(ErrorCode::ErrorCodeType retCode,
2081  CaptureParamData captureParam,
2082  UserData userData);
2083  static void callbackToSetPhotoTimeIntervalSettings(
2084  ErrorCode::ErrorCodeType retCode, CaptureParamData captureParam,
2085  UserData userData);
2086 
2087  template <typename DataT>
2088  void getInterfaceAsync(const uint8_t cmd[2],
2089  void (*userCB)(ErrorCode::ErrorCodeType, DataT data,
2090  UserData),
2091  UserData userData, int timeout = 500,
2092  int retry_time = 2);
2093 
2094  ErrorCode::ErrorCodeType getInterfaceSync(const uint8_t cmd[2],
2095  uint8_t *outData,
2096  uint32_t &outDataLen, int timeout,
2097  int rtyTimes);
2098 
2099  void setInterfaceAsync(
2100  const uint8_t cmd[2], const uint8_t *pdata, uint32_t dataLen,
2101  void (*userCB)(ErrorCode::ErrorCodeType, UserData),
2102  UserData userData, int timeout = 500, int retry_time = 2);
2103 
2104  ErrorCode::ErrorCodeType setInterfaceSync(const uint8_t cmd[2],
2105  const uint8_t *pdata,
2106  uint32_t dataLen, int timeout,
2107  uint8_t rtyTimes);
2108 
2109  void actionInterfaceAsync(
2110  const uint8_t cmd[2], const uint8_t *pdata, uint32_t dataLen,
2111  void (*userCB)(ErrorCode::ErrorCodeType, UserData),
2112  UserData userData, int timeout = 500, int retry_time = 2);
2113 
2114  ErrorCode::ErrorCodeType actionInterfaceSync(const uint8_t cmd[2],
2115  const uint8_t *pdata,
2116  uint32_t dataLen,
2117  int timeout,
2118  uint8_t rtyTimes);
2119 
2120  private:
2121  std::string cameraVersion;
2122  std::string firmwareVersion;
2123  void requestCameraVersion();
2124  void getCaptureParamDataAsync(
2125  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
2126  CaptureParamData captureParam, UserData userData),
2127  UserData userData);
2128  void getTapZoomDataAckAsync(
2129  void (*UserCallBack)(ErrorCode::ErrorCodeType retCode,
2130  TapZoomEnableAck data, UserData userData),
2131  UserData userData);
2132 
2133  ErrorCode::ErrorCodeType getCaptureParamDataSync(
2134  CaptureParamData& captureParam, int timeout);
2135 
2136  CaptureParamData CreateDefCaptureParamData(ShootPhotoMode mode = SINGLE);
2137  T_OsdkTaskHandle camModuleHandle;
2138  static void camHWInfoTask(void *arg);
2139 }; /* CameraModule camera */
2140 } // namespace OSDK
2141 } // namespace DJI
2142 
2143 #endif // ONBOARDSDK_DJI_CAMERA_MODULE_HPP
Definition: dji_camera_module.hpp:245
Definition: dji_type.hpp:256
Definition: dji_camera_module.hpp:502
Definition: dji_camera_module.hpp:150
Definition: dji_type.hpp:258
uint8_t zoomDirectionData
Zoom direction data used by user, ref to DJI::OSDK::CameraModule::ZoomDirection.
Definition: dji_camera_module.hpp:840
Definition: dji_camera_module.hpp:335
uint8_t TapZoomEnableData
Data struct of tap zoom enabled used by user.
Definition: dji_camera_module.hpp:911
Requesting to set shutter parameter, used in internal link layer.
Definition: dji_camera_module.hpp:1025
void setTapZoomEnabledAsync(bool param, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set camera tap zoom function parameters, non-blocking calls
uint8_t ret_code
Definition: dji_camera_module.hpp:988
Definition: dji_camera_module.hpp:289
struct DJI::OSDK::CameraModule::ExposureModeReq ExposureModeReq
Requesting exposure mode, used in internal link layer.
uint8_t recording_type
Definition: dji_camera_module.hpp:767
void * UserData
This is used as the datatype for all data arguments in callbacks.
Definition: dji_type.hpp:75
ErrorCode::ErrorCodeType setPhotoTimeIntervalSettingsSync(PhotoIntervalData intervalSetting, int timeout)
set the parameters in the INTERVAL take-photo mode, blocking calls
Definition: dji_camera_module.hpp:105
ExposureMode
the photo action of INTERVAL shooting photo mode
Definition: dji_camera_module.hpp:146
Definition: dji_camera_module.hpp:354
TapZoomEnableData tapZoomEnable
Definition: dji_camera_module.hpp:929
void startShootPhotoAsync(ShootPhotoMode mode, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
start to shoot photo, non-blocking calls
Definition: dji_camera_module.hpp:169
uint8_t photoNumConticap
Definition: dji_camera_module.hpp:709
Definition: dji_camera_module.hpp:500
Definition: dji_type.hpp:260
Definition: dji_camera_module.hpp:454
Definition: dji_camera_module.hpp:378
Definition: dji_camera_module.hpp:297
Definition: dji_camera_module.hpp:251
Definition: dji_camera_module.hpp:273
Definition: dji_camera_module.hpp:360
Response data of take photo mode.
Definition: dji_camera_module.hpp:755
ErrorCode::ErrorCodeType setTapZoomMultiplierSync(TapZoomMultiplierData param, int timeout)
set camera tap zoom parameters, blocking calls
struct DJI::OSDK::CameraModule::ISOParamAck ISOParamAck
Response data struct of ISO parameter, used in internal link layer.
TapZoomMultiplierData multiplier
Definition: dji_camera_module.hpp:930
uint8_t ret_code
Definition: dji_camera_module.hpp:756
uint16_t ApertureData
Aperture size data used by user. ref to DJI::OSDK::CameraModule::Aperture.
Definition: dji_camera_module.hpp:995
Requesting CameraModule working mode data, used in internal link layer.
Definition: dji_camera_module.hpp:778
Requesting optical zoom, used in internal link layer.
Definition: dji_camera_module.hpp:905
Definition: dji_camera_module.hpp:53
struct DJI::OSDK::CameraModule::ShutterParamType ShutterSpeedType
Shutter data struct.
void getPhotoBurstCountAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, PhotoBurstCount count, UserData userData), UserData userData)
struct DJI::OSDK::CameraModule::PhotoIntervalData PhotoIntervalData
Interval take photo mode setting.
Definition: dji_camera_module.hpp:370
Definition: dji_camera_module.hpp:291
Definition: dji_camera_module.hpp:250
Definition: dji_camera_module.hpp:352
Definition: dji_camera_module.hpp:258
Definition: dji_camera_module.hpp:139
ErrorCode::ErrorCodeType getExposureModeSync(ExposureMode &mode, int timeout)
get camera exposure mode, blocking calls
struct DJI::OSDK::CameraModule::ShootPhotoReq ShootPhotoReq
Requesting take photo mode, used in internal link layer.
void getApertureAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType, Aperture size, UserData userData), UserData userData)
get camera aperture size value, non-blocking calls
ShootPhotoModeData captureMode
Definition: dji_camera_module.hpp:718
Requesting focus mode, used in internal link layer.
Definition: dji_camera_module.hpp:804
Definition: dji_camera_module.hpp:268
Definition: dji_camera_module.hpp:255
void setShutterSpeedAsync(ShutterSpeed shutterSpeed, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set camera shutter value, non-blocking calls
Definition: dji_camera_module.hpp:480
struct DJI::OSDK::CameraModule::ExposureModeAck ExposureModeAck
Response data struct of exposure mode, used in internal link layer.
Requesting to set Exposure compensation, used in internal link layer.
Definition: dji_camera_module.hpp:1048
struct DJI::OSDK::CameraModule::FocusModeReq FocusModeReq
Requesting focus mode, used in internal link layer.
Definition: dji_camera_module.hpp:285
Definition: dji_camera_module.hpp:400
Definition: dji_camera_module.hpp:504
uint8_t ret_code
Definition: dji_camera_module.hpp:688
Definition: dji_camera_module.hpp:124
ExposureModeData exposureMode
Definition: dji_camera_module.hpp:833
uint8_t conticapType
Definition: dji_camera_module.hpp:720
Definition: dji_camera_module.hpp:476
struct of callback deal the param and retCode for user
Definition: dji_camera_module.hpp:1075
Definition: dji_camera_module.hpp:217
void stopContinuousOpticalZoomAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
stop camera optical zooming, non-blocking calls
Definition: dji_camera_module.hpp:231
Definition: dji_type.hpp:255
ErrorCode::ErrorCodeType getFocusTargetSync(TapFocusPosData &tapFocusPos, int timeout)
get camera focus point, blocking calls
Definition: dji_camera_module.hpp:192
void setShootPhotoModeAsync(ShootPhotoMode takePhotoMode, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set the shoot photo mode, non-blocking calls
Definition: dji_camera_module.hpp:278
Definition: dji_camera_module.hpp:472
struct DJI::OSDK::CameraModule::ShutterAck ShutterAck
Response data struct of shutter, used in internal link layer.
int64_t ErrorCodeType
Unified error type.
Definition: dji_error.hpp:144
Definition: dji_camera_module.hpp:466
FocusMode
Definition: dji_camera_module.hpp:200
struct DJI::OSDK::CameraModule::TapFocusPosAck TapFocusPosAck
Response data struct of tap focus target parameter, used in internal link layer.
FocusModeData focusMode
Definition: dji_camera_module.hpp:805
Definition: dji_camera_module.hpp:162
void getShootPhotoModeAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, ShootPhotoMode takePhotoMode, UserData userData), UserData userData)
get the shoot photo mode, non-blocking calls
Take photo mode parameters.
Definition: dji_camera_module.hpp:716
uint8_t recording_control
Definition: dji_camera_module.hpp:764
Type definition for new Vehicle-style callbacks.
uint8_t ShutterSpeedData
Shutter data type used by user. ref to DJI::OSDK::CameraModule::ShutterSpeed.
Definition: dji_camera_module.hpp:1021
void stopRecordVideoAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
stop to take video, non-blocking calls
zoomDirectionData zoomType
Definition: dji_camera_module.hpp:851
void getExposureModeAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, ExposureMode mode, UserData userData), UserData userData)
get camera exposure mode, non-blocking calls
uint8_t ISOParamData
ISO data used by user.
Definition: dji_camera_module.hpp:977
Definition: dji_camera_module.hpp:293
Request data to take photo mode.
Definition: dji_camera_module.hpp:747
Definition: dji_camera_module.hpp:61
void startRecordVideoAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
start to take video, non-blocking calls
Definition: dji_camera_module.hpp:508
Definition: dji_camera_module.hpp:388
Definition: dji_camera_module.hpp:300
Definition: dji_camera_module.hpp:344
Definition: dji_camera_module.hpp:113
ErrorCode::ErrorCodeType startShootPhotoSync(ShootPhotoMode mode, int timeout)
start to shoot photo, blocking calls
ErrorCode::ErrorCodeType startContinuousOpticalZoomSync(zoomDirectionData zoomDirection, zoomSpeedData zoomSpeed, int timeout)
start camera optical zooming, blocking calls
void setPhotoBurstCountAsync(PhotoBurstCount count, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set the burst count in the Burst take-photo mode, non-blocking calls
Definition: dji_camera_module.hpp:536
Definition: dji_camera_module.hpp:228
ErrorCode::ErrorCodeType getFocusModeSync(FocusMode &focusMode, int timeout)
get camera focus mode, blocking calls
ExposureCompensation
CameraModule exposure compensation.
Definition: dji_camera_module.hpp:342
Definition: dji_camera_module.hpp:286
PayloadBase.
Definition: dji_payload_base.hpp:54
Definition: dji_camera_module.hpp:382
struct DJI::OSDK::CameraModule::ISOParamReq ISOParamReq
Requesting to set ISO parameter, used in internal link layer.
Definition: dji_camera_module.hpp:394
Definition: dji_camera_module.hpp:148
PayloadIndexType
The payload Index of camera.
Definition: dji_payload_base.hpp:42
ErrorCode::ErrorCodeType getPhotoAEBCountSync(PhotoAEBCount &count, int timeout)
get the burst count in the AEB take-photo mode, blocking calls
Definition: dji_camera_module.hpp:462
ErrorCode::ErrorCodeType getExposureCompensationSync(ExposureCompensation &ev, int timeout)
get camera EV value, blocking calls
ErrorCode::ErrorCodeType setFocusTargetSync(TapFocusPosData tapFocusPos, int timeout)
set camera focus point, blocking calls
Definition: dji_camera_module.hpp:252
Definition: dji_camera_module.hpp:181
struct DJI::OSDK::CameraModule::TapZoomEnableReq TapZoomEnableReq
Requesting to set tap zoom enable, used in internal link layer.
Response data struct of exposure compensation, used in internal link layer.
Definition: dji_camera_module.hpp:1056
int16_t timeInterval
Definition: dji_camera_module.hpp:711
Definition: dji_camera_module.hpp:287
struct DJI::OSDK::CameraModule::ShutterReq ShutterReq
Requesting to set shutter parameter, used in internal link layer.
struct DJI::OSDK::CameraModule::ExposureCompensationReq ExposureCompensationReq
Requesting to set Exposure compensation, used in internal link layer.
WorkModeData workingMode
Definition: dji_camera_module.hpp:779
Definition: dji_camera_module.hpp:380
ErrorCode::ErrorCodeType setExposureCompensationSync(ExposureCompensation ev, int timeout)
set camera EV value, blocking calls
Definition: dji_camera_module.hpp:87
Data struct of optical zoom parameters.
Definition: dji_camera_module.hpp:849
Definition: dji_camera_module.hpp:346
ErrorCode::ErrorCodeType stopContinuousOpticalZoomSync(int timeout)
stop camera optical zooming, blocking calls
Definition: dji_camera_module.hpp:390
ErrorCode::ErrorCodeType getTapZoomEnabledSync(bool &param, int timeout)
get camera tap zoom parameters, blocking calls
Requesting to set tap zoom enable, used in internal link layer.
Definition: dji_camera_module.hpp:919
Definition: dji_camera_module.hpp:484
Responsing CameraModule working mode data, used in internal link layer.
Definition: dji_camera_module.hpp:785
Definition: dji_camera_module.hpp:260
Definition: dji_camera_module.hpp:188
Definition: dji_camera_module.hpp:316
ErrorCode::ErrorCodeType setExposureModeSync(ExposureMode mode, int timeout)
set camera exposure mode, blocking calls
Definition: dji_camera_module.hpp:406
uint8_t decimal_part
Definition: dji_camera_module.hpp:1015
Definition: dji_camera_module.hpp:118
Definition: dji_camera_module.hpp:272
Definition: dji_camera_module.hpp:318
Response data struct of aperture, used in internal link layer.
Definition: dji_camera_module.hpp:1005
Definition: dji_camera_module.hpp:243
Definition: dji_camera_module.hpp:257
struct DJI::OSDK::CameraModule::WorkModeReq WorkModeReq
Requesting CameraModule working mode data, used in internal link layer.
Definition: dji_camera_module.hpp:374
Definition: dji_camera_module.hpp:294
TapZoomPosData p
Definition: dji_camera_module.hpp:970
uint8_t ret_code
Definition: dji_camera_module.hpp:811
2D float point data struct
Definition: dji_camera_module.hpp:935
Definition: dji_camera_module.hpp:282
Definition: dji_camera_module.hpp:366
Definition: dji_camera_module.hpp:280
Definition: dji_type.hpp:253
CameraModule of PayloadNode.
Definition: dji_camera_module.hpp:41
void setFocusModeAsync(FocusMode mode, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set camera focus mode, non-blocking calls
Definition: dji_camera_module.hpp:514
Definition: dji_camera_module.hpp:376
Abstract protocol implementation for payload module.
ErrorCode::ErrorCodeType startRecordVideoSync(int timeout)
start to take video, blocking calls
Definition: dji_camera_module.hpp:246
Definition: dji_camera_module.hpp:456
Definition: dji_camera_module.hpp:128
Definition: dji_camera_module.hpp:254
Definition: dji_camera_module.hpp:242
Definition: dji_camera_module.hpp:263
Definition: dji_camera_module.hpp:261
Definition: dji_camera_module.hpp:265
ErrorCode::ErrorCodeType getShootPhotoModeSync(ShootPhotoMode &takePhotoMode, int timeout)
get the shoot photo mode, blocking calls
void getTapZoomMultiplierAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, TapZoomMultiplierData param, UserData userData), UserData userData)
get camera tap zoom function parameters, non-blocking calls
ExposureCompensationData ev
Definition: dji_camera_module.hpp:1050
struct DJI::OSDK::CameraModule::FocusModeAck FocusModeAck
Response data struct of focus mode, used in internal link layer.
ZoomDirection
Definition: dji_camera_module.hpp:521
Definition: dji_camera_module.hpp:271
Definition: dji_camera_module.hpp:512
Definition: dji_camera_module.hpp:488
void getPhotoAEBCountAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, PhotoAEBCount count, UserData userData), UserData userData)
ErrorCode::ErrorCodeType getOpticalZoomFactorSync(float &factor, int timeout)
get parameters of camera optical zooming, blocking calls
struct DJI::OSDK::CameraModule::FloatPoint FloatPoint
2D float point data struct
Definition: dji_camera_module.hpp:350
ErrorCode::ErrorCodeType setTapZoomEnabledSync(bool param, int timeout)
set camera tap zoom parameters, blocking calls
Definition: dji_camera_module.hpp:73
Definition: dji_camera_module.hpp:518
Definition: dji_camera_module.hpp:490
ErrorCode::ErrorCodeType getPhotoBurstCountSync(PhotoBurstCount &count, int timeout)
get the burst count in the Burst take-photo mode, blocking calls
uint8_t ExposureModeData
Exposure mode data used by user.
Definition: dji_camera_module.hpp:818
ShutterMode
Definition: dji_camera_module.hpp:226
Definition: dji_camera_module.hpp:328
Definition: dji_camera_module.hpp:290
uint8_t ret_code
Definition: dji_camera_module.hpp:1033
Definition: dji_camera_module.hpp:159
Definition: dji_camera_module.hpp:384
Requesting take photo mode, used in internal link layer.
Definition: dji_camera_module.hpp:792
ShootPhotoModeData takePhotoType
Definition: dji_camera_module.hpp:794
void getShutterSpeedAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, ShutterSpeed shutterSpeed, UserData userData), UserData userData)
get camera shutter value, non-blocking calls
struct DJI::OSDK::CameraModule::ApertureAck ApertureAck
Response data struct of aperture, used in internal link layer.
uint8_t shutter_mode
Definition: dji_camera_module.hpp:1026
uint8_t zoomDirection
Definition: dji_camera_module.hpp:856
FloatPointReq TapZoomPosReq
Requesting to set the target of tapzoom , used in internal link layer.
Definition: dji_camera_module.hpp:958
Definition: dji_camera_module.hpp:205
struct DJI::OSDK::CameraModule::WorkModeAck WorkModeAck
Responsing CameraModule working mode data, used in internal link layer.
void setPhotoAEBCountAsync(PhotoAEBCount count, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set the burst count in the AEB take-photo mode, non-blocking calls
Definition: dji_camera_module.hpp:324
void setModeAsync(WorkMode mode, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set camera working mode, non-blocking calls
Definition: dji_camera_module.hpp:372
Response data struct of shutter, used in internal link layer.
Definition: dji_camera_module.hpp:1032
ShutterSpeed
CameraModule shutter speed values.
Definition: dji_camera_module.hpp:236
void getFocusTargetAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType, TapFocusPosData tapFocusPos, UserData userData), UserData userData)
get camera tap focus target point, non-blocking calls
Definition: dji_camera_module.hpp:486
Definition: dji_camera_module.hpp:178
ShootPhotoMode
The ShootPhoto mode itself can have several modes. The default value is SINGLE.
Definition: dji_camera_module.hpp:83
ExposureCompensationData ev_param
Definition: dji_camera_module.hpp:1059
Definition: dji_camera_module.hpp:239
ApertureData size
Definition: dji_camera_module.hpp:1000
ISOParamData iso
Definition: dji_camera_module.hpp:982
Definition: dji_camera_module.hpp:392
Definition: dji_camera_module.hpp:470
uint8_t padding
Definition: dji_camera_module.hpp:858
struct DJI::OSDK::CameraModule::CommonAck CommonAck
It is the common ack of Open Protocol CMD DJI::OSDK::CameraModule::FunctionID. All the ack data from ...
Definition: dji_camera_module.hpp:269
uint16_t reciprocal
Definition: dji_camera_module.hpp:1014
uint8_t FocusModeData
Focus mode data used by user.
Definition: dji_camera_module.hpp:800
Definition: dji_camera_module.hpp:238
uint8_t ret_code
Definition: dji_camera_module.hpp:969
Definition: dji_camera_module.hpp:534
Definition: dji_camera_module.hpp:474
TapZoomEnableData tapZoomEnable
Definition: dji_camera_module.hpp:920
Definition: dji_camera_module.hpp:396
All DJI OSDK OpenProtocol Command IDs.
ErrorCode::ErrorCodeType stopRecordVideoSync(int timeout)
stop to take video, blocking calls
PhotoAEBCount
the photo action of INTERVAL shooting photo mode
Definition: dji_camera_module.hpp:156
Definition: dji_camera_module.hpp:464
Interval take photo mode setting.
Definition: dji_camera_module.hpp:708
Definition: dji_camera_module.hpp:259
ErrorCode::ErrorCodeType tapZoomAtTargetSync(TapZoomPosData tapZoomPos, int timeout)
set camera tap zoom point, blocking calls
uint8_t ExposureCompensationData
Exposure compensation data type used by user.
Definition: dji_camera_module.hpp:1041
struct DJI::OSDK::CameraModule::TapZoomEnableAck TapZoomEnableAck
Response data struct of tap zoom enable parameter, used in internal link layer.
struct DJI::OSDK::CameraModule::CaptureParamData CaptureParamData
Take photo mode parameters.
Definition: dji_camera_module.hpp:98
Definition: dji_camera_module.hpp:244
Shutter data struct.
Definition: dji_camera_module.hpp:1012
Definition: dji_camera_module.hpp:356
ErrorCode::ErrorCodeType getISOSync(ISO &iso, int timeout)
get camera iso value, blocking calls
struct DJI::OSDK::CameraModule::CaptureParamReq CaptureParamReq
Request data to take photo mode.
void setFocusTargetAsync(TapFocusPosData tapFocusPos, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set camera tap focus target point, non-blocking calls
Definition: dji_camera_module.hpp:249
Definition: dji_camera_module.hpp:312
Definition: dji_type.hpp:254
FloatPoint TapFocusPosData
Tap focus target point data struct, used by user.
Definition: dji_camera_module.hpp:946
Definition: dji_camera_module.hpp:304
ErrorCode::ErrorCodeType setFocusModeSync(FocusMode mode, int timeout)
get camera focus mode, blocking calls
Definition: dji_camera_module.hpp:498
void setTapZoomMultiplierAsync(TapZoomMultiplierData param, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set camera tap zoom function parameters, non-blocking calls
zoomSpeedData zoomSpeed
Definition: dji_camera_module.hpp:852
Definition: dji_camera_module.hpp:532
ErrorCode::ErrorCodeType setModeSync(WorkMode mode, int timeout)
set camera working mode, blocking calls
uint8_t WorkModeData
CameraModule working mode data used by user.
Definition: dji_camera_module.hpp:773
ErrorCode::ErrorCodeType setApertureSync(Aperture size, int timeout)
set camera aperture size value, blocking calls
CaptureParamData captureParam
Definition: dji_camera_module.hpp:757
Definition: dji_camera_module.hpp:77
Definition: dji_camera_module.hpp:256
Definition: dji_camera_module.hpp:528
ErrorCode::ErrorCodeType setOpticalZoomFactorSync(float factor, int timeout)
set parameters for camera optical zooming, blocking calls
Definition: dji_camera_module.hpp:237
ErrorCode::ErrorCodeType getTapZoomMultiplierSync(TapZoomMultiplierData &param, int timeout)
get camera tap zoom parameters, blocking calls
void startContinuousOpticalZoomAsync(zoomDirectionData zoomDirection, zoomSpeedData zoomSpeed, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
start camera optical zooming, non-blocking calls
ErrorCode::ErrorCodeType obtainDownloadRightSync(bool enable, int timeout)
obtaion the download right from camera, blocking calls
Definition: dji_camera_module.hpp:267
WorkModeData workingMode
Definition: dji_camera_module.hpp:787
Definition: dji_camera_module.hpp:326
Definition: dji_camera_module.hpp:303
Definition: dji_camera_module.hpp:524
uint8_t TapZoomMultiplierData
Data struct of tap zoom multiplier used by user. Limit: 1~5.
Definition: dji_camera_module.hpp:915
ISO
CameraModule ISO values.
Definition: dji_camera_module.hpp:309
Definition: dji_camera_module.hpp:276
Definition: dji_type.hpp:250
Definition: dji_camera_module.hpp:175
Definition: dji_camera_module.hpp:264
Definition: dji_type.hpp:261
Definition: dji_type.hpp:259
Definition: dji_camera_module.hpp:262
struct DJI::OSDK::CameraModule::ExposureCompensationAck ExposureCompensationAck
Response data struct of exposure compensation, used in internal link layer.
Definition: dji_camera_module.hpp:408
Definition: dji_camera_module.hpp:66
Definition: dji_camera_module.hpp:266
Definition: dji_camera_module.hpp:348
Definition: dji_type.hpp:257
void setApertureAsync(Aperture size, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set camera aperture size value, non-blocking calls
Response data struct of focus mode, used in internal link layer.
Definition: dji_camera_module.hpp:810
Definition: dji_camera_module.hpp:299
Definition: dji_camera_module.hpp:253
Definition: dji_camera_module.hpp:248
Definition: dji_camera_module.hpp:478
Definition: dji_camera_module.hpp:211
Definition: dji_camera_module.hpp:296
PhotoBurstCount
Definition: dji_camera_module.hpp:172
Definition: dji_camera_module.hpp:362
Definition: dji_camera_module.hpp:402
Request data to record video mode.
Definition: dji_camera_module.hpp:763
Definition: dji_camera_module.hpp:314
FunctionID
the function ID of camera used in the CMD OpenProtocolCMD::CMDSet::Control::cameraExtraFunction
Definition: dji_camera_module.hpp:414
Definition: dji_camera_module.hpp:295
FloatPoint p
Definition: dji_camera_module.hpp:952
void setPhotoTimeIntervalSettingsAsync(PhotoIntervalData intervalSetting, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set the parameters in the INTERVAL take-photo mode, non-blocking calls
Data type and Data Structure definitions for use throughout DJI OSDK.
FloatPoint TapZoomPosData
Tap zoom target point data struct, used by user.
Definition: dji_camera_module.hpp:942
Definition: dji_camera_module.hpp:49
struct DJI::OSDK::CameraModule::ApertureReq ApertureReq
Requesting to set aperture parameter, used in internal link layer.
uint8_t ret_code
Definition: dji_camera_module.hpp:786
Definition: dji_camera_module.hpp:241
Definition: dji_camera_module.hpp:368
uint8_t ret_code
Definition: dji_camera_module.hpp:1006
Response data struct of tap zoom enable parameter, used in internal link layer.
Definition: dji_camera_module.hpp:927
struct DJI::OSDK::CameraModule::UCBRetCodeHandler UCBRetCodeHandler
type of callback only deal the retCode for user
void getISOAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType, ISO iso, UserData userData), UserData userData)
get camera iso value, non-blocking calls
void stopShootPhotoAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
stop to shoot photo, non-blocking calls
Definition: dji_camera_module.hpp:330
Definition: dji_camera_module.hpp:386
ErrorCode::ErrorCodeType setShutterSpeedSync(ShutterSpeed shutterSpeed, int timeout)
set camera shutter value, blocking calls
Definition: dji_camera_module.hpp:283
Definition: dji_camera_module.hpp:298
Definition: dji_camera_module.hpp:460
uint8_t ret_code
Definition: dji_camera_module.hpp:831
Definition: dji_camera_module.hpp:147
Definition: dji_camera_module.hpp:292
Definition: dji_camera_module.hpp:516
ErrorCode::ErrorCodeType getPhotoIntervalDatasSync(PhotoIntervalData &intervalSetting, int timeout)
get the parameters in the INTERVAL take-photo mode, blocking calls
Definition: dji_camera_module.hpp:320
void getPhotoIntervalDatasAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, PhotoIntervalData intervalSetting, UserData userData), UserData userData)
get the parameters in the INTERVAL take-photo mode, non-blocking calls
Definition: dji_camera_module.hpp:398
Definition: dji_camera_module.hpp:533
Definition: dji_camera_module.hpp:496
void setExposureCompensationAsync(ExposureCompensation ev, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set camera EV value, non-blocking calls
Definition: dji_camera_module.hpp:337
uint8_t zoomSpeedData
Zoom speed data used by user, ref to DJI::OSDK::CameraModule::ZoomSpeed.
Definition: dji_camera_module.hpp:845
uint16_t integer_part
Definition: dji_camera_module.hpp:1013
TapZoomMultiplierData multiplier
Definition: dji_camera_module.hpp:921
It is the common ack of Open Protocol CMD DJI::OSDK::CameraModule::FunctionID. All the ack data from ...
Definition: dji_camera_module.hpp:687
ErrorCode::ErrorCodeType setISOSync(ISO iso, int timeout)
set camera iso value, blocking calls
Definition: dji_camera_module.hpp:270
Definition: dji_camera_module.hpp:149
struct DJI::OSDK::CameraModule::FloatPointReq FloatPointReq
Requesting to set the target point of some functions , used in internal link layer.
Definition: dji_camera_module.hpp:494
Definition: dji_ack.cpp:38
Definition: dji_camera_module.hpp:506
ErrorCode::ErrorCodeType getApertureSync(Aperture &size, int timeout)
get camera aperture size value, blocking calls
zoomOptiParamType zoomOptiParam
Definition: dji_camera_module.hpp:906
Requesting to set aperture parameter, used in internal link layer.
Definition: dji_camera_module.hpp:999
void tapZoomAtTargetAsync(TapZoomPosData tapZoomPos, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set camera tap zoom point, non-blocking calls
ExposureModeData exposureModeMode
Definition: dji_camera_module.hpp:824
Definition: dji_camera_module.hpp:132
PhotoIntervalData intervalSetting
Definition: dji_camera_module.hpp:721
Definition: dji_camera_module.hpp:492
ShutterSpeedType shutterSpeed
Definition: dji_camera_module.hpp:1027
Response data struct of tap focus target parameter, used in internal link layer.
Definition: dji_camera_module.hpp:968
struct DJI::OSDK::CameraModule::zoomOptiParamType zoomOptiParamType
Data struct of optical zoom parameters.
Definition: dji_camera_module.hpp:184
Definition: dji_camera_module.hpp:538
Definition: dji_camera_module.hpp:165
Definition: dji_camera_module.hpp:458
WorkMode
CameraModule work modes.
Definition: dji_camera_module.hpp:45
type of callback only deal the retCode for user
Definition: dji_camera_module.hpp:1066
void setISOAsync(ISO iso, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set camera iso value, non-blocking calls
Definition: dji_camera_module.hpp:281
ErrorCode::ErrorCodeType setPhotoAEBCountSync(PhotoAEBCount count, int timeout)
set the burst count in the AEB take-photo mode, blocking calls
uint8_t ShootPhotoModeData
Take photo mode data used by user.
Definition: dji_camera_module.hpp:694
ErrorCode::ErrorCodeType getModeSync(WorkMode &workingMode, int timeout)
get camera working mode, blocking calls
ApertureData size
Definition: dji_camera_module.hpp:1007
Definition: dji_camera_module.hpp:535
Requesting exposure mode, used in internal link layer.
Definition: dji_camera_module.hpp:822
ISOParamData iso
Definition: dji_camera_module.hpp:989
Definition: dji_camera_module.hpp:288
ErrorCode::ErrorCodeType setShootPhotoModeSync(ShootPhotoMode takePhotoMode, int timeout)
set the shoot photo mode, blocking calls
uint8_t PhotoNumBurstData
Take photo mode data used by user.ref to DJI::OSDK::CameraModule::PhotoBurstCount.
Definition: dji_camera_module.hpp:704
float x
Definition: dji_camera_module.hpp:936
Definition: dji_camera_module.hpp:302
Response data struct of ISO parameter, used in internal link layer.
Definition: dji_camera_module.hpp:987
struct DJI::OSDK::CameraModule::CaptureParamAck CaptureParamAck
Response data of take photo mode.
Definition: dji_type.hpp:262
uint16_t zoomFocusLength
Definition: dji_camera_module.hpp:861
Definition: dji_camera_module.hpp:322
Definition: dji_camera_module.hpp:247
Definition: dji_camera_module.hpp:277
Definition: dji_camera_module.hpp:93
float y
Definition: dji_camera_module.hpp:937
void getExposureCompensationAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, ExposureCompensation ev, UserData userData), UserData userData)
get camera EV value, non-blocking calls
void getTapZoomEnabledAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, bool param, UserData userData), UserData userData)
get camera tap zoom function parameters, non-blocking calls
uint8_t ret_code
Definition: dji_camera_module.hpp:928
uint8_t PhotoAEBCountData
Take photo mode data used by user.ref to DJI::OSDK::CameraModule::PhotoAEBCount.
Definition: dji_camera_module.hpp:699
ErrorCode::ErrorCodeType setPhotoBurstCountSync(PhotoBurstCount count, int timeout)
set the burst count in the Burst take-photo mode, blocking calls
Definition: dji_camera_module.hpp:240
void getFocusModeAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, FocusMode mode, UserData userData), UserData userData)
get camera focus mode, non-blocking calls
CaptureParamData captureParam
Definition: dji_camera_module.hpp:749
Definition: dji_camera_module.hpp:537
ErrorCode::ErrorCodeType stopShootPhotoSync(int timeout)
stop to shoot photo, blocking calls
Definition: dji_camera_module.hpp:404
Definition: dji_camera_module.hpp:275
Definition: dji_camera_module.hpp:274
void setExposureModeAsync(ExposureMode mode, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
set camera exposure mode, non-blocking calls
uint8_t shutter_mode
Definition: dji_camera_module.hpp:1034
FocusModeData focusMode
Definition: dji_camera_module.hpp:812
ZoomSpeed
Definition: dji_camera_module.hpp:531
Definition: dji_camera_module.hpp:468
PhotoNumBurstData photoNumBurst
Definition: dji_camera_module.hpp:719
FloatPointReq TapFocusPosReq
Requesting to set the target of tapfocus , used in internal link layer.
Definition: dji_camera_module.hpp:963
ErrorCode::ErrorCodeType getShutterSpeedSync(ShutterSpeed &shutterSpeed, int timeout)
get camera shutter value, blocking calls
Definition: dji_camera_module.hpp:279
uint8_t ret_code
Definition: dji_camera_module.hpp:1057
Response data struct of exposure mode, used in internal link layer.
Definition: dji_camera_module.hpp:830
Definition: dji_camera_module.hpp:195
Definition: dji_camera_module.hpp:482
Definition: dji_camera_module.hpp:358
Definition: dji_camera_module.hpp:364
struct DJI::OSDK::CameraModule::zoomOptiParamReq zoomOptiParamReq
Requesting optical zoom, used in internal link layer.
Requesting to set the target point of some functions , used in internal link layer.
Definition: dji_camera_module.hpp:951
Definition: dji_camera_module.hpp:301
Definition: dji_camera_module.hpp:510
void getModeAsync(void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, WorkMode workingMode, UserData userData), UserData userData)
get camera working mode, non-blocking calls
Definition: dji_camera_module.hpp:141
Definition: dji_camera_module.hpp:284
Definition: dji_camera_module.hpp:151
Requesting to set ISO parameter, used in internal link layer.
Definition: dji_camera_module.hpp:981
Aperture
CameraModule aperture values.
Definition: dji_camera_module.hpp:451
struct DJI::OSDK::CameraModule::RecordVideoReq RecordVideoReq
Request data to record video mode.
Definition: dji_camera_module.hpp:138
Definition: dji_camera_module.hpp:221
ContiCapMode
the photo action of INTERVAL shooting photo mode
Definition: dji_camera_module.hpp:137