Skip to content

Commit

Permalink
#12 修改增益关系
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyyttxx committed Dec 31, 2017
1 parent a0af18a commit ec545c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions project/p10-ANO/application/pid.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ void PID_calculate(void)

// 输出值融合到四个电机
if (Thr > 1100) { // 是否锁定状态
motor_pwm_1 = range_pwm( - Pitch - Roll + Yaw, Thr);
motor_pwm_2 = range_pwm( + Pitch - Roll - Yaw, Thr);
motor_pwm_3 = range_pwm( + Pitch + Roll + Yaw, Thr);
motor_pwm_4 = range_pwm( - Pitch + Roll - Yaw, Thr);
motor_pwm_1 = range_pwm( - Pitch - Roll - Yaw, Thr);
motor_pwm_2 = range_pwm( + Pitch - Roll + Yaw, Thr);
motor_pwm_3 = range_pwm( + Pitch + Roll - Yaw, Thr);
motor_pwm_4 = range_pwm( - Pitch + Roll + Yaw, Thr);
} else {
motor_pwm_1 = motor_pwm_min;
motor_pwm_2 = motor_pwm_min;
Expand Down

0 comments on commit ec545c1

Please sign in to comment.