DJI::OSDK::GimbalModule Class Reference
gimbal module More...
#include <dji_gimbal_module.hpp>
Inheritance diagram for DJI::OSDK::GimbalModule:
Classes | |
struct | callbackWarpperHandler |
Public Types | |
enum | GimbalWorkMode : uint8_t { WORK_MODE_FREE = 0, WORK_MODE_FPV = 1, WORK_MODE_TAW_FOLLOW = 2, WORK_MODE_DONT_CHANGE = 254 } |
the work mode of gimbal More... | |
enum | ReturnCenterCMD : uint8_t { CENTER = 1, SELFIE = 2, PITCH_AND_YAW = 3, PITCH_ONLY = 4, ROLL_ONLY = 5, YAW_ONLY = 6 } |
the work mode of gimbal More... | |
typedef uint8_t | retCodeType |
typedef struct DJI::OSDK::GimbalModule::Rotation | Rotation |
typedef struct DJI::OSDK::GimbalModule::gimbalAngleSetting | gimbalAngleSetting |
typedef struct DJI::OSDK::GimbalModule::gimbalWorkModeAndReturnCenterSetting | gimbalWorkModeAndReturnCenterSetting |
typedef struct DJI::OSDK::GimbalModule::callbackWarpperHandler | callbackWarpperHandler |
Public Member Functions | |
GimbalModule (Linker *linker, PayloadIndexType payloadIndex, std::string name, bool enable) | |
void | resetAsync (void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData) |
reset gimbal in pitch and yaw, non-blocking calls More... | |
ErrorCode::ErrorCodeType | resetSync (int timeout) |
reset gimbal in pitch and yaw, blocking calls More... | |
void | rotateAsync (Rotation rotation, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData) |
reset gimbal in pitch and yaw, non-blocking calls More... | |
ErrorCode::ErrorCodeType | rotateSync (Rotation rotation, int timeout) |
rotate gimbal angle, blocking calls More... | |
Public Member Functions inherited from DJI::OSDK::PayloadBase | |
PayloadBase (Linker *linker, PayloadIndexType index, std::string name, bool enable) | |
void | setEnable (bool en) |
set the enable status of this payload module More... | |
bool | getEnable () |
get the enable status of this payload module More... | |
PayloadIndexType | getIndex () |
std::string | getName () |
void | setName (std::string name) |
Linker * | getLinker () |
Detailed Description
gimbal module
Member Typedef Documentation
◆ callbackWarpperHandler
typedef struct DJI::OSDK::GimbalModule::callbackWarpperHandler DJI::OSDK::GimbalModule::callbackWarpperHandler |
Used as the type of userData to be passed in the callbackWrapperFunc to wrapper the callback handling.
Member Enumeration Documentation
◆ GimbalWorkMode
enum DJI::OSDK::GimbalModule::GimbalWorkMode : uint8_t |
◆ ReturnCenterCMD
enum DJI::OSDK::GimbalModule::ReturnCenterCMD : uint8_t |
Member Function Documentation
◆ resetAsync()
void DJI::OSDK::GimbalModule::resetAsync | ( | void(*)(ErrorCode::ErrorCodeType retCode, UserData userData) | UserCallBack, |
UserData | userData | ||
) |
reset gimbal in pitch and yaw, non-blocking calls
- Parameters
-
UserCallBack callback function defined by user - retCode is the ErrorCode::ErrorCodeType error code
- userData the interface to pass userData in when the callback is called
userData when UserCallBack is called, used in UserCallBack
◆ resetSync()
ErrorCode::ErrorCodeType DJI::OSDK::GimbalModule::resetSync | ( | int | timeout | ) |
reset gimbal in pitch and yaw, blocking calls
- Parameters
-
timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
◆ rotateAsync()
void DJI::OSDK::GimbalModule::rotateAsync | ( | Rotation | rotation, |
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData) | UserCallBack, | ||
UserData | userData | ||
) |
reset gimbal in pitch and yaw, non-blocking calls
- Parameters
-
rotation rotation parameter to be set, ref to DJI::OSDK::GimbalModule::Rotation UserCallBack callback function defined by user - retCode is the ErrorCode::ErrorCodeType error code
- userData the interface to pass userData in when the callback is called
userData when UserCallBack is called, used in UserCallBack
- Returns
- ErrorCode::ErrorCodeType error code
◆ rotateSync()
ErrorCode::ErrorCodeType DJI::OSDK::GimbalModule::rotateSync | ( | Rotation | rotation, |
int | timeout | ||
) |
rotate gimbal angle, blocking calls
- Parameters
-
rotation rotation parameter to be set, ref to DJI::OSDK::GimbalModule::Rotation timeout blocking timeout in seconds
- Returns
- ErrorCode::ErrorCodeType error code
The documentation for this class was generated from the following file:
- osdk-core/modules/inc/payload/dji_gimbal_module.hpp