M350b版本

This commit is contained in:
xin
2025-12-24 09:19:07 +08:00
parent 257708ae42
commit 7396728ea7
627 changed files with 42382 additions and 250967 deletions

View File

@ -28,6 +28,7 @@
#define DJI_GIMBAL_MANAGER_H
/* Includes ------------------------------------------------------------------*/
#include <dji_gimbal.h>
#include "dji_typedef.h"
#ifdef __cplusplus
@ -45,13 +46,13 @@ typedef struct {
dji_f32_t pitch; /*!< Pitch angle in degree, unit: deg */
dji_f32_t roll; /*!< Roll angle in degree, unit: deg */
dji_f32_t yaw; /*!< Yaw angle in degree, unit: deg */
dji_f64_t time; /*!< Expect execution time of gimbal rotation, unit: second. */
dji_f64_t time; /*!< Expected execution time for gimbal rotation, in seconds. */
} T_DjiGimbalManagerRotation;
/* Exported functions --------------------------------------------------------*/
/**
* @brief Initialize the gimbal manager module.
* @note The interface initialization needs to be after DjiCore_Init.
* @note This interface must be initialized after DjiCore_Init.
* @return Execution result.
*/
T_DjiReturnCode DjiGimbalManager_Init(void);
@ -73,19 +74,60 @@ T_DjiReturnCode DjiGimbalManager_SetMode(E_DjiMountPosition mountPosition, E_Dji
/**
* @brief Reset the pitch and yaw of the gimbal.
* @param mountPosition: gimbal mount position, input limit see enum E_DjiMountPosition
* @param mode: reset mode, input limit see enum E_DjiGimbalResetMode
* @return Execution result.
*/
T_DjiReturnCode DjiGimbalManager_Reset(E_DjiMountPosition mountPosition);
T_DjiReturnCode DjiGimbalManager_Reset(E_DjiMountPosition mountPosition, E_DjiGimbalResetMode resetMode);
/**
* @brief Rotate the angle of the gimbal.
* @param mountPosition: gimbal mount position, input limit see enum E_DjiMountPosition
* @param rotation: the rotation parameters to be executed on the target gimbal, including the rotation mode, target
* angle value and executed time, ref to T_DjiGimbalManagerRotation
* angle value and executed time, refer to T_DjiGimbalManagerRotation
* @return Execution result.
*/
T_DjiReturnCode DjiGimbalManager_Rotate(E_DjiMountPosition mountPosition, T_DjiGimbalManagerRotation rotation);
/*!
* @brief Prototype of callback function used to enable or disable extended pitch axis angle range.
* @note Switching the gimbal limit euler angle of pitch axis to the extended limit angle or the default limit
* angle.
* @param mountPosition: gimbal mount position, input limit see enum E_DjiMountPosition
* @param enabledFlag: flag specifying whether to enable or disable the extended pitch axis angle range..
* @return Execution result.
*/
T_DjiReturnCode DjiGimbalManager_SetPitchRangeExtensionEnabled(E_DjiMountPosition mountPosition, bool enabledFlag);
/**
* @brief Set max speed percentage for gimbal controller.
* @param mountPosition: gimbal mount position, input limit see enum E_DjiMountPosition
* @param axis: axis to be set.
* @param maxSpeedPercentage: max speed value. Recommended calculation formula is "spd = default_max_spd * x / 100",
* where 'x' is the default maximum speed value. Range from 1 to 100.
* @return Execution result.
*/
T_DjiReturnCode DjiGimbalManager_SetControllerMaxSpeedPercentage(E_DjiMountPosition mountPosition, E_DjiGimbalAxis axis,
uint8_t maxSpeedPercentage);
/**
* @brief Set smooth factor for gimbal controller, using for smooth control.
* @param mountPosition: gimbal mount position, input limit see enum E_DjiMountPosition
* @param axis: axis to be set.
* @param smoothingFactor: smooth factor. A larger value results in slower gimbal acceleration. Recommended
* calculation formula is "acc = 10000 * (0.8 ^ (1 + x)) deg/s^2", x is smooth factor. Range from 0 to 30.
* @return Execution result.
*/
T_DjiReturnCode DjiGimbalManager_SetControllerSmoothFactor(E_DjiMountPosition mountPosition, E_DjiGimbalAxis axis,
uint8_t smoothingFactor);
/**
* @brief Restore factory settings of gimbal, including fine tune angle, pitch angle extension enable flag and max
* speed etc.
* @param mountPosition: gimbal mount position, input limit see enum E_DjiMountPosition
* @return Execution result.
*/
T_DjiReturnCode DjiGimbalManager_RestoreFactorySettings(E_DjiMountPosition mountPosition);
#ifdef __cplusplus
}
#endif