kubtss / Mbed 2 deprecated BIRD2017

Dependencies:   mbed-rtos mbed

Revision:
12:8e39bb45c61c
Parent:
10:0a4bf8c82493
Child:
13:a8e10a69df45
--- a/Global.cpp	Sat Nov 28 15:08:59 2015 +0000
+++ b/Global.cpp	Sat Nov 28 18:47:26 2015 +0000
@@ -6,7 +6,8 @@
 //トリムはGlobalで足したほうがいいかも
 
 
-Queue<char, 20> Global::queue;
+Queue<char, 20> Global::initqueue;
+Queue<float, 50> Global::displayqueue;
 //----------------普段は変動しない変数(定数)------------------------------------------------------
 //サーボのパラメータ(角度(度数法)で設定)max,minはニュートラルを基準にしている
 double Global::maxpitch = 5.0;
@@ -33,18 +34,26 @@
 //----------------周期的に変動する変数------------------------------------------------------
 double Global::pitch;
 double Global::pitchdegree;//controllerの生データ
-double Global::trimpitch;
 int    Global::inttrimpitch;
 double Global::yaw;
 double Global::yawdegree;//controllerの生データ
-double Global::trimyaw;
 int    Global::inttrimyaw;
 double Global::airspeed;
 double Global::cadence;
-double Global::altitude;
 double Global::ultsonic;
 double Global::atmpress;
 
+int Global::pitchcnt;
+int Global::pitchdegreecnt;
+int Global::inttrimpitchcnt;
+int Global::yawcnt;
+int Global::yawdegreecnt;
+int Global::inttrimyawcnt;
+int Global::airspeedcnt;
+int Global::cadencecnt;
+int Global::ultsoniccnt;
+int Global::atmpresscnt;
+
 //----------------どこからでも使えるled,スイッチ,タイマーの一括管理-----------------------------
 Timer Global::timer;
 DigitalIn Global::initializeswitch(p23,PullUp);//否定で押しているとき
@@ -172,31 +181,45 @@
 //変数
 double Global::getpitch(){return pitch;}
 double Global::getpitchdegree(){return pitchdegree;}
-double Global::gettrimpitch(){return trimpitch;}
 int    Global::getinttrimpitch(){return inttrimpitch;}
 double Global::getyaw(){return yaw;}
 double Global::getyawdegree(){return yawdegree;}
-double Global::gettrimyaw(){return trimyaw;}
 int    Global::getinttrimyaw(){return inttrimyaw;}
 double Global::getairspeed(){return airspeed;}
 double Global::getcadence(){return cadence;}
-double Global::getaltitude(){return altitude;}
 double Global::getultsonic(){return ultsonic;}
 double Global::getatmpress(){return atmpress;}
 
 
-void Global::setpitch(double _pitch){pitch = _pitch;}
-void Global::setpitchdegree(double _pitchdegree){pitchdegree = _pitchdegree;}
-void Global::settrimpitch(double _trimpitch){trimpitch = _trimpitch;}
-void Global::setinttrimpitch(int _inttrimpitch){inttrimpitch = _inttrimpitch;}
-void Global::setyaw(double _yaw){yaw = _yaw;}
-void Global::setyawdegree(double _yawdegree){yawdegree = _yawdegree;}
-void Global::settrimyaw(double _trimyaw){trimyaw = _trimyaw;}
-void Global::setinttrimyaw(int _inttrimyaw){inttrimyaw = _inttrimyaw;}
-void Global::setairspeed(double _airspeed){airspeed = _airspeed;}
-void Global::setcadence(double _cadence){cadence = _cadence;}
-void Global::setaltitude(double _altitude){altitude = _altitude;}
-void Global::setultsonic(double _ultsonic){ultsonic = _ultsonic;}
-void Global::setatmpress(double _atmpress){atmpress = _atmpress;}
+void Global::setpitch(double _pitch){
+    pitch = _pitch;
+}
+void Global::setpitchdegree(double _pitchdegree){
+    pitchdegree = _pitchdegree;
+}
+void Global::setinttrimpitch(int _inttrimpitch){
+    inttrimpitch = _inttrimpitch;
+}
+void Global::setyaw(double _yaw){
+    yaw = _yaw;
+}
+void Global::setyawdegree(double _yawdegree){
+    yawdegree = _yawdegree;
+}
+void Global::setinttrimyaw(int _inttrimyaw){
+    inttrimyaw = _inttrimyaw;
+}
+void Global::setairspeed(double _airspeed){
+    airspeed = _airspeed;
+}
+void Global::setcadence(double _cadence){
+    cadence = _cadence;
+}
+void Global::setultsonic(double _ultsonic){
+    ultsonic = _ultsonic;
+}
+void Global::setatmpress(double _atmpress){
+    atmpress = _atmpress;
+}