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.
Dependencies: F746_GUI SRF08 Array_Matrix TS_DISCO_F746NG mbed LCD_DISCO_F746NG BSP_DISCO_F746NG SDFileSystem_Warning_Fixed FrequencyResponseDrawer F746_SAI_IO
Revision 3:cda40218256c, committed 2016-04-25
- Comitter:
- MikamiUitOpen
- Date:
- Mon Apr 25 12:50:20 2016 +0000
- Parent:
- 2:2478e7a8e8d5
- Child:
- 4:02b9ced5f079
- Commit message:
- 4
Changed in this revision
--- a/MyClasses_Functions/DesignerDrawer.cpp Mon Apr 25 00:49:09 2016 +0000
+++ b/MyClasses_Functions/DesignerDrawer.cpp Mon Apr 25 12:50:20 2016 +0000
@@ -29,7 +29,8 @@
fC_ = fc; // 最初に与える遮断周波数
designObj_->Execute(fC_, lpHp, coefs_, g0_);
- frqResp_.SetParams(ORDER_, g0_, ck_);
+ frqResp_ = new IIR_CascadeFrqResp();
+ frqResp_->SetParams(ORDER_, g0_, ck_);
// 周波数特性の描画
lblFrq_ = new NumericLabel<int>(110, 30);
@@ -67,7 +68,7 @@
designObj_->Execute(newFc, lpHp, coefs_, g0_);
GetCoefficients(ck, g0);
- frqResp_.SetParams(ORDER_, g0_, ck_);
+ frqResp_->SetParams(ORDER_, g0_, ck_);
drawerObj_->Erase();
drawerObj_->DrawAxis(); // 目盛線の描画
drawerObj_->DrawGraph(frqResp_); // 周波数特性のグラフのカーブを描画する
@@ -130,4 +131,3 @@
return ((int)(f/100.0f + 0.5f))*100;
}
}
-
--- a/MyClasses_Functions/DesignerDrawer.hpp Mon Apr 25 00:49:09 2016 +0000
+++ b/MyClasses_Functions/DesignerDrawer.hpp Mon Apr 25 12:50:20 2016 +0000
@@ -48,7 +48,7 @@
const uint16_t LOWER_F_, HIGHER_F_;
const uint32_t CURSOR_COLOR_, CURSOR_TOUCHED_COLOR_;
- IIR_CascadeFrqResp frqResp_; // IIR フィルタの周波数応答に対応するオブジェクト
+ IIR_CascadeFrqResp *frqResp_; // IIR フィルタの周波数応答に対応するオブジェクト
BilinearDesign::Coefs *coefs_; // 設計された係数
Biquad::Coefs *ck_;
float g0_; // 設計された係数(利得定数)
@@ -69,4 +69,3 @@
};
}
#endif // F746_DISIGNER_AND_DRAWER_HPP
-
--- a/MyClasses_Functions/FrquencyResponseDrawer.cpp Mon Apr 25 00:49:09 2016 +0000
+++ b/MyClasses_Functions/FrquencyResponseDrawer.cpp Mon Apr 25 12:50:20 2016 +0000
@@ -68,7 +68,7 @@
}
// 周波数特性のグラフの描画
- void FrqRespDrawer::DrawGraph(FrequencyResponse &frqResp, uint32_t color)
+ void FrqRespDrawer::DrawGraph(FrequencyResponse *frqResp, uint32_t color)
{
lcd_->SetTextColor(color);
uint16_t width = X(MAX_) - X(MIN_);
@@ -79,7 +79,7 @@
{
float frq = PosToFrq(n+ORGX_);
uint16_t x2 = X(frq);
- float absHz = frqResp.AbsH_z(exp(Complex(0, pi2FsM*frq)));
+ float absHz = frqResp->AbsH_z(exp(Complex(0, pi2FsM*frq)));
float dB = (absHz > 0.001f) ? 20.0f*log10f(absHz) : MIN_DB_;
uint16_t y2 = ORGY_ - Round((dB - MIN_DB_)*DB1_);
if (y2 > ORGY_) y2 = ORGY_;
@@ -101,4 +101,3 @@
lcd_->FillRect(ORGX_, ORGY_- height, X(MAX_)-X(MIN_)+1, height+1);
}
}
-
--- a/MyClasses_Functions/FrquencyResponseDrawer.hpp Mon Apr 25 00:49:09 2016 +0000
+++ b/MyClasses_Functions/FrquencyResponseDrawer.hpp Mon Apr 25 12:50:20 2016 +0000
@@ -57,8 +57,8 @@
string str = "[dB]");
// 周波数特性のグラフの描画
- void DrawGraph(FrequencyResponse &frqResp, uint32_t color);
- void DrawGraph(FrequencyResponse &frqResp)
+ void DrawGraph(FrequencyResponse *frqResp, uint32_t color);
+ void DrawGraph(FrequencyResponse *frqResp)
{ DrawGraph(frqResp, LINE_COLOR_);}
// 消去