DJI_Follow.h
Go to the documentation of this file.
00001 
00012 #ifndef DJI_FOLLOW_H
00013 #define DJI_FOLLOW_H
00014 
00015 #include "DJI_Mission.h"
00016 
00017 namespace DJI
00018 {
00019 namespace onboardSDK
00020 {
00021 
00022 #pragma pack(1)
00023 
00024 typedef struct FollowTarget
00025 {
00026   float64_t latitude;
00027   float64_t longitude;
00028   uint16_t height;
00029   uint16_t angle;
00030 } FollowTarget;
00031 
00032 typedef struct FollowData
00033 {
00034   uint8_t mode;
00035   uint8_t yaw;
00036   FollowTarget target;
00037   uint8_t sensitivity;
00038 } FollowData;
00039 
00040 #pragma pack()
00041 
00043 class Follow
00044 {
00045   public:
00046   enum MODE
00047   {
00048     MODE_RELATIVE = 0,
00049     MODE_ROUTE = 1, 
00050     MODE_SMART = 2  
00051   };
00052 
00053   enum YAW_TYPE
00054   {
00055     YAW_TOTARGET = 0,
00056     YAW_CUSTOM = 1
00057   };
00058 
00059   enum SENSITIVITY
00060   {
00061     SENSE_LOW = 0, 
00062     SENSE_MID = 1,
00063     SENSE_HIGH = 2 
00064   };
00065 
00066   public:
00067   Follow(CoreAPI *ControlAPI = 0);
00068   void resetData();      
00069   void start(FollowData *Data = 0, CallBack callback = 0, UserData userData = 0);
00070   MissionACK start(FollowData *Data, int timeout);
00071   void stop(CallBack callback = 0, UserData userData = 0);
00072   MissionACK stop(int timer);
00074   void pause(bool isPause, CallBack callback = 0, UserData userData = 0);
00075   MissionACK pause(bool isPause, int timer);
00076   void updateTarget(FollowTarget target); 
00077   void updateTarget(float64_t latitude, float64_t longitude, uint16_t height,
00078       uint16_t angle); 
00079 
00080   public:
00081   void setData(const FollowData &value);
00082   void setMode(const MODE mode);
00083   void setTarget(FollowTarget target);
00084   void setYawType(const YAW_TYPE type);
00085   void setSensitivity(const SENSITIVITY sense);
00086 
00087   FollowData getData() const;
00088 
00089   private:
00090   CoreAPI *api;
00091   FollowData followData;
00092 };
00093 
00094 } 
00095 } 
00096 
00097 #endif //! DJI_FOLLOW_H


dji_sdk_lib
Author(s):
autogenerated on Thu Jun 6 2019 17:55:25