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:
- 35:63ccdae58da4
- Parent:
- 34:770a6bbb4d63
- Child:
- 36:ad6b2b81bb89
--- a/main.cpp Wed Mar 01 14:34:27 2017 +0000 +++ b/main.cpp Sat Mar 18 08:34:17 2017 +0000 @@ -9,7 +9,6 @@ //servo回りはシリアルに変更 //selector周りはコメントアウトしてる -//cadence,ultsonicまわりをfloatにかえる //タスクの数に上限があるっぽい(6個以下) // @@ -27,7 +26,6 @@ //#include "Selector.h" #include "TweLite_Sensors.h" - RawSerial pc(USBTX, USBRX); Atmpress atmpress(PB_7, PA_15);//sda, scl @@ -38,15 +36,14 @@ DigitalOut wdt(PA_14); Airspeed airspeed(PA_13, NC, NC);//p19,p20をInterruptInに使ってはいけない TweLite_Sensors tweLite_Sensors(PC_12,PD_2); - - +//FlashMemoryのpin指定は Global.cpp 内 void pc_rx(){ while(pc.readable()==1){ //コマンドモードのon,offはここに入れるといい char buf = (char)pc.getc(); pc.putc(buf); - Global::initqueue.put((char*)buf); + //Global::initqueue.put((char*)buf); } } @@ -79,7 +76,9 @@ void twesensorTask(void const *pvParameters){ while(1){ - tweLite_Sensors.update();//こっちでそれぞれのbatteryをupdata + tweLite_Sensors.update(); + //こっちでそれぞれのbatteryをupdata + //更新周期はTickerのインターバルで指定 } } @@ -94,16 +93,16 @@ int main(void){ - printf("start\n"); + pc.printf("start\n"); pc.attach(pc_rx,Serial::RxIrq); - Global::initialize(); + //Global::filewrite(); Thread InitializeTask(initializeTask); Thread ControlTask(controlTask, NULL, osPriorityRealtime); Thread SensorTask500(sensorTask500); Thread TwesensorTask(twesensorTask); Thread DisplayTask(displayTask); - printf("Task end\n"); + pc.printf("Task end\n"); Thread::wait(osWaitForever); } \ No newline at end of file