all ok noMU2
Dependencies: mbed mbedTimer SDFileSystem MU2 GPS
Diff: main.cpp
- Revision:
- 27:2d8f63f86ef3
- Parent:
- 26:7ec2cf6a6b51
- Child:
- 28:c8fabcd38c9a
diff -r 7ec2cf6a6b51 -r 2d8f63f86ef3 main.cpp --- a/main.cpp Mon Sep 09 09:29:03 2019 +0000 +++ b/main.cpp Mon Sep 09 09:31:14 2019 +0000 @@ -1,6 +1,6 @@ /******************************************************************************* 2019.09.09 -This is a ARLISS program! MU2あり +This is a ARLISS program! *******************************************************************************/ #include "mbed.h" @@ -107,8 +107,8 @@ val=timer_rec.read(); myTimer.sendMessage(val); fprintf(fp, "%s CanSatStart!\r\n",myTimer.timeMessage); - MuPort.send(myTimer.timeMessage); - MuPort.send("CanSat Start!\r\n"); + //MuPort.send(myTimer.timeMessage); + //MuPort.send("CanSat Start!\r\n"); /******************************************************************************* 溶断まで待機 @@ -121,8 +121,8 @@ val3=val+val2; myTimer.sendMessage(val3); fprintf(fp, "%s GPSstart!\r\n",myTimer.timeMessage); - MuPort.send(myTimer.timeMessage); - MuPort.send("GPS start!\r\n"); + //MuPort.send(myTimer.timeMessage); + //MuPort.send("GPS start!\r\n"); while(1) { myled=0; @@ -136,8 +136,8 @@ val=timer_rec.read(); val3=val+val2; myTimer.sendMessage(val3); - MuPort.send(myTimer.timeMessage); - MuPort.send(mygps.getGPS); + //MuPort.send(myTimer.timeMessage); + //MuPort.send(mygps.getGPS); fprintf(fp, "%s %s\n",myTimer.timeMessage,mygps.getGPS); timer++; } @@ -161,7 +161,7 @@ //溶断機構部分 fprintf(fp, "FireStart!\r\n"); - MuPort.send("Fire Start!\r\n"); + //MuPort.send("Fire Start!\r\n"); FIRE=1; myled=1; @@ -178,7 +178,7 @@ myled=0; fprintf(fp, "FireFinish!\r\n"); - MuPort.send("Fire Finish!\r\n"); + //MuPort.send("Fire Finish!\r\n"); //溶断機構終わり @@ -200,8 +200,8 @@ val=timer_rec.read(); val3=val+val2; myTimer.sendMessage(val3); - MuPort.send(myTimer.timeMessage); - MuPort.send(mygps.getGPS); + //MuPort.send(myTimer.timeMessage); + //MuPort.send(mygps.getGPS); fprintf(fp, "%s %s\n",myTimer.timeMessage,mygps.getGPS); timer++; } @@ -233,8 +233,8 @@ val3=val+val2; myTimer.sendMessage(val3); fprintf(fp, "%s ClosingModeStart!\r\n",myTimer.timeMessage); - MuPort.send(myTimer.timeMessage); - MuPort.send("Closing Mode start!\r\n"); + //MuPort.send(myTimer.timeMessage); + //MuPort.send("Closing Mode start!\r\n"); timer=0;//モーター時間で止める用 timer2=0; @@ -268,10 +268,10 @@ val=timer_rec.read(); val3=val+val2; myTimer.sendMessage(val3); - MuPort.send(myTimer.timeMessage); - MuPort.send(mygps.getGPS); + //MuPort.send(myTimer.timeMessage); + //MuPort.send(mygps.getGPS); snprintf(sensorMessage, 128, "%f", ave_sensor); - MuPort.send(sensorMessage); + //MuPort.send(sensorMessage); fprintf(fp, "%s %s\n",myTimer.timeMessage,mygps.getGPS); timer++; } @@ -287,8 +287,8 @@ val3=val+val2; myTimer.sendMessage(val3); fprintf(fp, "%s Get the rigidity!\r\n",myTimer.timeMessage); - MuPort.send(myTimer.timeMessage); - MuPort.send("Get the rigidity!\r\n"); + //MuPort.send(myTimer.timeMessage); + //MuPort.send("Get the rigidity!\r\n"); timer=0;//モーター時間で止める用 @@ -318,10 +318,10 @@ val=timer_rec.read(); val3=val+val2; myTimer.sendMessage(val3); - MuPort.send(myTimer.timeMessage); - MuPort.send(mygps.getGPS); + //MuPort.send(myTimer.timeMessage); + //MuPort.send(mygps.getGPS); snprintf(sensorMessage, 128, "%f", ave_sensor); - MuPort.send(sensorMessage); + //MuPort.send(sensorMessage); fprintf(fp, "%s %s\n",myTimer.timeMessage,mygps.getGPS); timer++; } @@ -338,8 +338,8 @@ val3=val+val2; myTimer.sendMessage(val3); fprintf(fp, "%s ClosingModeFinish!\r\n",myTimer.timeMessage); - MuPort.send(myTimer.timeMessage); - MuPort.send("Time over. Closing Mode Finish!\r\n"); + //MuPort.send(myTimer.timeMessage); + //MuPort.send("Time over. Closing Mode Finish!\r\n"); fclose(fp); fclose(fp2); break; @@ -364,8 +364,8 @@ val3=val+val2; myTimer.sendMessage(val3); fprintf(fp, "%s TimeOver!ClosingModeFinsh!\r\n",myTimer.timeMessage); - MuPort.send(myTimer.timeMessage); - MuPort.send("Closing Mode Finish!\r\n"); + //MuPort.send(myTimer.timeMessage); + //MuPort.send("Closing Mode Finish!\r\n"); fclose(fp); fclose(fp2); break; @@ -383,8 +383,8 @@ val3=val+val2; myTimer.sendMessage(val3); fprintf(fp, "%s IntervalModeStart!\r\n",myTimer.timeMessage); - MuPort.send(myTimer.timeMessage); - MuPort.send("Interval Mode start!\r\n"); + //MuPort.send(myTimer.timeMessage); + //MuPort.send("Interval Mode start!\r\n"); fclose(fp); timer=0;//モーター時間で止める用 @@ -417,10 +417,10 @@ val=timer_rec.read(); val3=val+val2; myTimer.sendMessage(val3); - MuPort.send(myTimer.timeMessage); - MuPort.send(mygps.getGPS); + //MuPort.send(myTimer.timeMessage); + //MuPort.send(mygps.getGPS); snprintf(sensorMessage, 128, "%f\n", ave_sensor); - MuPort.send(sensorMessage); + //MuPort.send(sensorMessage); fp= fopen(fname, "a"); fprintf(fp, "%s %s\n",myTimer.timeMessage,mygps.getGPS); fclose(fp); @@ -462,10 +462,10 @@ val=timer_rec.read(); val3=val+val2; myTimer.sendMessage(val3); - MuPort.send(myTimer.timeMessage); - MuPort.send(mygps.getGPS); + //MuPort.send(myTimer.timeMessage); + //MuPort.send(mygps.getGPS); snprintf(sensorMessage, 128, "%f\n", ave_sensor); - MuPort.send(sensorMessage); + //MuPort.send(sensorMessage); fp= fopen(fname, "a"); fprintf(fp, "%s %s\n",myTimer.timeMessage,mygps.getGPS); fclose(fp); @@ -500,8 +500,8 @@ val3=val+val2; myTimer.sendMessage(val3); fprintf(fp, "%s IntervalModeFinish!\r\n",myTimer.timeMessage); - MuPort.send(myTimer.timeMessage); - MuPort.send("Interval Mode finish!\r\n"); + //MuPort.send(myTimer.timeMessage); + //MuPort.send("Interval Mode finish!\r\n"); fclose(fp); fclose(fp2); break; @@ -521,8 +521,8 @@ val3=val+val2; myTimer.sendMessage(val3); fprintf(fp, "%s StandbyModeStart!\r\n",myTimer.timeMessage); - MuPort.send(myTimer.timeMessage); - MuPort.send("Standby mode start!\r\n"); + //MuPort.send(myTimer.timeMessage); + //MuPort.send("Standby mode start!\r\n"); fclose(fp); @@ -540,8 +540,8 @@ val=timer_rec.read(); val3=val+val2; myTimer.sendMessage(val3); - MuPort.send(myTimer.timeMessage); - MuPort.send(mygps.getGPS); + //MuPort.send(myTimer.timeMessage); + //MuPort.send(mygps.getGPS); fp= fopen(fname, "a"); fprintf(fp, "%s %s\n",myTimer.timeMessage,mygps.getGPS); fclose(fp);