#include <dji_waypoint_v2.hpp>
Public Member Functions | |
WaypointV2MissionOperator (Vehicle *vehiclePtr) | |
ErrorCode::ErrorCodeType | init (WayPointV2InitSettings *info, int timeout) |
Init waypoint v2 mission settings. More... | |
ErrorCode::ErrorCodeType | downloadInitSetting (WayPointV2InitSettingsInternal &info, int timeout) |
Download the waypoint v2 init settings. More... | |
ErrorCode::ErrorCodeType | start (int timeout) |
Start execute waypoint v2 mission. More... | |
ErrorCode::ErrorCodeType | stop (int timeout) |
Stop execute waypoint v2 mission. More... | |
ErrorCode::ErrorCodeType | pause (int timeout) |
Pause waypoint v2 mission. More... | |
ErrorCode::ErrorCodeType | resume (int timeout) |
Resume waypoint v2 mission. More... | |
ErrorCode::ErrorCodeType | uploadMission (int timeout) |
Upload all the waypoint v2 mission. More... | |
ErrorCode::ErrorCodeType | downloadMission (std::vector< WaypointV2 > &mission, int timeout) |
Download all the waypoint v2 mission. More... | |
ErrorCode::ErrorCodeType | getGlobalCruiseSpeed (GlobalCruiseSpeed &cruiseSpeed, int timeout) |
Get the global cruise speed setting from flight controller. More... | |
ErrorCode::ErrorCodeType | setGlobalCruiseSpeed (const GlobalCruiseSpeed &cruiseSpeed, int timeout) |
Set the global cruise speed to flight controller. More... | |
ErrorCode::ErrorCodeType | uploadAction (std::vector< DJIWaypointV2Action > &actions, int timeout) |
Upload all actions to flight controller. More... | |
ErrorCode::ErrorCodeType | getActionRemainMemory (GetRemainRamAck &remainRamAck, int timeout) |
Get action's remain memory. More... | |
ErrorCode::ErrorCodeType | getWaypointIndexInList (GetWaypontStartEndIndexAck &startEndIndexAck, int timeout) |
Get mission's waypoint start index and end index. More... | |
DJIWaypointV2MissionState | getCurrentState () |
Get current status of the mission executing process. More... | |
DJIWaypointV2MissionState | getPrevState () |
Get previous status of the mission executing process. More... | |
void | setPrevState (DJIWaypointV2MissionState state) |
Set previous status of the mission executing process. More... | |
void | setCurrentState (DJIWaypointV2MissionState state) |
Set current state of the waypoint V2 mission. More... | |
float32_t | getTakeoffAltitude () |
Get the take-off altitude of waypoint V2 mission. More... | |
void | setTakeoffAltitude (float32_t altitude) |
set the take-off altitude of waypoint V2 mission More... | |
void | RegisterMissionEventCallback (void *userData, PushCallback cb=NULL) |
Subscribe to waypointV2 event with a callback function. More... | |
void | RegisterMissionStateCallback (void *userData, PushCallback cb=NULL) |
Subscribe to waypointV2 mission state with a callback function. More... | |
Public Attributes | |
const uint16_t | MAX_WAYPOINT_NUM_SIGNAL_PUSH = 260 |
Detailed Description
The waypoint operator is the only object that controls, runs and monitors Waypoint v2 Missions.
Member Function Documentation
◆ downloadInitSetting()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::downloadInitSetting | ( | WayPointV2InitSettingsInternal & | info, |
int | timeout | ||
) |
Download the waypoint v2 init settings.
- Supported Platforms : M300
- Parameters
-
Info init settings struct DJI::OSDK::WayPointV2InitSettingsInternal timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
◆ downloadMission()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::downloadMission | ( | std::vector< WaypointV2 > & | mission, |
int | timeout | ||
) |
Download all the waypoint v2 mission.
- Supported Platforms : M300
- Parameters
-
mission vector contains of a series of WaypointV2, refer the definition of DJI::OSDK::WaypointV2 timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
◆ getActionRemainMemory()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::getActionRemainMemory | ( | GetRemainRamAck & | remainRamAck, |
int | timeout | ||
) |
Get action's remain memory.
- Supported Platforms : M300
- Parameters
-
remainRamAck contains total memory and remain memory refer to the definition of DJI::OSDK::GetRemainRamAck timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
◆ getCurrentState()
|
inline |
Get current status of the mission executing process.
- Supported Platforms : M300
- Returns
- DJIWaypointV2MissionState state
◆ getGlobalCruiseSpeed()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::getGlobalCruiseSpeed | ( | GlobalCruiseSpeed & | cruiseSpeed, |
int | timeout | ||
) |
Get the global cruise speed setting from flight controller.
- Supported Platforms : M300
- Parameters
-
cruiseSpeed auto cruise speed refer to definition of DJI::OSDK::GlobalCruiseSpeed, timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code, 0: success, other: fail
◆ getPrevState()
|
inline |
Get previous status of the mission executing process.
- Supported Platforms : M300
- Returns
- DJIWaypointV2MissionState state
◆ getTakeoffAltitude()
|
inline |
Get the take-off altitude of waypoint V2 mission.
- Supported Platforms : M300
- Returns
- Waypoint Mission take-off altitude
◆ getWaypointIndexInList()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::getWaypointIndexInList | ( | GetWaypontStartEndIndexAck & | startEndIndexAck, |
int | timeout | ||
) |
Get mission's waypoint start index and end index.
- Supported Platforms : M300
- Parameters
-
startEndIndexAck contains start index and end index refer to the definition of DJI::OSDK::GetWaypontStartEndIndexAck timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
◆ init()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::init | ( | WayPointV2InitSettings * | info, |
int | timeout | ||
) |
Init waypoint v2 mission settings.
- Supported Platforms : M300
- Parameters
-
Info init settings struct DJI::OSDK::WayPointV2InitSettings timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
Unit transform from m/s to cm/s
Set reference altitude is takeoff altitude
waiting for takeoff altitude subscription
◆ pause()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::pause | ( | int | timeout | ) |
Pause waypoint v2 mission.
- Supported Platforms : M300
- Parameters
-
timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
◆ RegisterMissionEventCallback()
void WaypointV2MissionOperator::RegisterMissionEventCallback | ( | void * | userData, |
PushCallback | cb = NULL |
||
) |
Subscribe to waypointV2 event with a callback function.
- Supported Platforms : M300
- Parameters
-
cb callback function.default:null
◆ RegisterMissionStateCallback()
void WaypointV2MissionOperator::RegisterMissionStateCallback | ( | void * | userData, |
PushCallback | cb = NULL |
||
) |
Subscribe to waypointV2 mission state with a callback function.
- Supported Platforms : M300
- Parameters
-
cb callback function.default:null
◆ resume()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::resume | ( | int | timeout | ) |
Resume waypoint v2 mission.
- Supported Platforms : M300
- Parameters
-
timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
◆ setCurrentState()
|
inline |
Set current state of the waypoint V2 mission.
- Supported Platforms : M300
◆ setGlobalCruiseSpeed()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::setGlobalCruiseSpeed | ( | const GlobalCruiseSpeed & | cruiseSpeed, |
int | timeout | ||
) |
Set the global cruise speed to flight controller.
- Supported Platforms : M300
- Parameters
-
cruiseSpeed auto cruise speed refer to definition of DJI::OSDK::GlobalCruiseSpeed, cruiseSpeed must in the range of [0, WayPointV2InitSettings::maxFlightSpeed] timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code, 0: success, other: fail
◆ setPrevState()
|
inline |
Set previous status of the mission executing process.
- Supported Platforms : M300
◆ setTakeoffAltitude()
|
inline |
set the take-off altitude of waypoint V2 mission
- Supported Platforms : M300
◆ start()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::start | ( | int | timeout | ) |
Start execute waypoint v2 mission.
- Supported Platforms : M300
- Parameters
-
timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
◆ stop()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::stop | ( | int | timeout | ) |
Stop execute waypoint v2 mission.
- Supported Platforms : M300
- Parameters
-
timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
◆ uploadAction()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::uploadAction | ( | std::vector< DJIWaypointV2Action > & | actions, |
int | timeout | ||
) |
Upload all actions to flight controller.
- Supported Platforms : M300
- Parameters
-
actions vector contains of a series of action, refer for the definition of DJI::OSDK::DJIWaypointV2Action timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
◆ uploadMission()
ErrorCode::ErrorCodeType WaypointV2MissionOperator::uploadMission | ( | int | timeout | ) |
Upload all the waypoint v2 mission.
- Supported Platforms : M300
- Parameters
-
mission vector contains of a series of WaypointV2, refer the definition of DJI::OSDK::WaypointV2 timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
The documentation for this class was generated from the following files:
- osdk-core/api/inc/dji_waypoint_v2.hpp
- osdk-core/api/src/dji_waypoint_v2.cpp