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_36 by
Diff: main.cpp
- Revision:
- 7:53b0eb6f6bd3
- Parent:
- 6:ed61ed8b8fab
- Child:
- 8:66bba39b95a9
diff -r ed61ed8b8fab -r 53b0eb6f6bd3 main.cpp
--- a/main.cpp Thu Sep 13 13:05:22 2018 +0000
+++ b/main.cpp Thu Sep 13 13:35:38 2018 +0000
@@ -141,7 +141,7 @@
OperationMode operation_mode = StartUp;
BombingMode bombing_mode = Takeoff;
static int16_t autopwm[8] = {1500,1500,1180,1500,1392,1500};
-static int16_t trimpwm[6] = {1500,1500,1180,1500,1392,1500};
+static int16_t trimpwm[6] = {1500,1500,1180,1500,1392,1600};
int16_t maxpwm[6] = {1820,1820,1820,1820,1820,1820};
int16_t minpwm[6] = {1180,1180,1180,1180,1180,1180};
int16_t oldTHR = 1000;
@@ -973,11 +973,11 @@
targetAngle[ROLL] = g_glideloopROLL;
targetAngle[PITCH] = g_glideloopPITCH;
- autopwm[THR]=oldTHR;
+ // autopwm[THR]=oldTHR;
//シリアル通信受信の割り込みイベント登録
pc.attach(ISR_Serial_Rx, Serial::RxIrq);
-/*
+
//時間計測開始設定
if(!flg_tstart && CheckSW_Up(Ch7)){
t_start = t.read();
@@ -1017,7 +1017,7 @@
autopwm[THR] = 1180;
THRcount = 0;
}
- }*/
+ }
}
//離陸-投下-着陸一連
void Take_off_and_landing(float targetAngle[3]){
@@ -1318,7 +1318,7 @@
//pc.printf("\r\n");
//for(uint8_t i=0; i<3; i++) pc.printf("%3.2f\t",nowAngle[i]);
//for(uint8_t i=0; i<2; i++) pc.printf("%3.2f\t",nowAngle[i]); //ロール、ピッチのみ 小数点以下2ケタ
- //pc.printf("%d\t",autopwm[ELE]); pc.printf("%d\t",autopwm[RUD]);
+ pc.printf("%d\t",autopwm[AIL_L]); // pc.printf("%d\t",autopwm[RUD]);
//pc.printf("%d",g_distance);
//pc.printf("Mode: %c: ",g_buf[0]);
