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_63 by
Diff: main.cpp
- Revision:
- 53:2226bf635d21
- Parent:
- 52:936c90dcd872
--- 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;