APIs for GPS Waypoint Missions. More...

#include <dji_waypoint.hpp>

Inheritance diagram for DJI::OSDK::WaypointMission:

Public Member Functions

 WaypointMission (Vehicle *vehicle=0)
 
void init (WayPointInitSettings *Info=0, VehicleCallBack callback=0, UserData userData=0)
 init waypoint mission settings More...
 
ACK::ErrorCode init (WayPointInitSettings *Info, int timer)
 init waypoint mission settings More...
 
void start (VehicleCallBack callback=0, UserData userData=0)
 start the waypt mission More...
 
ACK::ErrorCode start (int timer)
 start the waypt mission More...
 
void stop (VehicleCallBack callback=0, UserData userData=0)
 stop the waypt mission More...
 
ACK::ErrorCode stop (int timer)
 stop the waypt mission More...
 
void pause (VehicleCallBack callback=0, UserData userData=0)
 pause the waypt mission More...
 
ACK::ErrorCode pause (int timer)
 pause the waypt mission More...
 
void resume (VehicleCallBack callback=0, UserData userData=0)
 resume the waypt mission More...
 
ACK::ErrorCode resume (int timer)
 resume the waypt mission More...
 
void setInfo (const WayPointInitSettings &value)
 setting waypt init data More...
 
ACK::WayPointInit getWaypointSettings (int timer)
 Read WayPoint mission settings from the flight controller. More...
 
void getWaypointSettings (VehicleCallBack callback, UserData userData)
 Read WayPoint mission settings from the flight controller. More...
 
ACK::WayPointIndex getIndex (uint8_t index, int timer)
 Read WayPoint index settings from the flight controller. More...
 
void getIndex (uint8_t index, VehicleCallBack callback, UserData userData)
 Read WayPoint index settings from the flight controller. More...
 
void setIndex (WayPointSettings *value, size_t pos)
 
bool uploadIndexData (WayPointSettings *data, VehicleCallBack callback=0, UserData userData=0)
 setting waypt init data More...
 
ACK::WayPointIndex uploadIndexData (WayPointSettings *data, int timer)
 setting waypt init data More...
 
void readIdleVelocity (VehicleCallBack callback=0, UserData userData=0)
 getting waypt idle velocity More...
 
ACK::ErrorCode readIdleVelocity (int timeout)
 getting waypt idle velocity More...
 
void updateIdleVelocity (float32_t meterPreSecond, VehicleCallBack callback=0, UserData userData=0)
 setting waypt idle velocity More...
 
ACK::WayPointVelocity updateIdleVelocity (float32_t meterPreSecond, int timeout)
 setting waypt idle velocity More...
 
void setWaypointEventCallback (VehicleCallBack callback, UserData userData)
 Set waypoint push data callback. More...
 
void setWaypointCallback (VehicleCallBack callback, UserData userData)
 Set waypoint callback. More...
 
- Public Member Functions inherited from DJI::OSDK::MissionBase
 MissionBase (Vehicle *vehicle=0)
 

Static Public Member Functions

