/*! Reset pitch axis of gimbal. Reset pitch axis angle to sum of -90 degree and fine tune angle if gimbal downward,
* sum of 90 degree and fine tune angle if upward. */
DJI_GIMBAL_RESET_MODE_PITCH_DOWNWARD_UPWARD=12,
}E_DjiGimbalResetMode;
/**
* @brief Smooth factor of gimbal controller.
*/
typedefstruct{
uint8_tpitch;/*!< Smooth factor of pitch axis, range from 0 to 30. */
uint8_tyaw;/*!< Smooth factor of yaw axis, range from 0 to 30. */
}T_DjiGimbalControllerSmoothFactor;
/**
* @brief Max speed percentage of every axis of gimbal.
*/
typedefstruct{
uint8_tpitch;/*!< Max speed percentage of pitch axis, range from 1 to 100. */
uint8_tyaw;/*!< Max speed percentage of yaw axis, range from 1 to 100. */
}T_DjiGimbalControllerMaxSpeedPercentage;
/**
* @brief Data structure describes gimbal system state.
*/
typedefstruct{
boolresettingFlag;/*!< Specifies whether gimbal is resetting now or not. */
boolmountedUpward;/*!< Specifies whether gimbal is upward or not. */
boolblockingFlag;/*!< Specifies whether gimbal is stuck or not. */
boolpitchRangeExtensionEnabledFlag;/*!< Specifies whether extended angle range of gimbal pitch axis is enabled or not. */
E_DjiGimbalModegimbalMode;/*!< Gimbal mode. */
T_DjiAttitude3dfineTuneAngle;/*!< Fine tune angles, unit: 0.1 degree. */
T_DjiGimbalControllerSmoothFactorsmoothFactor;/*!< Smooth factor of gimbal controller. */
T_DjiGimbalControllerMaxSpeedPercentagemaxSpeedPercentage;/*!< Max speed percentage of gimbal controller. */
}T_DjiGimbalSystemState;
/**
* @brief Reach limit flag.
*/
typedefstruct{
boolpitch;/*!< Specifies whether gimbal has reached angle limit of pitch axis, if true, reached the limit. */
boolroll;/*!< Specifies whether gimbal has reached angle limit of roll axis, if true, reached the limit. */
boolyaw;/*!< Specifies whether gimbal has reached angle limit of yaw axis, if true, reached the limit. */
}T_DjiGimbalReachLimitFlag;
/**
* @brief Gimbal attitude related information.
*/
typedefstruct{
T_DjiAttitude3dattitude;/*!< Gimbal attitude in the ground coordinate, unit: 0.1 degree. */
T_DjiGimbalReachLimitFlagreachLimitFlag;/*!< Reach limit flag, being set when the joint angles of gimbal reach limits. */
}T_DjiGimbalAttitudeInformation;
/**
* @brief Gimbal calibration state.
*/
typedefstruct{
boolcalibratingFlag;/*!< Specifies whether gimbal is calibrating now or not. */
boollastCalibrationResult;/*!< Result of the last calibration, and true specifies success. */
uint8_tcurrentCalibrationProgress;/*!< Progress percentage of current calibration. If gimbal is calibrating now and fill in real progress percentage, if not, fill in zero. The item ranges from 0 to 100. */
E_DjiGimbalCalibrationStagecurrentCalibrationStage;/*!< Current calibration stage and result. If gimbal is calibrating now and fill in ::DJI_GIMBAL_CALIBRATION_STAGE_PROCRESSING, if not, fill in result of the last calibration. */
}T_DjiGimbalCalibrationState;
/**
* @brief Gimbal rotation command property.
*/
typedefstruct{
struct{
boolpitch;/*!< Specifies whether ignore rotation command of pitch axis, and true specifies ignoring. */
boolroll;/*!< Specifies whether ignore rotation command of roll axis, and true specifies ignoring. */
boolyaw;/*!< Specifies whether ignore rotation command of yaw axis, and true specifies ignoring. */
}rotationValueInvalidFlag;/*!< Specifies whether ignore rotation command of some axis, including pitch, roll and yaw. */
union{
struct{
uint16_tactionTime;/*!< Action time during which gimbal move to target angles, unit: 0.01s. */
}relativeAngleRotation;/*!< Property of relative angle rotation command. */
struct{
uint16_tactionTime;/*!< Action time during which gimbal move to target angles, unit: 0.01s. */
/*! Joint angle valid flag, specifying whether
* T_DjiGimbalRotationProperty::absoluteAngleRotation::jointAngle is valid when absolute angle control. */
booljointAngleValid;
/*! Joint angles of gimbal, unit: 0.1 degree. If
* T_DjiGimbalRotationProperty::absoluteAngleRotation::jointAngleValid is false, specifying here joint
* angles are invalid, and please ignore the joint angles. If joint angles are valid, users should ensure
* that target joint angles of gimbal is approximately the same as the specified value. */
T_DjiAttitude3djointAngle;
}absoluteAngleRotation;/*!< Property of absolute angle rotation command. */
};
}T_DjiGimbalRotationProperty;
/**
* @brief Common handler function prototypes of gimbal, that is, some common callback function prototypes of gimbal.
* @warning User can not execute blocking style operations or functions in callback function, because that will block DJI
* root thread, causing problems such as slow system response, payload disconnection or infinite loop.
*/
typedefstruct{
/*!
* @brief Prototype of callback function used to report system state of gimbal.
* @param systemState: pointer to memory space used to store gimbal system state.