mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 01:13:35 +08:00
Added deamon example, reworked / merged multirotor attitude control. Ready for AR.Drone interface changes and integration tests
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
|
||||
#include "pid.h"
|
||||
|
||||
void pid_init(PID_t *pid, float kp, float ki, float kd, float intmax,
|
||||
__EXPORT void pid_init(PID_t *pid, float kp, float ki, float kd, float intmax,
|
||||
uint8_t mode, uint8_t plot_i)
|
||||
{
|
||||
pid->kp = kp;
|
||||
@@ -57,7 +57,7 @@ void pid_init(PID_t *pid, float kp, float ki, float kd, float intmax,
|
||||
pid->error_previous = 0;
|
||||
pid->integral = 0;
|
||||
}
|
||||
void pid_set_parameters(PID_t *pid, float kp, float ki, float kd, float intmax)
|
||||
__EXPORT void pid_set_parameters(PID_t *pid, float kp, float ki, float kd, float intmax)
|
||||
{
|
||||
pid->kp = kp;
|
||||
pid->ki = ki;
|
||||
@@ -84,7 +84,7 @@ void pid_set_parameters(PID_t *pid, float kp, float ki, float kd, float intmax)
|
||||
* @param dt
|
||||
* @return
|
||||
*/
|
||||
float pid_calculate(PID_t *pid, float sp, float val, float val_dot, float dt)
|
||||
__EXPORT float pid_calculate(PID_t *pid, float sp, float val, float val_dot, float dt)
|
||||
{
|
||||
/* error = setpoint - actual_position
|
||||
integral = integral + (error*dt)
|
||||
|
||||
Reference in New Issue
Block a user