dji_waypoint.hpp
Go to the documentation of this file.
1 
29 #ifndef DJI_WAYPOINT_H
30 #define DJI_WAYPOINT_H
31 
32 #include "dji_mission_base.hpp"
33 
34 namespace DJI
35 {
36 namespace OSDK
37 {
38 
45 {
46 public:
47  WaypointMission(Vehicle* vehicle = 0);
48  ~WaypointMission();
49 
50  const double RAD_2_DEGREE = 57.2957795;
51 
52  VehicleCallBackHandler wayPointEventCallback;
53  VehicleCallBackHandler wayPointCallback;
54 
64  void init(WayPointInitSettings* Info = 0, VehicleCallBack callback = 0,
65  UserData userData = 0);
74  ACK::ErrorCode init(WayPointInitSettings* Info, int timer);
83  void start(VehicleCallBack callback = 0, UserData userData = 0);
91  ACK::ErrorCode start(int timer);
100  void stop(VehicleCallBack callback = 0, UserData userData = 0);
108  ACK::ErrorCode stop(int timer);
117  void pause(VehicleCallBack callback = 0, UserData userData = 0);
125  ACK::ErrorCode pause(int timer);
134  void resume(VehicleCallBack callback = 0, UserData userData = 0);
142  ACK::ErrorCode resume(int timer);
150  void setInfo(const WayPointInitSettings& value);
168  void getWaypointSettings(VehicleCallBack callback, UserData userData);
176  ACK::WayPointIndex getIndex(uint8_t index, int timer);
185  void getIndex(uint8_t index, VehicleCallBack callback, UserData userData);
194  void setIndex(WayPointSettings* value, size_t pos);
202  bool uploadIndexData(WayPointSettings* data, VehicleCallBack callback = 0,
203  UserData userData = 0);
221  void readIdleVelocity(VehicleCallBack callback = 0, UserData userData = 0);
229  ACK::ErrorCode readIdleVelocity(int timeout);
239  void updateIdleVelocity(float32_t meterPreSecond,
240  VehicleCallBack callback = 0, UserData userData = 0);
249  ACK::WayPointVelocity updateIdleVelocity(float32_t meterPreSecond,
250  int timeout);
258  static void idleVelocityCallback(Vehicle* vehicle, RecvContainer recvFrame,
259  UserData userData);
267  static void getWaypointSettingsCallback(Vehicle* vehicle,
268  RecvContainer recvFrame,
269  UserData userData);
278  static void getIndexCallback(Vehicle* vehicle, RecvContainer recvFrame,
279  UserData userData);
287  static void uploadIndexDataCallback(Vehicle* vehicle, RecvContainer recvFrame,
288  UserData userData);
297  void setWaypointEventCallback(VehicleCallBack callback, UserData userData);
306  void setWaypointCallback(VehicleCallBack callback, UserData userData);
307 
308 
309 private:
311  WayPointSettings* index;
312 
313 };
314 
315 } // namespace OSDK
316 } // namespace DJI
317 
318 #endif // DJI_WAYPOINT_H
static void getWaypointSettingsCallback(Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
A callback function for reading initialization data non-blocking calls.
Definition: dji_waypoint.cpp:267
void * UserData
This is used as the datatype for all data arguments in callbacks.
Definition: dji_type.hpp:75
void pause(VehicleCallBack callback=0, UserData userData=0)
pause the waypt mission
Definition: dji_waypoint.cpp:164
static void getIndexCallback(Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
A callback function for getting waypoint information for a specified index (non-blocking call)
Definition: dji_waypoint.cpp:328
void stop(VehicleCallBack callback=0, UserData userData=0)
stop the waypt mission
Definition: dji_waypoint.cpp:130
void setInfo(const WayPointInitSettings &value)
setting waypt init data
Definition: dji_waypoint.cpp:362
ACK::WayPointIndex getIndex(uint8_t index, int timer)
Read WayPoint index settings from the flight controller.
Definition: dji_waypoint.cpp:296
void setWaypointCallback(VehicleCallBack callback, UserData userData)
Set waypoint callback.
Definition: dji_waypoint.cpp:601
This struct is returned from all blocking calls, except certain mission calls that have explicit type...
Definition: dji_ack.hpp:146
Mission Base class for commonality between SDK Missions.
Definition: dji_mission_base.hpp:58
void(* VehicleCallBack)(Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
Function prototype for all callback functions used in the OSDK.
Definition: dji_vehicle_callback.hpp:76
This struct is used in the readInitData non-blocking API callback.
Definition: dji_ack.hpp:235
void setWaypointEventCallback(VehicleCallBack callback, UserData userData)
Set waypoint push data callback.
Definition: dji_waypoint.cpp:588
void resume(VehicleCallBack callback=0, UserData userData=0)
resume the waypt mission
Definition: dji_waypoint.cpp:198
This struct is returned from the DJI::OSDK::WaypointMission::waypointIndexDownload blocking API.
Definition: dji_ack.hpp:206
void init(WayPointInitSettings *Info=0, VehicleCallBack callback=0, UserData userData=0)
init waypoint mission settings
Definition: dji_waypoint.cpp:55
This struct is returned from the DJI::OSDK::WaypointMission::updateIdleVelocity blocking API.
Definition: dji_ack.hpp:226
void readIdleVelocity(VehicleCallBack callback=0, UserData userData=0)
getting waypt idle velocity
Definition: dji_waypoint.cpp:463
Waypoint Mission Initialization settings.
Definition: dji_mission_type.hpp:81
Received info.
Definition: dji_vehicle_callback.hpp:59
bool uploadIndexData(WayPointSettings *data, VehicleCallBack callback=0, UserData userData=0)
setting waypt init data
Definition: dji_waypoint.cpp:408
The CallBackHandler struct allows users to encapsulate callbacks and data in one struct.
Definition: dji_vehicle_callback.hpp:83
void updateIdleVelocity(float32_t meterPreSecond, VehicleCallBack callback=0, UserData userData=0)
setting waypt idle velocity
Definition: dji_waypoint.cpp:497
Waypoint settings for individual waypoints being added to the mission.
Definition: dji_mission_type.hpp:126
void setIndex(WayPointSettings *value, size_t pos)
Definition: dji_waypoint.cpp:379
static void uploadIndexDataCallback(Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
A callback function for uploading waypt index non-blocking calls.
Definition: dji_waypoint.cpp:560
static void idleVelocityCallback(Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
A callback function for setting idle velocity non-blocking calls.
Definition: dji_waypoint.cpp:529
Definition: dji_ack.cpp:38
APIs for GPS Waypoint Missions.
Definition: dji_waypoint.hpp:44
Mission-Base abstract class for DJI OSDK library.
void start(VehicleCallBack callback=0, UserData userData=0)
start the waypt mission
Definition: dji_waypoint.cpp:96
ACK::WayPointInit getWaypointSettings(int timer)
Read WayPoint mission settings from the flight controller.
Definition: dji_waypoint.cpp:232