APIs for Hotpoint (Point of Interest) Missions. More...

#include <dji_hotpoint.hpp>

Inheritance diagram for DJI::OSDK::HotpointMission:

Public Types

enum  View {
  VIEW_NORTH = 0,
  VIEW_SOUTH = 1,
  VIEW_WEST = 2,
  VIEW_EAST = 3,
  VIEW_NEARBY = 4
}
 
enum  YawMode {
  YAW_AUTO = 0,
  YAW_INSIDE = 1,
  YAW_OUTSIDE = 2,
  YAW_CUSTOM = 3,
  YAW_STATIC = 4
}
 
typedef struct DJI::OSDK::HotpointMission::YawRate YawRate
 

Public Member Functions

 HotpointMission (Vehicle *vehicle=0)
 
void initData ()
 init hotpoint default data More...
 
HotPointSettings getData () const
 getting hotpoint data More...
 
void start (VehicleCallBack callback=0, UserData userData=0)
 start the hotpoint mission More...
 
ACK::ErrorCode start (int timer)
 start the hotpoint mission More...
 
void stop (VehicleCallBack callback=0, UserData userData=0)
 stop the hotpoint mission More...
 
ACK::ErrorCode stop (int timer)
 stop the hotpoint mission More...
 
void pause (VehicleCallBack callback=0, UserData userData=0)
 pause the hotpoint mission More...
 
ACK::ErrorCode pause (int timer)
 pause the hotpoint mission More...
 
void resume (VehicleCallBack callback=0, UserData userData=0)
 resume the hotpoint mission More...
 
ACK::ErrorCode resume (int timer)
 resume the hotpoint mission More...
 
void updateYawRate (YawRate &Data)
 update yaw rate and orientation of hotpoint mission More...
 
void updateYawRate (float32_t yawRate, bool isClockwise)
 update yaw rate and orientation of hotpoint mission More...
 
void updateRadius (float32_t meter)
 update radius of hotpoint mission More...
 
void resetYaw (VehicleCallBack callback=0, UserData userData=0)
 reset yaw of hotpoint mission More...
 
ACK::ErrorCode resetYaw (int timer)
 reset yaw of hotpoint mission More...
 
void getHotpointSettings (VehicleCallBack callback=0, UserData userData=0)
 Read hotpoint mission information from flight controller. More...
 
ACK::HotPointRead getHotpointSettings (int timer)
 Read hotpoint mission information from flight controller. More...
 
void setHotpointCallback (VehicleCallBack callback, UserData userData)
 Set hotpoint callback. More...
 
void setData (HotPointSettings *data)
 Set hotpoint data for initialization purpose. More...
 
void setHotPoint (float64_t longitude, float64_t latitude, float64_t altitude)
 Set hotpoint data for initialization purpose. More...
 
void setHotPoint (Telemetry::GlobalPosition gps)
 Set hotpoint data for initialization purpose. More...
 
void setRadius (float64_t meter)
 Set hotpoint data for initialization purpose. More...
 
void setYawRate (float32_t degree)
 Set hotpoint data for initialization purpose. More...
 
void setClockwise (bool isClockwise)
 Set hotpoint data for initialization purpose. More...
 
void setCameraView (View view)
 Set hotpoint data for initialization purpose. More...
 
void setYawMode (YawMode mode)
 Set hotpoint data for initialization purpose. More...
 
- Public Member Functions inherited from DJI::OSDK::MissionBase
 MissionBase (Vehicle *vehicle=0)
 

Static Public Member Functions

static void startCallback (RecvContainer recvFrame, UserData userData)
 A callback function for start non-blocking calls. More...
 
static void getHotpointSettingsCallback (Vehicle *vehiclePtr, RecvContainer recvFrame, UserData userData)
 A callback function for read non-blocking calls. More...
 

Public Attributes

VehicleCallBackHandler hotPointCallback
 

Additional Inherited Members

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

Detailed Description

APIs for Hotpoint (Point of Interest) Missions.

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

Constructor & Destructor Documentation

◆ HotpointMission()

HotpointMission::HotpointMission ( Vehicle *  vehicle = 0)
Note
API functions
Attention
difference between set and update
Set functions only change the HotPoint data in this class, Update functions will change the Mission status. In other words: drone will response update functions immediately.

Member Function Documentation

◆ getData()

HotPointSettings HotpointMission::getData ( ) const

getting hotpoint data

Supported Platforms : M210V2, M300

◆ getHotpointSettings() [1/2]

void HotpointMission::getHotpointSettings ( VehicleCallBack  callback = 0,
UserData  userData = 0 
)

Read hotpoint mission information from flight controller.

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

◆ getHotpointSettings() [2/2]

ACK::HotPointRead HotpointMission::getHotpointSettings ( int  timer)

Read hotpoint mission information from flight controller.

Supported Platforms : M210V2, M300
Parameters
timertimeout to wait for ACK

◆ getHotpointSettingsCallback()

