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: Global.cpp
- Revision:
- 16:7e36177b4435
- Parent:
- 13:a8e10a69df45
- Child:
- 17:887cfe1d309f
--- a/Global.cpp Mon Dec 21 17:06:25 2015 +0000 +++ b/Global.cpp Tue Feb 09 13:07:29 2016 +0000 @@ -7,6 +7,7 @@ Queue<char, 20> Global::initqueue; +Queue<char, 20> Global::displayqueue; //----------------普段は変動しない変数(定数)------------------------------------------------------ //サーボのパラメータ(角度(度数法)で設定)max,minはニュートラルを基準にしている double Global::maxpitch = 5.0; @@ -41,6 +42,7 @@ double Global::cadence; double Global::ultsonic; double Global::atmpress; +int Global::selector; int Global::pitchtime; int Global::pitchdegreetime; @@ -52,14 +54,12 @@ int Global::cadencetime; int Global::ultsonictime; int Global::atmpresstime; +int Global::selectortime; //----------------どこからでも使えるled,スイッチ,タイマーの一括管理----------------------------- Timer Global::timer; DigitalIn Global::initializeswitch(p23,PullUp);//否定で押しているとき -DigitalOut Global::led1(LED1); -DigitalOut Global::led2(LED2); -DigitalOut Global::led3(LED3); -DigitalOut Global::led4(LED4); +DigitalOut Global::led[] = {LED1,LED2,LED3,LED4}; LocalFileSystem Global::local("local"); @@ -188,6 +188,7 @@ double Global::getcadence(){return cadence;} double Global::getultsonic(){return ultsonic;} double Global::getatmpress(){return atmpress;} +int Global::getselector(){return selector;} int Global::getpitchtime(){return pitchtime;} int Global::getpitchdegreetime(){return pitchdegreetime;} @@ -199,6 +200,7 @@ int Global::getcadencetime(){return cadencetime;} int Global::getultsonictime(){return ultsonictime;} int Global::getatmpresstime(){return atmpresstime;} +int Global::getselectortime(){return selectortime;} @@ -242,3 +244,7 @@ atmpress = _atmpress; atmpresstime = timer.read_ms(); } +void Global::setselector(int _selector){ + selector = _selector; + selectortime = timer.read_ms(); +}