LED入れ替え
Dependencies: HCSR04_2 MPU6050_2 mbed SDFileSystem3
Fork of Autoflight2018_55 by
Diff: main.cpp
- Revision:
- 36:197b514eae3b
- Parent:
- 35:25e1afadd455
- Child:
- 37:990047c4dc20
--- a/main.cpp Tue Sep 25 04:56:24 2018 +0000 +++ b/main.cpp Tue Sep 25 06:58:19 2018 +0000 @@ -1110,7 +1110,8 @@ g_landingcommand = SFbuf[1]; //wait_ms(20); - if(g_landingcommand=='Y')g_SerialTargetYAW = ConvertByteintoFloat(SFbuf[2], SFbuf[3]); + //if(g_landingcommand=='Y')g_SerialTargetYAW = ConvertByteintoFloat(SFbuf[2], SFbuf[3]); + if(g_landingcommand=='Y')g_SerialTargetYAW =0.0f; bufcounter = 0; memset(SFbuf, 0, strlen(SFbuf)); NVIC_ClearPendingIRQ(USART2_IRQn); @@ -1268,7 +1269,7 @@ NVIC_EnableIRQ(EXTI9_5_IRQn); if(TakeoffCount>5){ autopwm[THR] = 1180+320*2*0.5; - autopwm[ELE] = 1200; + targetAngle[PITCH]=g_gostraightPITCH; //pc.printf("Now go to Approach mode!!"); bombing_mode = Approach; } @@ -1322,7 +1323,7 @@ t_def = t.read_ms() - tELE_start; //1.5秒経過すればELE上げ舵へ - if(t_def>500) targetAngle[PITCH]=-30.0; + if(t_def>500) targetAngle[PITCH]=-35.0; else{ t_def = 0; targetAngle[PITCH]=g_gostraightPITCH; @@ -1648,6 +1649,7 @@ } + //デバッグ用 void DebugPrint(){ /*