Test: prefab PID

This commit is contained in:
but0n 2017-09-19 22:48:03 +08:00
parent 2a77b60be4
commit ae12248ec1
2 changed files with 5 additions and 8 deletions

View File

@ -16,9 +16,6 @@ pid_st avm_pid = {
.InnerLast = 0,
.OutterLast = 0,
.Feedback = &g_Roll,
.p = 0,
.i = 0,
.d = 0,
.Channel1 = &MOTOR2,
.Channel2 = &MOTOR4,
.Gyro = &avm_euler.gX,

View File

@ -1,13 +1,13 @@
#ifndef _AVM_PID_H_
#define _AVM_PID_H_
#define OUTTER_LOOP_KP 0 //0.257 * 0.83 0.255
#define OUTTER_LOOP_KI 0
#define OUTTER_LOOP_KD 0
#define OUTTER_LOOP_KP 3 //0.257 * 0.83 0.255
#define OUTTER_LOOP_KI 1
#define OUTTER_LOOP_KD 0.3f
#define INNER_LOOP_KP 0.03f
#define INNER_LOOP_KP 1
#define INNER_LOOP_KI 0
#define INNER_LOOP_KD 0
#define INNER_LOOP_KD 0.3f
#define SUM_ERRO_MAX 900
#define SUM_ERRO_MIN -900