Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed MatrixMath LPS25HB_I2C LSM9DS1 Matrix2 PIDcontroller LoopTicker SBUS_without_mainfile UsaPack solaESKF_wind Vector3 CalibrateMagneto FastPWM
Diff: servo.cpp
- Revision:
- 78:2b9f268ad84c
- Parent:
- 75:7fa924da9d32
- Child:
- 80:31e0ffc82931
diff -r f6617891a867 -r 2b9f268ad84c servo.cpp
--- a/servo.cpp Tue Sep 07 06:19:42 2021 +0000
+++ b/servo.cpp Wed Sep 29 03:20:39 2021 +0000
@@ -43,8 +43,8 @@
if(gaincoef>1.0f){gaincoef = 1.0f;}
pitchPID.setGain(6.36, 10.6*gaincoef*0.0f,0.0);
pitchratePID.setGain(0.9540,0.0,0.0);
- pitchPID.setProcessValue(rpy.x);
- pitchratePID.setProcessValue(gyro.x);
+ pitchPID.setProcessValue(-rpy.y);
+ pitchratePID.setProcessValue(-gyro.y);
//目標値のセット
pitchPID.setSetPoint(pitchobj); //目標の設定