[MOD]: Removed Constant Argument

This commit is contained in:
but0n 2016-12-09 18:34:44 +08:00
parent 8e3f90dba0
commit 5dc49f5d65
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ extern float g_Yaw, g_Pitch, g_Roll; //eular
#define INNER_LOOP_KP 0.018f
#define INNER_LOOP_KI 0
#define INNER_LOOP_KD 0.4f
#define INNER_LOOP_KD 0
#define SUM_ERRO_MAX 900
#define SUM_ERRO_MIN -900

View File

@ -14,7 +14,7 @@ void pid_SingleAxis(pid_pst temp, float setPoint) {
temp->output = (short)(OUTTER_LOOP_KP * (temp->Error) + OUTTER_LOOP_KI * temp->i + OUTTER_LOOP_KD * temp->d);
temp->OutterLast = *temp->Feedback; //Save Old Data
//Inner Loop PD
temp->p = temp->output + *temp->Gyro * 3.5f;
temp->p = temp->output + *temp->Gyro;
temp->d = *temp->Gyro - temp->InnerLast;
temp->output = (short)(INNER_LOOP_KP * temp->p + INNER_LOOP_KD * temp->d);