LED入れ替え

Dependencies:   HCSR04_2 MPU6050_2 mbed SDFileSystem3

Fork of Autoflight2018_55 by 航空研究会

Revision:
35:25e1afadd455
Parent:
34:5719e6977ec7
Child:
36:197b514eae3b
--- a/main.cpp	Mon Sep 24 04:24:51 2018 +0000
+++ b/main.cpp	Tue Sep 25 04:56:24 2018 +0000
@@ -151,22 +151,22 @@
 OperationMode operation_mode = StartUp;
 BombingMode bombing_mode = Takeoff;
 
-static int16_t autopwm[8] = {1500,1500,1180,1500,1454,1500};
-
+static int16_t autopwm[8] = {1455,1450,1176,1628,1512,1452};
+/*
 //1号機
 static int16_t trimpwm[6] = {1580,1600,1176,1404,1440,1448};
 int16_t maxpwm[6] = {1796,1936,1848,1740,1820,1856};
 int16_t minpwm[6] = {1182,1265,1176,1068,1180,1176};
 const int16_t reverce[4] = {Reverce_falfalla[0],Reverce_falfalla[1],Reverce_falfalla[2],Reverce_falfalla[3]};
-
+*/
 
 //2号機
-/*
-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};
+
+static int16_t trimpwm[6] = {1455,1450,1176,1628,1512,1452};
+int16_t maxpwm[6] = {1672,1786,1848,1964,1820,1860};
+int16_t minpwm[6] = {1057,1115,1176,1292,1180,1180};
 const int16_t reverce[4] = {Reverce_falfalla[0],Reverce_falfalla[1],Reverce_falfalla[2],Reverce_falfalla[3]};
-*/
+
 
 int16_t oldTHR = 1000;
 
@@ -1306,6 +1306,10 @@
     static int tELE_start = 0;
     static bool flg_ELEup = false;
     int t_def = 0;
+    
+    autopwm[RUD] = trimpwm[RUD];
+    
+    
     if(!flg_ELEup && CheckSW_Up(Ch7)){
         tELE_start = t.read_ms();
         flg_ELEup = true;
@@ -1658,7 +1662,8 @@
     //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[AIL_L]); // pc.printf("%d\t",autopwm[RUD]);
+    //pc.printf("%d\t",autopwm[AIL_L]);  
+    //pc.printf("%d\t",autopwm[RUD]);
     //pc.printf("%d",g_distance);
     //NVIC_DisableIRQ(EXTI9_5_IRQn); 
     //pc.printf("g_distance = %d",g_distance);