30 lines
607 B
C
30 lines
607 B
C
|
#ifndef GIMBAL_H
|
||
|
#define GIMBAL_H
|
||
|
#include "robot_def.h"
|
||
|
/**
|
||
|
* @brief 初始化云台,会被RobotInit()调用
|
||
|
*
|
||
|
*/
|
||
|
void GimbalInit();
|
||
|
|
||
|
/**
|
||
|
* @brief 云台任务
|
||
|
*
|
||
|
*/
|
||
|
void GimbalTask();
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
uint32_t cnt;//计时用
|
||
|
uint8_t frequency_index;//运行到哪个频率
|
||
|
float time;
|
||
|
float frequency[64];
|
||
|
float DeltaT;
|
||
|
float input;
|
||
|
} sin_input_generate_t;
|
||
|
|
||
|
void sin_input_frequency_init(sin_input_generate_t* InputGenerate);
|
||
|
float sin_input_generate(sin_input_generate_t* InputGenerate);
|
||
|
float step_input_generate(sin_input_generate_t* InputGenerate);
|
||
|
|
||
|
#endif // GIMBAL_H
|