static void idleVelocityCallback (Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
 A callback function for setting idle velocity non-blocking calls. More...
 
static void getWaypointSettingsCallback (Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
 A callback function for reading initialization data non-blocking calls. More...
 
static void getIndexCallback (Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
 A callback function for getting waypoint information for a specified index (non-blocking call) More...
 
static void uploadIndexDataCallback (Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
 A callback function for uploading waypt index non-blocking calls. More...
 

Public Attributes

const double RAD_2_DEGREE = 57.2957795
 
VehicleCallBackHandler wayPointEventCallback
 
VehicleCallBackHandler wayPointCallback
 

Additional Inherited Members

- Protected Attributes inherited from DJI::OSDK::MissionBase
Vehicle * vehicle
 

Detailed Description

APIs for GPS Waypoint Missions.

This class inherits from MissionBase and can be used with MissionManager.

Member Function Documentation

◆ getIndex() [1/2]

ACK::WayPointIndex WaypointMission::getIndex ( uint8_t  index,
int  timer 
)

Read WayPoint index settings from the flight controller.

Supported Platforms : M210V2
Returns
Information about uploaded WayPoint index, error if index not uploaded.

◆ getIndex() [2/2]

void WaypointMission::getIndex ( uint8_t  index,
VehicleCallBack  callback,
UserData  userData 
)

Read WayPoint index settings from the flight controller.

Supported Platforms : M210V2
Information about uploaded WayPoint index, error if index not uploaded will be handled in a user defined or default callback.

◆ getIndexCallback()

void WaypointMission::getIndexCallback ( Vehicle *  vehicle,
RecvContainer  recvFrame,
UserData  userData 
)
static

A callback function for getting waypoint information for a specified index (non-blocking call)

Parameters
recvFramethe data comes with the callback function
userDataa void ptr that user can manipulate inside the callback

◆ getWaypointSettings() [1/2]

ACK::WayPointInit WaypointMission::getWaypointSettings ( int  timer)

Read WayPoint mission settings from the flight controller.

Supported Platforms : M210V2
Returns
Information about uploaded WayPoint mission, error if mission settings not uploaded.

◆ getWaypointSettings() [2/2]

void WaypointMission::getWaypointSettings ( VehicleCallBack  callback,
UserData  userData 
)

Read WayPoint mission settings from the flight controller.

Supported Platforms : M210V2
Information about uploaded WayPoint mission, error if mission settings not uploaded will be handled in a user defined or default callback.

◆ getWaypointSettingsCallback()

void WaypointMission::getWaypointSettingsCallback ( Vehicle *  vehicle,
RecvContainer  recvFrame,
UserData  userData 
)
static

A callback function for reading initialization data non-blocking calls.

Parameters
recvFramethe data comes with the callback function
userDataa void ptr that user can manipulate inside the callback

◆ idleVelocityCallback()

void WaypointMission::idleVelocityCallback ( Vehicle *  vehicle,
RecvContainer  recvFrame,
UserData  userData 
)
static

A callback function for setting idle velocity non-blocking calls.

Parameters
recvFramethe data comes with the callback function
userDataa void ptr that user can manipulate inside the callback

◆ init() [1/2]

void WaypointMission::init ( WayPointInitSettings Info = 0,
VehicleCallBack  callback = 0,
UserData  userData = 0 
)

init waypoint mission settings

Supported Platforms : M210V2
Parameters
Infoaction command from DJI_ControllerCMD.h
callbackcallback function
userDatauser data (void ptr)

◆ init() [2/2]

ACK::ErrorCode WaypointMission::init ( WayPointInitSettings Info,
int  timer 
)

init waypoint mission settings

Supported Platforms : M210V2
Parameters
Infoaction command from DJI_ControllerCMD.h
timeouttimeout to wait for ACK

◆ pause() [1/2]

void WaypointMission::pause ( VehicleCallBack  callback = 0,
UserData  userData = 0 
)
virtual

pause the waypt mission

Supported Platforms : M210V2
Parameters
callbackcallback function
userDatauser data (void ptr)

Implements DJI::OSDK::MissionBase.

◆ pause() [2/2]

ACK::ErrorCode WaypointMission::pause ( int  timer)
virtual

pause the waypt mission

Supported Platforms : M210V2
Parameters
timertimeout to wait for ACK

Implements DJI::OSDK::MissionBase.

◆ readIdleVelocity() [1/2]

void WaypointMission::readIdleVelocity ( VehicleCallBack  callback = 0,
UserData  userData = 0 
)

getting waypt idle velocity

Supported Platforms : M210V2
Parameters
callbackcallback function
userDatauser data (void ptr)

◆ readIdleVelocity() [2/2]

ACK::ErrorCode WaypointMission::readIdleVelocity ( int  timeout)

getting waypt idle velocity

Supported Platforms : M210V2
Parameters
timertimeout to wait for ACK

◆ resume() [1/2]

void WaypointMission::resume ( VehicleCallBack  callback = 0,
UserData  userData = 0 
)
virtual

resume the waypt mission

Supported Platforms : M210V2
Parameters
callbackcallback function
userDatauser data (void ptr)

Implements DJI::OSDK::MissionBase.

◆ resume() [2/2]

ACK::ErrorCode WaypointMission::resume ( int  timer)
virtual

resume the waypt mission

Supported Platforms : M210V2
Parameters
timertimeout to wait for ACK

Implements DJI::OSDK::MissionBase.

◆ setIndex()

void WaypointMission::setIndex ( WayPointSettings value,
size_t  pos 
)
Supported Platforms : M210V2
setting waypt data to the waypt container with specified idx
Parameters
valueuser specified WayPointData
posthe index of the waypt

◆ setInfo()

void WaypointMission::setInfo ( const WayPointInitSettings value)

setting waypt init data

Supported Platforms : M210V2
Parameters
valueuser specified WayPointInitData

◆ setWaypointCallback()

void WaypointMission::setWaypointCallback ( VehicleCallBack  callback,
UserData  userData 
)

Set waypoint callback.

Supported Platforms : M210V2
Parameters
callbackcallback function
userDataa void ptr that user can manipulate inside the callback

◆ setWaypointEventCallback()

void WaypointMission::setWaypointEventCallback ( VehicleCallBack  callback,
UserData  userData 
)

Set waypoint push data callback.

Supported Platforms : M210V2
Parameters
callbackcallback function
userDataa void ptr that user can manipulate inside the callback

◆ start() [1/2]

void WaypointMission::start ( VehicleCallBack  callback = 0,
UserData  userData = 0 
)
virtual

start the waypt mission

Supported Platforms : M210V2
Parameters
callbackcallback function
userDatauser data (void ptr)

Implements DJI::OSDK::MissionBase.

◆ start() [2/2]

ACK::ErrorCode WaypointMission::start ( int  timer)
virtual

start the waypt mission

Supported Platforms : M210V2
Parameters
timertimeout to wait for ACK

Implements DJI::OSDK::MissionBase.

◆ stop() [1/2]

void WaypointMission::stop ( VehicleCallBack  callback = 0,
UserData  userData = 0 
)
virtual

stop the waypt mission

Supported Platforms : M210V2
Parameters
callbackcallback function
userDatauser data (void ptr)

Implements DJI::OSDK::MissionBase.

◆ stop() [2/2]

ACK::ErrorCode WaypointMission::stop ( int  timer)
virtual

stop the waypt mission

Supported Platforms : M210V2
Parameters
timertimeout to wait for ACK

Implements DJI::OSDK::MissionBase.

◆ updateIdleVelocity() [1/2]

void WaypointMission::updateIdleVelocity ( float32_t  meterPreSecond,
VehicleCallBack  callback = 0,
UserData  userData = 0 
)

setting waypt idle velocity

Supported Platforms : M210V2
Parameters
meterPreSecondspecified velocity
callbackcallback function
userDatauser data (void ptr)

◆ updateIdleVelocity() [2/2]

ACK::WayPointVelocity WaypointMission::updateIdleVelocity ( float32_t  meterPreSecond,
int  timeout 
)

setting waypt idle velocity

Supported Platforms : M210V2
Parameters
meterPreSecondspecified velocity
timertimeout to wait for ACK

◆ uploadIndexData() [1/2]

bool WaypointMission::uploadIndexData ( WayPointSettings data,
VehicleCallBack  callback = 0,
UserData  userData = 0 
)

setting waypt init data

Supported Platforms : M210V2
Parameters
valueuser specified WayPointInitData
Note
range error

◆ uploadIndexData() [2/2]

ACK::WayPointIndex WaypointMission::uploadIndexData ( WayPointSettings data,
int  timer 
)

setting waypt init data

Supported Platforms : M210V2
Parameters
valueuser specified WayPointInitData
timertimeout to wait for ACK

◆ uploadIndexDataCallback()

void WaypointMission::uploadIndexDataCallback ( Vehicle *  vehicle,
RecvContainer  recvFrame,
UserData  userData 
)
static

A callback function for uploading waypt index non-blocking calls.

Parameters
recvFramethe data comes with the callback function
userDataa void ptr that user can manipulate inside the callback

The documentation for this class was generated from the following files: