change2shinsu
Dependencies: mbed mbedTimer SDFileSystem MU2 GPS
Diff: main.cpp
- Revision:
- 13:33939d451801
- Parent:
- 11:a273a8decf90
--- a/main.cpp Sun Aug 18 05:43:34 2019 +0000 +++ b/main.cpp Sun Aug 18 06:27:29 2019 +0000 @@ -31,7 +31,7 @@ wait(0.1);//起動してからちょっと待つ inlet.Stop(); //FILE* fp1= fopen("/sd/cansat/log3.txt", "w"); - FILE* fp2= fopen("/sd/cansat/gpsdata0808_2.csv", "w"); + FILE* fp2= fopen("/sd/cansat/gpsdata0808_3.csv", "w"); /*if(fp1 == NULL || fp2 == NULL) { @@ -66,28 +66,26 @@ myled2=1; if(gps.readable()) { + myled4=1; recvGPS=gps.getc(); getGPS[i]=recvGPS; - + wait(1.0); if(getGPS[i]=='\n') { + myled4=0; if((getGPS[5]=='G')&&(getGPS[6]=='A')) { - MuPort.send(getGPS); myled=1; /*if(fp == NULL) { error("Could not open file for write\n"); }*/ - fprintf(fp2, "%s\n",getGPS); //fclose(fp); - wait(1.0); timer++; } - i=0; } i++; @@ -96,9 +94,6 @@ break; } } - - // wait(1); - //fclose(fp); } timer=0;//モーター時間で止めるよう