201803_oshima Team.F.C.

Dependencies:   BMP180 MPU6050 SDFileSystem mbed

Fork of 201803_oshima_jodan by Haruki Sashida

Files at this revision

API Documentation at this revision

Comitter:
sashida_h
Date:
Mon Mar 12 09:15:12 2018 +0000
Parent:
10:273500c77873
Child:
12:c32b14ca0196
Commit message:
add yabai mode

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Mar 11 13:50:11 2018 +0000
+++ b/main.cpp	Mon Mar 12 09:15:12 2018 +0000
@@ -66,6 +66,21 @@
     twe.baud(115200);
     twe.printf("Hello World!\r\n");
     
+    int ret;
+    lfp = fopen("/local/Alt.txt","r");
+    if(lfp == NULL){
+        goto normal;
+        }    
+    ret = fscanf(lfp,"GND:%f",&Alt_gnd);
+    fclose(lfp);
+    if(ret == -1){
+        goto normal;
+    }else{
+        goto yabai;
+    }
+    
+normal:
+    
     while(1){
         char c = twe.getc();
         if(_input(c) == 1){
@@ -120,6 +135,7 @@
     
     while(fly == 1);        //フライトピン抜けるまで待機
     
+yabai:
     twe.printf("SEPARATE!!!!!!!\r\n");
     i = 0;
     Alt_buff[0] = 0;