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: HCSR04_2 MPU6050_2 mbed SDFileSystem3
Fork of Autoflight2018_51 by
Diff: main.cpp
- Revision:
- 37:990047c4dc20
- Parent:
- 36:197b514eae3b
- Child:
- 38:ef0f39dfc98a
--- a/main.cpp Tue Sep 25 06:58:19 2018 +0000
+++ b/main.cpp Tue Sep 25 09:28:13 2018 +0000
@@ -1404,9 +1404,9 @@
UpdateTargetAngle_Rightloop_zero(targetAngle);
}
else{
- targetAngle[ROLL] = g_rightloopROLL;
+ targetAngle[ROLL] = g_rightloopROLL_aproach;
targetAngle[PITCH] = g_rightloopPITCH ;
- autopwm[RUD]=g_rightloopRUD; //RUD固定
+ autopwm[RUD]=g_rightloopRUD_aproach; //RUD固定
if(autopwm[AIL_R]<trimpwm[AIL_R]){ //エルロン上がりやすさ調節
autopwm[AIL_L]=trimpwm[AIL_L]+AIL_L_correctionrightloop+(autopwm[AIL_R]-trimpwm[AIL_R])*AIL_L_RatioRising;
}
@@ -1422,9 +1422,9 @@
UpdateTargetAngle_Leftloop_zero(targetAngle);
}
else{
- targetAngle[ROLL] = g_leftloopROLL;
+ targetAngle[ROLL] = g_leftloopROLL_aproach;
targetAngle[PITCH] = g_leftloopPITCH;
- autopwm[RUD]=g_leftloopRUD;
+ autopwm[RUD]=g_leftloopRUD_aproach;
if(autopwm[AIL_R]<trimpwm[AIL_R]){
autopwm[AIL_L]=trimpwm[AIL_L]+AIL_L_correctionleftloop+(autopwm[AIL_R]-trimpwm[AIL_R])*AIL_L_RatioRising;
}
@@ -1567,9 +1567,9 @@
//右旋回(着陸時スロットル0の時)
void UpdateTargetAngle_Rightloop_zero(float targetAngle[3]){ //右旋回
autopwm[THR]=minpwm[THR];
- targetAngle[ROLL] = g_rightloopROLL;
+ targetAngle[ROLL] = g_rightloopROLL_aproach;
targetAngle[PITCH] = g_rightloopPITCH ;
- autopwm[RUD]=g_rightloopRUD; //RUD固定
+ autopwm[RUD]=g_rightloopRUD_aproach; //RUD固定
if(autopwm[AIL_R]<trimpwm[AIL_R]){ //エルロン上がりやすさ調節
autopwm[AIL_L]=trimpwm[AIL_L]+AIL_L_correctionrightloop+(autopwm[AIL_R]-trimpwm[AIL_R])*AIL_L_RatioRising;
}
@@ -1613,9 +1613,9 @@
//左旋回(着陸時スロットル0のとき)
void UpdateTargetAngle_Leftloop_zero(float targetAngle[3]){
- targetAngle[ROLL] = g_leftloopROLL;
+ targetAngle[ROLL] = g_leftloopROLL_aproach;
targetAngle[PITCH] = g_leftloopPITCH;
- autopwm[RUD]=g_leftloopRUD;
+ autopwm[RUD]=g_leftloopRUD_aproach;
autopwm[THR] = minpwm[THR];
if(autopwm[AIL_R]<trimpwm[AIL_R]){
autopwm[AIL_L]=trimpwm[AIL_L]+AIL_L_correctionleftloop+(autopwm[AIL_R]-trimpwm[AIL_R])*AIL_L_RatioRising;
