DJI_WayPoint.h
Go to the documentation of this file.
00001 
00013 #include "DJI_Mission.h"
00014 #include <stdexcept>
00015 
00016 #ifndef DJI_WAYPOINT_H
00017 #define DJI_WAYPOINT_H
00018 
00019 namespace DJI
00020 {
00021 namespace onboardSDK
00022 {
00023 
00024 class WayPoint
00025 {
00026   public:
00027 #ifndef STATIC_MEMORY
00028   WayPoint(CoreAPI *ControlAPI = 0);
00029 #else
00030   WayPoint(WayPointData *list, uint8_t len, CoreAPI *ControlAPI = 0);
00031 #endif // STATIC_MEMORY
00032   void init(WayPointInitData *Info = 0, CallBack callback = 0, UserData userData = 0);
00033   MissionACK init(WayPointInitData *Info, int timer);
00034   void start(CallBack callback = 0, UserData userData = 0);
00035   MissionACK start(int timer);
00036   void stop(CallBack callback = 0, UserData userData = 0);
00037   MissionACK stop(int timer);
00039   void pause(bool isPause, CallBack callback = 0, UserData userData = 0);
00040   MissionACK pause(bool isPause, int timer);
00041   void readInitData(CallBack callback = 0, UserData userData = 0);
00042   void readIndexData(uint8_t index, CallBack callback = 0, UserData userData = 0); 
00043   void readIdleVelocity(CallBack callback = 0, UserData userData = 0);
00045   //void uploadAll(CallBack callback = 0, UserData userData = 0);
00046   bool uploadIndexData(WayPointData *data, CallBack callback = 0, UserData userData = 0);
00047   WayPointDataACK uploadIndexData(WayPointData *data, int timer);
00048   bool uploadIndexData(uint8_t pos, CallBack callback = 0, UserData userData = 0);
00049   void updateIdleVelocity(float32_t meterPreSecond, CallBack callback = 0,
00050       UserData userData = 0);
00051 
00052   void setInfo(const WayPointInitData &value);
00053   void setIndex(WayPointData *value, size_t pos);
00054   WayPointInitData getInfo() const;
00055   WayPointData *getIndex() const;
00056   WayPointData *getIndex(size_t pos) const;
00057 
00058   public:
00059   static void idleVelocityCallback(CoreAPI *api, Header *protocolHeader, UserData wpapi);
00060   static void readInitDataCallback(CoreAPI *api, Header *protocolHeader, UserData wpapi);
00061   static void uploadIndexDataCallback(CoreAPI *api, Header *protocolHeader, UserData wpapi);
00064 
00065   private:
00066   CoreAPI *api;
00067   WayPointInitData info;
00068   WayPointData *index;
00069 #ifdef STATIC_MEMORY
00070   uint8_t maxIndex;
00071 #endif // STATIC_MEMORY
00072 };
00073 
00074 } // namespace onboardSDK
00075 } // namespace DJI
00076 
00077 #endif // DJI_WAYPOINT_H


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