HAPSRG / Mbed 2 deprecated HAPStail

Dependencies:   mbed MatrixMath LPS25HB_I2C LSM9DS1 Matrix2 PIDcontroller LoopTicker SBUS_without_mainfile UsaPack solaESKF_wind Vector3 CalibrateMagneto FastPWM

Revision:
67:1da4e7ccdd2b
Parent:
66:a210d7130a44
Child:
68:11ffadc7adb1
--- a/servo.cpp	Tue Jun 22 10:12:21 2021 +0000
+++ b/servo.cpp	Tue Jun 22 11:57:58 2021 +0000
@@ -44,7 +44,15 @@
     pitchPID.setSetPoint(pitchobj); //目標の設定
     de = pitchPID.compute()+pitchratePID.compute();
     
-    scaledServoOut[0]=de;
+    if (pos_tail == 0)
+    {
+        
+        scaledServoOut[0]=-de;
+    }
+    else
+    {
+        scaledServoOut[0]=de;
+    }
     
     float LP_servo = 0.2;
     for(int i = 0; i < sizeof(servoOut)/sizeof(servoOut[0]); i++)