void HotpointMission::getHotpointSettingsCallback ( Vehicle *  vehiclePtr,
RecvContainer  recvFrame,
UserData  userData 
)
static

A callback function for read non-blocking calls.

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

◆ initData()

void HotpointMission::initData ( )

init hotpoint default data

Supported Platforms : M210V2, M300

◆ pause() [1/2]

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

pause the hotpoint mission

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

Implements DJI::OSDK::MissionBase.

◆ pause() [2/2]

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

pause the hotpoint mission

Supported Platforms : M210V2, M300
Parameters
timertimeout to wait for ACK

Implements DJI::OSDK::MissionBase.

◆ resetYaw() [1/2]

void HotpointMission::resetYaw ( VehicleCallBack  callback = 0,
UserData  userData = 0 
)

reset yaw of hotpoint mission

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

◆ resetYaw() [2/2]

ACK::ErrorCode HotpointMission::resetYaw ( int  timer)

reset yaw of hotpoint mission

Supported Platforms : M210V2, M300
Parameters
timertimeout to wait for ACK

◆ resume() [1/2]

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

resume the hotpoint mission

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

Implements DJI::OSDK::MissionBase.

◆ resume() [2/2]

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

resume the hotpoint mission

Supported Platforms : M210V2, M300
Parameters
timertimeout to wait for ACK

Implements DJI::OSDK::MissionBase.

◆ setCameraView()

void HotpointMission::setCameraView ( HotpointMission::View  view)

Set hotpoint data for initialization purpose.

Supported Platforms : M210V2, M300
Parameters
viewcheck View struct

◆ setClockwise()

void HotpointMission::setClockwise ( bool  isClockwise)

Set hotpoint data for initialization purpose.

Supported Platforms : M210V2, M300
Parameters
isClockwiseisClockwise

◆ setData()

void HotpointMission::setData ( HotPointSettings data)

Set hotpoint data for initialization purpose.

Supported Platforms : M210V2, M300
Parameters
dataHotPointSettings

◆ setHotPoint() [1/2]

void HotpointMission::setHotPoint ( float64_t  longitude,
float64_t  latitude,
float64_t  altitude 
)

Set hotpoint data for initialization purpose.

Supported Platforms : M210V2, M300
Parameters
longitudelongitude
latitudelatitude
altitudealtitude

◆ setHotPoint() [2/2]

void HotpointMission::setHotPoint ( Telemetry::GlobalPosition  gps)

Set hotpoint data for initialization purpose.

Supported Platforms : M210V2, M300
Parameters
gpsgps

◆ setHotpointCallback()

void HotpointMission::setHotpointCallback ( VehicleCallBack  callback,
UserData  userData 
)

Set hotpoint callback.

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

◆ setRadius()

void HotpointMission::setRadius ( float64_t  meter)

Set hotpoint data for initialization purpose.

Supported Platforms : M210V2, M300
Parameters
meterradius in meter

◆ setYawMode()

void HotpointMission::setYawMode ( HotpointMission::YawMode  mode)

Set hotpoint data for initialization purpose.

Supported Platforms : M210V2, M300
Parameters
modecheck YawMode struct

◆ setYawRate()

void HotpointMission::setYawRate ( float32_t  degree)

Set hotpoint data for initialization purpose.

Supported Platforms : M210V2, M300
Parameters
degreeyawrate in degree/sec

◆ start() [1/2]

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

start the hotpoint mission

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

Implements DJI::OSDK::MissionBase.

◆ start() [2/2]

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

start the hotpoint mission

Supported Platforms : M210V2, M300
Parameters
timertimeout to wait for ACK

Implements DJI::OSDK::MissionBase.

◆ startCallback()

void HotpointMission::startCallback ( RecvContainer  recvFrame,
UserData  userData 
)
static

A callback function for start non-blocking calls.

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

◆ stop() [1/2]

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

stop the hotpoint mission

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

Implements DJI::OSDK::MissionBase.

◆ stop() [2/2]

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

stop the hotpoint mission

Supported Platforms : M210V2, M300
Parameters
timertimeout to wait for ACK

Implements DJI::OSDK::MissionBase.

◆ updateRadius()

void HotpointMission::updateRadius ( float32_t  meter)

update radius of hotpoint mission

Supported Platforms : M210V2, M300
Parameters
meterradius

◆ updateYawRate() [1/2]

void HotpointMission::updateYawRate ( HotpointMission::YawRate &  Data)

update yaw rate and orientation of hotpoint mission

Supported Platforms : M210V2, M300
Parameters
Dataspecified yaw rate and orientation
callbackcallback function
userDatauser data (void ptr)

◆ updateYawRate() [2/2]

void HotpointMission::updateYawRate ( float32_t  yawRate,
bool  isClockwise 
)

update yaw rate and orientation of hotpoint mission

Supported Platforms : M210V2, M300
Parameters
yawRatespecified yaw rate
isClockwisespecified orientation
timertimeout to wait for ACK

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