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:
- 30:6d3a78bc1925
- Parent:
- 27:5b897e2e0ac6
- Child:
- 31:cef6ee7af014
--- a/main.cpp Thu Dec 29 08:34:57 2016 +0000 +++ b/main.cpp Thu Dec 29 11:36:49 2016 +0000 @@ -17,14 +17,13 @@ #include "ServoManager.h" #include "ControllerManager.h" #include "Trim.h" -#include "Cadence.h" #include "Airspeed.h" -#include "Ultsonic.h" #include "Atmpress.h" #include "BatteryChecker.h" #include "Display.h" #include "XBee.h" #include "Selector.h" +#include "TweLite_Sensors.h" RawSerial pc(USBTX, USBRX); @@ -33,13 +32,12 @@ Display display(p13, p14, NC);//tx, rx, sw ControllerManager controllerManager(p15,p16,p5,p6);//ele, rud, eletrimup, eletrimdown BatteryChecker batteryChecker(p17, p18); -Ultsonic ultsonic(p20);//analogIn ServoManager servoManager(p21, p22);//ele, rud -Cadence cadence(p23, NC, NC);//p11, p12では動作しない=>使っていたmbedのピンが逝ってる可能性が微レ存 Selector selector(p25); DigitalOut wdt(p26); XBee xbee(p28, p27);//tx, rx Airspeed airspeed(p29, NC, NC);//p19,p20をInterruptInに使ってはいけない +TweLite_Sensors(PinName tx, PinName rx); @@ -74,8 +72,8 @@ while(1){ //batteryCheckerとatmpressを入れ替えると10minくらいで停止する。わけわからん airspeed.update(); - cadence.update(); - ultsonic.update(); + TweLite_Sensors::updata("cadence"); + TweLite_Sensors::updata("ultsonic"); batteryChecker.update(); atmpress.update(); Thread::wait(500);