
22:05
Dependencies: HCSR04_2 MPU6050_2 mbed SDFileSystem3
Fork of Autoflight2018_9 by
Revision 6:ed61ed8b8fab, committed 2018-09-13
- Comitter:
- HARUKIDELTA
- Date:
- Thu Sep 13 13:05:22 2018 +0000
- Parent:
- 5:9efd35c9bb2e
- Commit message:
- 8
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 9efd35c9bb2e -r ed61ed8b8fab main.cpp --- a/main.cpp Thu Sep 13 12:33:54 2018 +0000 +++ b/main.cpp Thu Sep 13 13:05:22 2018 +0000 @@ -947,13 +947,14 @@ flg_setInStartAuto = false; led2 = 0; } - + autopwm[THR]=oldTHR; + newYaw_Moebius = TranslateNewYaw(nowAngle[YAW], FirstYAW_Moebius); if(RotateCounter == 0 && newYaw_Moebius >90.0 && newYaw_Moebius < 180.0) {RotateCounter++; led2 = 1; pc.printf("Rotate 90\r\n");} if(RotateCounter == 1 && newYaw_Moebius >-180.0 && newYaw_Moebius < -90.0) {RotateCounter++; led2 = 0; pc.printf("Rotate 180\r\n");} - if(RotateCounter == 2 && newYaw_Moebius >-90.0 && newYaw_Moebius < 10.0f) {RotateCounter++; led2 = 1; pc.printf("Rotate 270\r\n");} - if(RotateCounter == 3 && newYaw_Moebius >20.0 && newYaw_Moebius < 180.0f) {RotateCounter++; led2 = 0; pc.printf("Change Rotate direction\r\n");} + if(RotateCounter == 2 && newYaw_Moebius >-90.0 && newYaw_Moebius <-10.0) {RotateCounter++; led2 = 1; pc.printf("Rotate 270\r\n");} + if(RotateCounter == 3 && newYaw_Moebius >0.0 && newYaw_Moebius < 90.0) {RotateCounter++; led2 = 0; pc.printf("Change Rotate direction\r\n");} if(RotateCounter <= 3) UpdateTargetAngle_Rightloop_short(targetAngle);