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:
- 34:770a6bbb4d63
- Parent:
- 33:d939479e7b13
- Child:
- 35:63ccdae58da4
--- a/main.cpp Wed Mar 01 08:05:52 2017 +0000 +++ b/main.cpp Wed Mar 01 14:34:27 2017 +0000 @@ -18,7 +18,7 @@ #include "rtos.h" #include "Global.h" #include "Init.h" -#include "ServoManager.h" +#include "ServoSend.h" #include "ControllerManager.h" #include "Trim.h" #include "Airspeed.h" @@ -26,8 +26,6 @@ #include "Display.h" //#include "Selector.h" #include "TweLite_Sensors.h" -#define CADENCE 0 -#define ULTSONIC 1 RawSerial pc(USBTX, USBRX); @@ -35,7 +33,7 @@ Atmpress atmpress(PB_7, PA_15);//sda, scl Display display(PC_4, PA_10, NC);//tx, rx, sw ControllerManager controllerManager(PC_0,PC_1,PA_4,PA_1);//ele, rud, eletrimup, eletrimdown -ServoManager servoManager(p21, p22);//ele, rud // 要変更 +ServoSend servoSend(PC_10, PC_11);//tx, rx //Selector selector(p25); DigitalOut wdt(PA_14); Airspeed airspeed(PA_13, NC, NC);//p19,p20をInterruptInに使ってはいけない @@ -47,6 +45,7 @@ while(pc.readable()==1){ //コマンドモードのon,offはここに入れるといい char buf = (char)pc.getc(); + pc.putc(buf); Global::initqueue.put((char*)buf); } } @@ -63,7 +62,7 @@ while(1){ //この中でpc.printfはしないほうがいいみたい(9600bpsだと遅延が起こる) controllerManager.update(); - servoManager.update(); + servoSend.send(); //selector.update(); wdt = !wdt;//ウォッチドッグタイマのkickに相当 Thread::wait(50); @@ -72,7 +71,6 @@ void sensorTask500(void const *pvParameters){ while(1){ - //batteryCheckerとatmpressを入れ替えると10minくらいで停止する。わけわからん airspeed.update(); atmpress.update(); Thread::wait(500);