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_36 by
Diff: main.cpp
- Revision:
- 14:bbd5ff31fb67
- Parent:
- 13:77b13d5f4d78
- Child:
- 15:43427b0241d9
--- a/main.cpp Sun Sep 16 07:59:29 2018 +0000
+++ b/main.cpp Sun Sep 16 11:17:50 2018 +0000
@@ -1017,9 +1017,9 @@
static char SFbuf[16];
static int bufcounter=0;
-
-
- SFbuf[bufcounter]=pc.getc();
+ if(pc.readable()) { // 受信確認
+ SFbuf[bufcounter] = pc.getc(); // 1文字取り出し
+ }
pc.printf("%c",SFbuf[bufcounter]);
@@ -1028,7 +1028,7 @@
if(bufcounter==5 && SFbuf[4]=='F'){
g_landingcommand = SFbuf[1];
- wait_ms(5);
+ wait_ms(8);
if(g_landingcommand=='Y')g_SerialTargetYAW = ConvertByteintoFloat(SFbuf[2], SFbuf[3]);
bufcounter = 0;
memset(SFbuf, 0, strlen(SFbuf));
