![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
CQエレクトロニクス・セミナ「実習・マイコンを動かしながら学ぶディジタル・フィルタ」で使うプログラム.1次IIRフィルタの係数をターミナルから変更できる. http://seminar.cqpub.co.jp/ccm/ES18-0020
Dependencies: mbed Array_Matrix BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG
F746_Gui_New/BlinkLabel.hpp@2:aa11055138a2, 2017-11-08 (annotated)
- Committer:
- MikamiUitOpen
- Date:
- Wed Nov 08 11:10:56 2017 +0000
- Revision:
- 2:aa11055138a2
- Parent:
- 0:47718d3154d9
3
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MikamiUitOpen | 0:47718d3154d9 | 1 | //----------------------------------------------------------- |
MikamiUitOpen | 0:47718d3154d9 | 2 | // BlinkLabel class -- derived class of Label class |
MikamiUitOpen | 0:47718d3154d9 | 3 | // For displaying error message |
MikamiUitOpen | 0:47718d3154d9 | 4 | // |
MikamiUitOpen | 0:47718d3154d9 | 5 | // 2017/01/25, Copyright (c) 2017 MIKAMI, Naoki |
MikamiUitOpen | 0:47718d3154d9 | 6 | //----------------------------------------------------------- |
MikamiUitOpen | 0:47718d3154d9 | 7 | |
MikamiUitOpen | 0:47718d3154d9 | 8 | #ifndef F746_BLINK_LABEL_HPP |
MikamiUitOpen | 0:47718d3154d9 | 9 | #define F746_BLINK_LABEL_HPP |
MikamiUitOpen | 0:47718d3154d9 | 10 | |
MikamiUitOpen | 0:47718d3154d9 | 11 | #include "Label.hpp" |
MikamiUitOpen | 0:47718d3154d9 | 12 | #include "ResetButton.hpp" |
MikamiUitOpen | 0:47718d3154d9 | 13 | |
MikamiUitOpen | 0:47718d3154d9 | 14 | namespace Mikami |
MikamiUitOpen | 0:47718d3154d9 | 15 | { |
MikamiUitOpen | 0:47718d3154d9 | 16 | class BlinkLabel : public Label |
MikamiUitOpen | 0:47718d3154d9 | 17 | { |
MikamiUitOpen | 0:47718d3154d9 | 18 | public: |
MikamiUitOpen | 0:47718d3154d9 | 19 | // Constructor |
MikamiUitOpen | 0:47718d3154d9 | 20 | BlinkLabel(uint16_t x, uint16_t y, const string str, |
MikamiUitOpen | 0:47718d3154d9 | 21 | TextAlignMode mode = LEFT, |
MikamiUitOpen | 0:47718d3154d9 | 22 | sFONT &fonts = Font20, |
MikamiUitOpen | 0:47718d3154d9 | 23 | uint32_t textColor = LCD_COLOR_RED, |
MikamiUitOpen | 0:47718d3154d9 | 24 | uint32_t backColor = GuiBase::ENUM_BACK, |
MikamiUitOpen | 0:47718d3154d9 | 25 | uint32_t on = 500, uint32_t off = 200) |
MikamiUitOpen | 0:47718d3154d9 | 26 | : Label(x, y, str, mode, fonts, textColor, backColor) |
MikamiUitOpen | 0:47718d3154d9 | 27 | { |
MikamiUitOpen | 0:47718d3154d9 | 28 | ResetButton reset; |
MikamiUitOpen | 0:47718d3154d9 | 29 | while (true) // Blinking here |
MikamiUitOpen | 0:47718d3154d9 | 30 | { |
MikamiUitOpen | 0:47718d3154d9 | 31 | wait_ms(on); |
MikamiUitOpen | 0:47718d3154d9 | 32 | Draw(backColor); |
MikamiUitOpen | 0:47718d3154d9 | 33 | wait_ms(off); |
MikamiUitOpen | 0:47718d3154d9 | 34 | Draw(textColor); |
MikamiUitOpen | 0:47718d3154d9 | 35 | reset.DoIfTouched(); |
MikamiUitOpen | 0:47718d3154d9 | 36 | } |
MikamiUitOpen | 0:47718d3154d9 | 37 | } |
MikamiUitOpen | 0:47718d3154d9 | 38 | |
MikamiUitOpen | 0:47718d3154d9 | 39 | private: |
MikamiUitOpen | 0:47718d3154d9 | 40 | // disallow copy constructor and assignment operator |
MikamiUitOpen | 0:47718d3154d9 | 41 | BlinkLabel(const BlinkLabel&); |
MikamiUitOpen | 0:47718d3154d9 | 42 | BlinkLabel& operator=(const BlinkLabel&); |
MikamiUitOpen | 0:47718d3154d9 | 43 | }; |
MikamiUitOpen | 0:47718d3154d9 | 44 | } |
MikamiUitOpen | 0:47718d3154d9 | 45 | #endif // F746_BLINK_LABEL_HPP |
MikamiUitOpen | 0:47718d3154d9 | 46 |