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.
Diff: main.cpp
- Revision:
- 6:0d9fa7152934
- Parent:
- 5:9a1ec02229dd
- Child:
- 7:6f7bd18ce796
--- a/main.cpp Fri Oct 09 14:29:32 2015 +0000 +++ b/main.cpp Sat Oct 10 20:16:31 2015 +0000 @@ -10,6 +10,7 @@ #include "Display.h" #include "XBee.h" #include <string> +#include <iostream> #define BUFMAX 20 @@ -36,15 +37,15 @@ void initializeTask(void const *pvParametersd){ std::string strbuf; + while(1){ osEvent evt = queue.get(); if(evt.status == osEventMessage){ char temp = evt.value.v; strbuf.push_back(temp); - if(temp == '\n'){ - Global::led1 = 1; + if(temp == '\n'){ + std::string::size_type spaceIndex = strbuf.find(" "); - std::string::size_type spaceIndex = strbuf.find(" "); if (spaceIndex != std::string::npos) { char *gomi; std::string command = strbuf.substr(0, spaceIndex); @@ -68,7 +69,8 @@ } strbuf.clear(); - //ここで,ニュートラル情報をLocalFileに保存 + //ここで,ニュートラル情報をLocalFileに保存 + Global::filewrite(); } } Thread::wait(10); @@ -125,7 +127,7 @@ pc.attach(pc_rx,Serial::RxIrq); - Global::timer.start(); + Global::initialize(); Thread InitializeTask(initializeTask); Thread ControlTask(controlTask); Thread AirspeedTask(airspeedTask);