diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-19 15:52:59 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-19 15:52:59 +0200 |
commit | dae0b922f166b1c6af79ecce85b3eb00dde22654 (patch) | |
tree | 2021b1a59a3e1276190ca76f9b9095d160cafa49 /apps/systemlib/pid | |
parent | 85bc4f683a4a88cc19a35e1147d19ac5b1106019 (diff) | |
download | px4-firmware-dae0b922f166b1c6af79ecce85b3eb00dde22654.tar.gz px4-firmware-dae0b922f166b1c6af79ecce85b3eb00dde22654.tar.bz2 px4-firmware-dae0b922f166b1c6af79ecce85b3eb00dde22654.zip |
Added deamon example, reworked / merged multirotor attitude control. Ready for AR.Drone interface changes and integration tests
Diffstat (limited to 'apps/systemlib/pid')
-rw-r--r-- | apps/systemlib/pid/pid.c | 6 | ||||
-rw-r--r-- | apps/systemlib/pid/pid.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/systemlib/pid/pid.c b/apps/systemlib/pid/pid.c index a24657a41..807373c15 100644 --- a/apps/systemlib/pid/pid.c +++ b/apps/systemlib/pid/pid.c @@ -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) diff --git a/apps/systemlib/pid/pid.h b/apps/systemlib/pid/pid.h index d62843ed4..83bf09b59 100644 --- a/apps/systemlib/pid/pid.h +++ b/apps/systemlib/pid/pid.h @@ -64,10 +64,10 @@ typedef struct { uint8_t saturated; } PID_t; -void pid_init(PID_t *pid, float kp, float ki, float kd, float intmax, uint8_t mode, uint8_t plot_i); -void pid_set_parameters(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); +__EXPORT void pid_set_parameters(PID_t *pid, float kp, float ki, float kd, float intmax); //void pid_set(PID_t *pid, float sp); -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); |