DJI_HotPoint.h
Go to the documentation of this file.
00001 
00012 #ifndef DJI_HOTPOINT_H
00013 #define DJI_HOTPOINT_H
00014 
00015 #include "DJI_Mission.h"
00016 
00017 namespace DJI
00018 {
00019 namespace onboardSDK
00020 {
00021 
00022 class HotPoint
00023 {
00024   public:
00025 #pragma pack(1)
00026   typedef struct YawRate
00027   {
00028     uint8_t clockwise;
00029     float32_t yawRate;
00030   } YawRate;
00031 #pragma pack()
00032 
00033   enum View
00034   {
00035     VIEW_NORTH = 0,
00036     VIEW_SOUTH = 1,
00037     VIEW_WEST = 2,
00038     VIEW_EAST = 3,
00039     VIEW_NEARBY = 4
00040   };
00041 
00042   enum YawMode
00043   {
00044     YAW_AUTO = 0,
00045     YAW_INSIDE = 1,
00046     YAW_OUTSIDE = 2,
00047     YAW_CUSTOM = 3,
00048     YAW_STATIC = 4,
00049   };
00050 
00051   public:
00052   HotPoint(CoreAPI *ControlAPI = 0);
00053   void initData();
00054 
00062   void start(CallBack callback = 0, UserData userData = 0);
00063   HotPointStartACK start(int timer);
00064   void stop(CallBack callback = 0, UserData userData = 0);
00065   MissionACK stop(int timer);
00066   void pause(bool isPause, CallBack callback = 0, UserData userData = 0);
00067   MissionACK pause(bool isPause, int timer);
00068 
00069   void updateYawRate(YawRate &Data, CallBack callback = 0, UserData userData = 0);
00070   MissionACK updateYawRate(YawRate &Data, int timer);
00071   void updateYawRate(float32_t yawRate, bool isClockwise, CallBack callback = 0,
00072       UserData userData = 0);
00073   void updateRadius(float32_t meter, CallBack callback = 0, UserData userData = 0);
00074   MissionACK updateRadius(float32_t meter, int timer);
00075   void resetYaw(CallBack callback = 0, UserData userData = 0);
00076   MissionACK resetYaw(int timer);
00077 
00078   void readData(CallBack callback = 0, UserData userData = 0);
00079   MissionACK readData(int timer);
00080 
00081   public:
00083   void setData(const HotPointData &value);
00084   void setHotPoint(float64_t longtitude, float64_t latitude, float64_t altitude);
00085   void setHotPoint(GPSPositionData gps);
00086   void setRadius(float64_t meter);
00087   void setYawRate(float32_t defree);
00088   void setClockwise(bool isClockwise);
00089   void setCameraView(View view);
00090   void setYawMode(YawMode mode);
00091 
00092   HotPointData getData() const;
00093 
00094   public:
00095   static void startCallback(CoreAPI *api, Header *protocolHeader, UserData userdata = 0);
00096   static void readCallback(CoreAPI *api, Header *protoclHeader, UserData userdata);
00097 
00098   private:
00099   CoreAPI *api;
00100   HotPointData hotPointData;
00101 };
00102 
00103 } // namespace onboardSDK
00104 } // namespace DJI
00105 
00106 #endif // DJI_HOTPOINT_H


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