Skip to content

Commit

Permalink
加速度计单位控制到度每秒
Browse files Browse the repository at this point in the history
  • Loading branch information
daisenryaku committed Jan 1, 2018
1 parent fc2e557 commit 7dc9fc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions project/p10-ANO/application/pid.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ void CtrlAttiRate(void)
yaw_rate_PID.Desired = range_trans(u16Rcvr_ch4, 5);

uint32_t tnow = msTimerCounter;
PID_postion_cal(&roll_rate_PID, gyro[0], tnow-told); // DMP_GYRO_SCALE
PID_postion_cal(&pitch_rate_PID, gyro[1], tnow-told);
PID_postion_cal(&yaw_rate_PID, gyro[2], tnow-told);
PID_postion_cal(&roll_rate_PID, gyro[0] / DMP_GYRO_SCALE, tnow-told); // DMP_GYRO_SCALE
PID_postion_cal(&pitch_rate_PID, gyro[1] / DMP_GYRO_SCALE, tnow-told);
PID_postion_cal(&yaw_rate_PID, gyro[2] / DMP_GYRO_SCALE, tnow-told);
told = tnow;
}

Expand Down

0 comments on commit 7dc9fc8

Please sign in to comment.