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_62 by
Diff: main.cpp
- Revision:
- 49:8729deed8421
- Parent:
- 48:e58f6e6e69eb
- Child:
- 50:570782f00a76
--- a/main.cpp Thu Sep 27 17:26:40 2018 +0000
+++ b/main.cpp Fri Sep 28 05:00:55 2018 +0000
@@ -170,7 +170,7 @@
//2号機
static int16_t trimpwm[6] = {1453,1448,1176,1626,1417,1450};
-int16_t maxpwm[6] = {1670,1786,1848,1962,1712,1857};
+int16_t maxpwm[6] = {1670,1786,1848,1962,1728,1857};
int16_t minpwm[6] = {1056,1115,1176,1291,1180,1178};
const int16_t reverce[4] = {Reverce_falfalla[0],Reverce_falfalla[1],Reverce_falfalla[2],Reverce_falfalla[3]};
@@ -1257,9 +1257,9 @@
}
NVIC_DisableIRQ(EXTI9_5_IRQn);
- if(t_diff > 17) autopwm[THR] = SetTHRinRatio(0.5);
+ //if(t_diff > 20) autopwm[THR] = SetTHRinRatio(0.5);
- else if(g_distance<150 && g_distance>0 ){
+ if(g_distance<150 && g_distance>0 ){
NVIC_DisableIRQ(EXTI9_5_IRQn);
THRcount++;
if(THRcount>5) flg_ground = true;
@@ -1404,7 +1404,7 @@
//チキラー投下
void Chicken_Drop(){
if(CheckSW_Up(Ch7)){
- autopwm[DROP] = 1712;
+ autopwm[DROP] = 1728;
pc.printf("Bombed!\r\n");
//RerurnChickenServo1.attach(&ReturnChickenServo1, 3);
//operation_mode = Approach;
