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:
- 36:ad6b2b81bb89
- Parent:
- 35:63ccdae58da4
- Child:
- 38:18ac0f8628bf
- Child:
- 39:0d71fbd9f821
diff -r 63ccdae58da4 -r ad6b2b81bb89 Global.cpp --- a/Global.cpp Sat Mar 18 08:34:17 2017 +0000 +++ b/Global.cpp Tue Mar 21 05:48:34 2017 +0000 @@ -2,17 +2,15 @@ #include "Global.h" #include "rtos.h" #include "FlashManager.h" -extern RawSerial pc3(USBTX, USBRX); +extern RawSerial pc; //クラスじゃなくてnamespaceのほうが綺麗にかけるかもね -void Global::setpc(RawSerial _pc){ - _pc.printf("setpc\n"); -} Queue<char, 20> Global::initqueue; //----------------FlashMemory(pin指定はここで)-------------------------------------------- SPI Global::spi(PA_7, PA_6, PA_5);// mosi, miso, sclk FlashManager Global::memory(spi, PB_9);//spi, cs +//FlashManager Global::memory(PA_7, PA_6, PA_5, PB_9); //----------------普段は変動しない変数------------------------------------------------------ //サーボのパラメータ(角度(度数法)で設定)max,minはニュートラルを基準にしている double Global::maxpitch = 5.0; @@ -114,7 +112,7 @@ void Global::filewrite(){ // pc.printf("push"); vector<double> param; - + /* param.push_back(getneutralpitch()); param.push_back(getmaxpitch()); param.push_back(getminpitch()); @@ -134,10 +132,12 @@ param.push_back(getmaxyawplayratio()); param.push_back(getminyawplayratio()); param.push_back(gettrimpitchrate()); - pc3.printf("%d\n",param.size()); - pc3.printf("write\n"); + */ + for(int i=0;i<17;i++){ + param.push_back(i*0.1); + } memory.writedouble(0x0,param); - pc3.printf("written\n"); + pc.printf("written\n"); } //init等で更新される変数