Chapter006_Zara_F746NG

Dependencies:   F746_GUI SRF08 Array_Matrix TS_DISCO_F746NG mbed LCD_DISCO_F746NG BSP_DISCO_F746NG SDFileSystem_Warning_Fixed FrequencyResponseDrawer F746_SAI_IO

Revision:
2:2478e7a8e8d5
Parent:
0:04b43b777fae
Child:
3:cda40218256c
--- a/MyClasses_Functions/DesignerDrawer.cpp	Wed Apr 20 12:10:17 2016 +0000
+++ b/MyClasses_Functions/DesignerDrawer.cpp	Mon Apr 25 00:49:09 2016 +0000
@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 //  IIR フィルタを双一次 z 変換で設計し,その周波数特性を描画するためのクラス
 //  
-//  2016/04/19, Copyright (c) 2016 MIKAMI, Naoki
+//  2016/04/25, Copyright (c) 2016 MIKAMI, Naoki
 //------------------------------------------------------------------------------
 
 #include "DesignerDrawer.hpp"
@@ -10,17 +10,17 @@
 {
     // Constructor
     DesignerDrawer::DesignerDrawer(uint16_t x0, uint16_t y0,
-                                   uint16_t db10, int fs, int order,
+                                   uint16_t db1, int fs, int order,
                                    float fc, uint16_t fL, uint16_t fH,
                                    BilinearDesign::Type lpHp)
         : lcd_(GuiBase::GetLcdPtr()), ts_(GuiBase::GetTsPtr()),
-          X0_(x0), Y0_(y0), DB10_(db10), ORDER_(order),
-          CURSOR_Y0_(y0+1-db10*6), CURSOR_LENGTH_(db10*6-1),
+          X0_(x0), Y0_(y0), DB1_(db1), ORDER_(order),
+          CURSOR_Y0_(y0+1-db1*60), CURSOR_LENGTH_(db1*60-1),
           LOWER_F_(fL), HIGHER_F_(fH),
           CURSOR_COLOR_(0xFFE000D0), CURSOR_TOUCHED_COLOR_(0xFFFF80FF)
     {
         drawerObj_ = new FrqRespDrawer(x0, 100.0f, 20000.0f, 140,
-                                       y0, -60, 0, db10, fs);
+                                       y0, -60, 0, db1, 10, fs);
 
         // 双一次 z 変換による IIR フィルタの設計
         designObj_ = new BilinearDesign(order, fs);
@@ -101,8 +101,8 @@
         FrqRespDrawer::AxisX_Char numX[] =  // 横軸の目盛値を描画する際に使う構造体の配列
             {{  100, "0.1"}, {  200, "0.2"}, {  500, "0.5"}, { 1000,  "1"},
              { 2000,   "2"}, { 5000,   "5"}, {10000,  "10"}, {20000, "20"}};
-        drawerObj_->DrawNumericX(numX, 8, 6, "Frequency [kHz]"); // 横軸の目盛
-        drawerObj_->DrawNumericY(-24, -6, 4, 20, "%3d");         // 縦軸の目盛は 20 dB 間隔
+        drawerObj_->DrawNumericX(numX, 8, 6, "Frequency [kHz]");    // 横軸の目盛
+        drawerObj_->DrawNumericY(-24, -6, 20, "%3d");               // 縦軸の目盛は 20 dB 間隔
         drawerObj_->DrawGraph(frqResp_);    // 周波数特性のカーブの描画
 
         cursorX_ = drawerObj_->X(fC_);