cansat_B 2019 / Mbed 2 deprecated CanSatB2019_main_1214_essence_8_5

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
YUPPY
Date:
Sun Dec 15 03:27:59 2019 +0000
Parent:
25:3a9580e58a5e
Commit message:
fet

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Dec 15 03:12:13 2019 +0000
+++ b/main.cpp	Sun Dec 15 03:27:59 2019 +0000
@@ -53,18 +53,12 @@
             xbee.printf("timeout\n");
             break;
         }
-     if(flight==1) {
+     else if(flight==1) {
         myled=1;
         wait(10);
         printf("mada\r\n");
         }
-     else{
-        if(flight==1) {
-            myled=1;
-        wait(10);
-        xbee.printf("madamada\r\n");
-        }
-        else{
+        else if(flight==0){
           myled=0;
           xbee.printf("yattar\r\n");
           wait(20);
@@ -78,7 +72,7 @@
     break;
             }
     }   
-    }
+    
     
     
       //以下GPS