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:
- 75:7fa924da9d32
- Parent:
- 74:af3b7cedff56
- Child:
- 78:2b9f268ad84c
diff -r af3b7cedff56 -r 7fa924da9d32 servo.cpp
--- a/servo.cpp Thu Aug 26 04:27:01 2021 +0000
+++ b/servo.cpp Wed Sep 01 04:56:47 2021 +0000
@@ -36,12 +36,12 @@
float objgain = 15.0f*M_PI/180.0f;
float pitchobj = objgain * (deobj+updateValues.de_command);
-
+ pc.printf("%f %f \r\n",rpy.x/M_PI*180.0f,rpy.y/M_PI*180.0f);
//ゲインの係数をrc8で変更
- float gaincoef = (rc[7]+1.0f)/2.0f;
+ float gaincoef = 1.0f;
if(gaincoef<0.0f){gaincoef = 0.0f;}
if(gaincoef>1.0f){gaincoef = 1.0f;}
- pitchPID.setGain(6.36, 10.6*gaincoef,0.0);
+ 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);