航空研究会 / Mbed 2 deprecated Autoflight2018_final

Dependencies:   HCSR04_2 MPU6050_2 mbed SDFileSystem3

Fork of Autoflight2018_63 by 航空研究会

Files at this revision

API Documentation at this revision

Comitter:
HARUKIDELTA
Date:
Tue Oct 09 12:59:33 2018 +0000
Parent:
52:936c90dcd872
Commit message:
???

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 936c90dcd872 -r 2226bf635d21 main.cpp
--- a/main.cpp	Sun Sep 30 01:04:14 2018 +0000
+++ b/main.cpp	Tue Oct 09 12:59:33 2018 +0000
@@ -1243,7 +1243,7 @@
         t_diff = t.read() - t_start;
         //一定高度or15秒でled点灯
         NVIC_DisableIRQ(EXTI9_5_IRQn);
-        if((groundcount>5 && g_distance>0) || t_diff > 20){
+        if((groundcount>5 && g_distance>0)){
             led4 = 1;
             //pc.printf("Call [Stop!] calling!\r\n");
         }
@@ -1259,11 +1259,7 @@
     }
     
         NVIC_DisableIRQ(EXTI9_5_IRQn);
-        if(t_diff > 22){
-            autopwm[THR] = SetTHRinRatio(0.5);
-            targetAngle[PITCH] = g_autoonPITCH;
-            }
-        else if(g_distance<180 && g_distance>0 ){
+        if(g_distance<180 && g_distance>0 ){
             NVIC_DisableIRQ(EXTI9_5_IRQn);
             THRcount++;
             if(THRcount>5) flg_ground = true;