pc,attachの変更

Dependencies:   HCSR04_2 MPU6050_2 mbed SDFileSystem3

Fork of Autoflight2018_36 by 航空研究会

Revision:
26:bc185a3d16b6
Parent:
25:37bee299a276
Child:
27:61876b34ded4
--- a/main.cpp	Thu Sep 20 15:18:19 2018 +0000
+++ b/main.cpp	Fri Sep 21 04:26:30 2018 +0000
@@ -157,6 +157,7 @@
 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};
@@ -583,6 +584,14 @@
     }
 #endif
 
+    if(CheckSW_Up(Ch7)){
+            output_status = Auto;
+            led1 = 1;
+        }else{
+            output_status = Manual;
+            led1 = 0;
+        }
+
 }
 
 int GetParameter(FILE *fp, const char *paramName,char parameter[]){
@@ -1296,16 +1305,17 @@
     //着陸モード(PCからの指令に従う)
     void UpdateTargetAngle_Approach(float targetAngle[3]){
        
-       static bool zeroTHR=true;
+       static bool zeroTHR=true;//着陸時のスロットル動作確認用
        
-    if(CheckSW_Up(Ch7)){
-        output_status = Auto;
-        led1 = 1;
-    }else{
-        output_status = Manual;
-        led1 = 0;
-        zeroTHR=true;
-    }
+       if(CheckSW_Up(Ch7)){
+            output_status = Auto;
+            led1 = 1;
+        }else{
+            output_status = Manual;
+            led1 = 0;
+            zeroTHR=true;
+        }
+    
     
         NVIC_DisableIRQ(USART2_IRQn);