dji_control.hpp
Go to the documentation of this file.
577 ACK::ErrorCode killSwitch(KillSwitch cmd, int wait_timeout = 10, char debugMsg[10] = (char *)"OSDK_API");
589 void killSwitch(KillSwitch cmd, char debugMsg[10] = (char *)"OSDK_API", VehicleCallBack callback = 0, UserData userData = 0);
void * UserData
This is used as the datatype for all data arguments in callbacks.
Definition: dji_type.hpp:75
void action(const int cmd, VehicleCallBack callback=0, UserData userData=0)
Basic action command for the vehicle, see FlightCommand for cmd choices.
Definition: dji_control.cpp:49
ACK::ErrorCode land(int wait_timeout)
Wrapper function for landing.
Definition: dji_control.cpp:287
Definition: dji_control.hpp:184
ACK::ErrorCode takeoff(int wait_timeout)
Wrapper function for take off.
Definition: dji_control.cpp:219
static void actionCallback(Vehicle *vehiclePtr, RecvContainer recvFrame, UserData userData)
A callback function for action non-blocking calls.
Definition: dji_control.cpp:499
struct DJI::OSDK::Control::CtrlData CtrlData
CtrlData used for flight control.
static const int courseLock
Definition: dji_control.hpp:74
ACK::ErrorCode killSwitch(KillSwitch cmd, int wait_timeout=10, char debugMsg[10]=(char *)"OSDK_API")
Turn on or off the kill switch.
Definition: dji_control.cpp:437
Type definition for new Vehicle-style callbacks.
struct DJI::OSDK::Control::AdvancedCtrlData AdvancedCtrlData
AdvancedCtrlData.
void attitudeAndVertPosCtrl(float32_t roll, float32_t pitch, float32_t yaw, float32_t z)
Control the attitude and vertical position of the vehicle.
Definition: dji_control.cpp:375
Flight control API: high-level actions and low-level control modes.
Definition: dji_control.hpp:48
void releaseCtrlAuthority(VehicleCallBack callback=0, UserData userData=0)
Release the control authority of the api (non-blocking call)
Definition: dji_control.cpp:589
ACK::ErrorCode armMotors(int wait_timeout)
Wrapper function for arming the motors.
Definition: dji_control.cpp:151
void flightCtrl(CtrlData data)
Control the vehicle using user-specified mode.
Definition: dji_control.cpp:321
Definition: dji_control.hpp:143
void(* VehicleCallBack)(Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
Function prototype for all callback functions used in the OSDK.
Definition: dji_vehicle_callback.hpp:76
void positionAndYawCtrl(float32_t x, float32_t y, float32_t z, float32_t yaw)
Control the position and yaw angle of the vehicle. The reference frame is the DJI::OSDK::Control::HOR...
Definition: dji_control.cpp:350
Definition: dji_control.hpp:159
CtrlData(uint8_t in_flag, float32_t in_x, float32_t in_y, float32_t in_z, float32_t in_yaw)
CtrlData initialize the CtrlData variable.
Definition: dji_control.cpp:521
struct DJI::OSDK::ACK::ErrorCode ErrorCode
This struct is returned from all blocking calls, except certain mission calls that have explicit type...
KillSwitch
turn on or off the motors for emergency reasons
Definition: dji_control.hpp:208
void emergencyBrake()
Stop the vehicle in horiz velocity, vert velocity, yaw rate mode (body frame)
Definition: dji_control.cpp:413
StableMode
bit 0 of the 8-bit (7:0) CtrlData.flag.
Definition: dji_control.hpp:199
Definition: dji_control.hpp:210
Definition: dji_control.hpp:201
Definition: dji_control.hpp:135
Definition: dji_control.hpp:211
Definition: dji_control.hpp:151
ACK::ErrorCode goHome(int wait_timeout)
Wrapper function for go Home.
Definition: dji_control.cpp:253
HorizontalCoordinate
bit 2:1 of the 8-bit (7:0) CtrlData.flag
Definition: dji_control.hpp:181
Definition: dji_control.hpp:113
ACK::ErrorCode disArmMotors(int wait_timeout)
Wrapper function for disarming the motors.
Definition: dji_control.cpp:185
Data type and Data Structure definitions for use throughout DJI OSDK.
Definition: dji_control.hpp:202
Definition: dji_control.hpp:170
YawLogic
bit 3 of the 8-bit (7:0) CtrlData.flag
Definition: dji_control.hpp:163
Definition: dji_ack.cpp:38
void angularRateAndVertPosCtrl(float32_t rollRate, float32_t pitchRate, float32_t yawRate, float32_t z)
Control the attitude rate and vertical position of the vehicle.
Definition: dji_control.cpp:387
Definition: dji_control.hpp:186
HorizontalLogic
bit 7:6 of the 8-bit (7:0) CtrlData.flag
Definition: dji_control.hpp:126
All DJI OSDK ACK parsing.
void obtainCtrlAuthority(VehicleCallBack callback=0, UserData userData=0)
Obtain the control authority of the api (non-blocking call)
Definition: dji_control.cpp:548
VerticalLogic
bit 5:4 of the 8-bit (7:0) CtrlData.flag
Definition: dji_control.hpp:96
Definition: dji_control.hpp:176
Definition: dji_control.hpp:103
void velocityAndYawRateCtrl(float32_t Vx, float32_t Vy, float32_t Vz, float32_t yawRate)
Control the velocity and yaw rate of the vehicle. The reference frame is the DJI::OSDK::Control::HORI...
Definition: dji_control.cpp:363
Definition: dji_control.hpp:108