kubtss / Mbed 2 deprecated BIRD2017

Dependencies:   mbed-rtos mbed

Committer:
shimogamo
Date:
Mon Sep 07 21:56:25 2015 +0000
Revision:
1:3f857674a290
Parent:
0:2a15bd367891
Child:
3:e3c41153e5fe
Global??vector??

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shimogamo 0:2a15bd367891 1 #include "mbed.h"
shimogamo 0:2a15bd367891 2 #include "Global.h"
shimogamo 0:2a15bd367891 3 int Global::maxpitch = 10;//
shimogamo 0:2a15bd367891 4 int Global::minpitch = -10;//
shimogamo 0:2a15bd367891 5 int Global::Global::maxyaw = 10;//
shimogamo 0:2a15bd367891 6 int Global::minyaw = -10;//
shimogamo 0:2a15bd367891 7 float Global::maxrudderangle = 600.0;//係数変更でサーボ稼働幅調整
shimogamo 0:2a15bd367891 8 float Global::minrudderangle = -maxrudderangle;//別の値を入れたら非対称にしたりもできる
shimogamo 0:2a15bd367891 9 float Global::maxelevatorangle = 900.0;//係数変更でサーボ稼働幅調整
shimogamo 0:2a15bd367891 10 float Global::minelevatorangle = -maxelevatorangle;//別の値を入れたら非対称にしたりもできる
shimogamo 0:2a15bd367891 11 double Global::neutralpitchdegree;
shimogamo 0:2a15bd367891 12 double Global::neutralyawdegree;
shimogamo 0:2a15bd367891 13 double Global::maxpitchdegree;
shimogamo 0:2a15bd367891 14 double Global::minpitchdegree;
shimogamo 0:2a15bd367891 15 double Global::maxyawdegree;
shimogamo 0:2a15bd367891 16 double Global::minyawdegree;
shimogamo 0:2a15bd367891 17 double Global::neutralrudderangle;
shimogamo 0:2a15bd367891 18 double Global::neutralelevatorangle;
shimogamo 0:2a15bd367891 19 double Global::trimpitch;
shimogamo 0:2a15bd367891 20 double Global::trimyaw;
shimogamo 0:2a15bd367891 21 double Global::inttrimpitch;
shimogamo 0:2a15bd367891 22 double Global::inttrimyaw;
shimogamo 1:3f857674a290 23 double Global::pitch;
shimogamo 1:3f857674a290 24 double Global::yaw;
shimogamo 1:3f857674a290 25 double Global::airspeed;
shimogamo 1:3f857674a290 26 double Global::cadence;
shimogamo 1:3f857674a290 27 double Global::altitude;
shimogamo 0:2a15bd367891 28
shimogamo 0:2a15bd367891 29
shimogamo 0:2a15bd367891 30 Timer Global::timer;
shimogamo 0:2a15bd367891 31 DigitalIn Global::initializeswitch(p23,PullUp);//否定で押しているとき
shimogamo 0:2a15bd367891 32 DigitalOut Global::led1(LED1);
shimogamo 0:2a15bd367891 33 DigitalOut Global::led2(LED2);
shimogamo 0:2a15bd367891 34 DigitalOut Global::led3(LED3);
shimogamo 0:2a15bd367891 35 DigitalOut Global::led4(LED4);
shimogamo 0:2a15bd367891 36
shimogamo 1:3f857674a290 37
shimogamo 0:2a15bd367891 38 //固定定数
shimogamo 0:2a15bd367891 39 int Global::getmaxpitch(){return maxpitch;}
shimogamo 0:2a15bd367891 40 int Global::getminpitch(){return minpitch;}
shimogamo 0:2a15bd367891 41 int Global::getmaxyaw(){return maxyaw;}
shimogamo 0:2a15bd367891 42 int Global::getminyaw(){return minyaw;}
shimogamo 0:2a15bd367891 43 float Global::getmaxrudderangle(){return maxrudderangle;}
shimogamo 0:2a15bd367891 44 float Global::getminrudderangle(){return minrudderangle;}
shimogamo 0:2a15bd367891 45 float Global::getmaxelevatorangle(){return maxelevatorangle;}
shimogamo 0:2a15bd367891 46 float Global::getminelevatorangle(){return minelevatorangle;}
shimogamo 0:2a15bd367891 47 //初期化される定数
shimogamo 0:2a15bd367891 48 void Global::setmaxpitchdegree(double _maxpitchdegree){maxpitchdegree=_maxpitchdegree;}
shimogamo 0:2a15bd367891 49 void Global::setneutralpitchdegree(double _neutralpitchdegree){neutralpitchdegree=_neutralpitchdegree;}
shimogamo 0:2a15bd367891 50 void Global::setminpitchdegree(double _minpitchdegree){minpitchdegree=_minpitchdegree;}
shimogamo 0:2a15bd367891 51 void Global::setmaxyawdegree(double _maxyawdegree){maxyawdegree=_maxyawdegree;}
shimogamo 0:2a15bd367891 52 void Global::setneutralyawdegree(double _neutralyawdegree){neutralyawdegree=_neutralyawdegree;}
shimogamo 0:2a15bd367891 53 void Global::setminyawdegree(double _minyawdegree){minyawdegree=_minyawdegree;}
shimogamo 0:2a15bd367891 54 void Global::setneutralrudderangle(double _neutralrudderangle){neutralrudderangle=_neutralrudderangle;}
shimogamo 0:2a15bd367891 55 void Global::setneutralelevatorangle(double _neutralelevatorangle){neutralelevatorangle=_neutralelevatorangle;}
shimogamo 1:3f857674a290 56
shimogamo 1:3f857674a290 57
shimogamo 1:3f857674a290 58
shimogamo 0:2a15bd367891 59 //変数
shimogamo 1:3f857674a290 60 double Global::getpitch(){return pitch;}
shimogamo 1:3f857674a290 61 double Global::gettrimpitch(){return trimpitch;}
shimogamo 1:3f857674a290 62 double Global::getinttrimpitch(){return inttrimpitch;}
shimogamo 1:3f857674a290 63 double Global::getyaw(){return yaw;}
shimogamo 1:3f857674a290 64 double Global::gettrimyaw(){return trimyaw;}
shimogamo 1:3f857674a290 65 double Global::getinttrimyaw(){return inttrimyaw;}
shimogamo 1:3f857674a290 66 double Global::getairspeed(){return airspeed;}
shimogamo 1:3f857674a290 67 double Global::getcadence(){return cadence;}
shimogamo 1:3f857674a290 68 double Global::getaltitude(){return altitude;}
shimogamo 0:2a15bd367891 69
shimogamo 1:3f857674a290 70 void Global::setpitch(double _pitch){pitch = _pitch;}
shimogamo 1:3f857674a290 71 void Global::settrimpitch(double _trimpitch){trimpitch = _trimpitch;}
shimogamo 1:3f857674a290 72 void Global::setinttrimpitch(double _inttrimpitch){inttrimpitch = _inttrimpitch;}
shimogamo 1:3f857674a290 73 void Global::setyaw(double _yaw){yaw = _yaw;}
shimogamo 1:3f857674a290 74 void Global::settrimyaw(double _trimyaw){trimyaw = _trimyaw;}
shimogamo 1:3f857674a290 75 void Global::setinttrimyaw(double _inttrimyaw){inttrimyaw = _inttrimyaw;}
shimogamo 1:3f857674a290 76 void Global::setairspeed(double _airspeed){airspeed = _airspeed;}
shimogamo 1:3f857674a290 77 void Global::setcadence(double _cadence){cadence = _cadence;}
shimogamo 1:3f857674a290 78 void Global::setaltitude(double _altitude){altitude = _altitude;}