Automate écran capacitif

Dependencies:   BSP_DISCO_F469NI LCD_DISCO_F469NI SeeedStudioTFTv2 TFT_fonts mbed

Fork of DISCO-F469NI_LCD_demo by ST

Committer:
SquirrelGod
Date:
Fri Mar 31 15:36:26 2017 +0000
Revision:
2:2182df2d7810
Programme ?cran capacitif

Who changed what in which revision?

UserRevisionLine numberNew contents of line
SquirrelGod 2:2182df2d7810 1 //-----------------------------------------------------------
SquirrelGod 2:2182df2d7810 2 // BlinkLabel class -- derived class of Label class
SquirrelGod 2:2182df2d7810 3 // For displaying error message
SquirrelGod 2:2182df2d7810 4 //
SquirrelGod 2:2182df2d7810 5 // 2016/08/16, Copyright (c) 2016 MIKAMI, Naoki
SquirrelGod 2:2182df2d7810 6 //-----------------------------------------------------------
SquirrelGod 2:2182df2d7810 7
SquirrelGod 2:2182df2d7810 8 #ifndef F746_BLINK_LABEL_HPP
SquirrelGod 2:2182df2d7810 9 #define F746_BLINK_LABEL_HPP
SquirrelGod 2:2182df2d7810 10
SquirrelGod 2:2182df2d7810 11 #include "Label.hpp"
SquirrelGod 2:2182df2d7810 12 #include "ResetButton.hpp"
SquirrelGod 2:2182df2d7810 13
SquirrelGod 2:2182df2d7810 14 namespace Mikami
SquirrelGod 2:2182df2d7810 15 {
SquirrelGod 2:2182df2d7810 16 class BlinkLabel : public Label
SquirrelGod 2:2182df2d7810 17 {
SquirrelGod 2:2182df2d7810 18 public:
SquirrelGod 2:2182df2d7810 19 // Constructor
SquirrelGod 2:2182df2d7810 20 BlinkLabel(uint16_t x, uint16_t y, const string str,
SquirrelGod 2:2182df2d7810 21 TextAlignMode mode = LEFT,
SquirrelGod 2:2182df2d7810 22 sFONT &fonts = Font20,
SquirrelGod 2:2182df2d7810 23 uint32_t textColor = LCD_COLOR_RED,
SquirrelGod 2:2182df2d7810 24 uint32_t backColor = GuiBase::ENUM_BACK,
SquirrelGod 2:2182df2d7810 25 uint32_t on = 500, uint32_t off = 200)
SquirrelGod 2:2182df2d7810 26 : Label(x, y, str, mode, fonts, textColor, backColor)
SquirrelGod 2:2182df2d7810 27 {
SquirrelGod 2:2182df2d7810 28 ResetButton *reset = new ResetButton();
SquirrelGod 2:2182df2d7810 29 while (true) // Blinking here
SquirrelGod 2:2182df2d7810 30 {
SquirrelGod 2:2182df2d7810 31 wait_ms(on);
SquirrelGod 2:2182df2d7810 32 Draw(backColor);
SquirrelGod 2:2182df2d7810 33 wait_ms(off);
SquirrelGod 2:2182df2d7810 34 Draw(textColor);
SquirrelGod 2:2182df2d7810 35 reset->Do();
SquirrelGod 2:2182df2d7810 36 }
SquirrelGod 2:2182df2d7810 37 }
SquirrelGod 2:2182df2d7810 38
SquirrelGod 2:2182df2d7810 39 private:
SquirrelGod 2:2182df2d7810 40 // disallow copy constructor and assignment operator
SquirrelGod 2:2182df2d7810 41 BlinkLabel(const BlinkLabel&);
SquirrelGod 2:2182df2d7810 42 BlinkLabel& operator=(const BlinkLabel&);
SquirrelGod 2:2182df2d7810 43 };
SquirrelGod 2:2182df2d7810 44 }
SquirrelGod 2:2182df2d7810 45 #endif // F746_BLINK_LABEL_HPP