Dilbert
Firmware for the Dilbert interactive badge.
 All Classes Files Functions Variables Enumerations Macros Pages
DilbertApp.h
Go to the documentation of this file.
1 
3 #ifndef _DILBERTAPP_H_
4 #define _DILBERTAPP_H_
5 
6 #include <App.h>
7 
13 class DilbertApp : public App
14 {
15 public:
16  DilbertApp()
17  : App("Dilbert")
18  {
19  }
20 
24  virtual void onEntry()
25  {
26  App::onEntry();
27 
28  /* Clear the screen */
29  m_badge->display().fillScreen(ILI9341_BLACK);
30 
31  drawHeader();
32  drawDilbert();
33  }
34 
35 private:
39  void drawHeader()
40  {
41  m_badge->display().setTextColor(ILI9341_WHITE);
42  m_badge->display().setCursor(0, 0);
43  m_badge->display().setTextSize(4);
44  m_badge->display().println("Dilbert");
45  }
46 
50  void drawDilbert()
51  {
52  m_badge->display().setTextSize(1);
53  m_badge->display().println("");
54  m_badge->display().println(" ,-._.-._.-._.-._.-.");
55  m_badge->display().println(" `-. ,-'");
56  m_badge->display().println(" | | ");
57  m_badge->display().println(" | | ");
58  m_badge->display().println(" | | ");
59  m_badge->display().println(" | .. ,. | ");
60  m_badge->display().println(" ,-|___| | |___|-.");
61  m_badge->display().println(" | | L__;__J | |");
62  m_badge->display().println(" `| / \\ |'");
63  m_badge->display().println(" | ( ) |");
64  m_badge->display().println(" | `'' |");
65  m_badge->display().println(" | |");
66  m_badge->display().println(" | |");
67  m_badge->display().println(" ;--..._____...--;");
68  m_badge->display().println(" ,'--.._/ \\_..--`.");
69  m_badge->display().println(" / `. ,' \\");
70  m_badge->display().println(" / /`. | | _l_ \\");
71  m_badge->display().println(" /_/ \\ \\_J | |\" |\\_\\");
72  m_badge->display().println(" // `-.__.' | | \\\\");
73  m_badge->display().println(" || | `---' ||");
74  m_badge->display().println(" || | || ");
75  m_badge->display().println(" || | ||");
76  m_badge->display().println(" || | ||");
77  m_badge->display().println(" || | ||");
78  m_badge->display().println(" ;' | | | `; ");
79  m_badge->display().println(" `' \\ | / `'");
80  m_badge->display().println(" `--..____/ \\____..--'");
81  m_badge->display().println(" | | |");
82  m_badge->display().println(" | | |");
83  m_badge->display().println(" | | |");
84  m_badge->display().println(" | | |");
85  m_badge->display().println(" | | |");
86  m_badge->display().println(" | | |");
87  m_badge->display().println(" | | |");
88  m_badge->display().println(" | | |");
89  m_badge->display().println(" | | |");
90  m_badge->display().println(" | | |");
91  m_badge->display().println(" |_______|_______|");
92  m_badge->display().println(" _..--' | | `--.._");
93  m_badge->display().println(" ;________.___| |___.________;");
94  }
95 };
96 
97 #endif
Displays Dilbert image.
Definition: DilbertApp.h:13
Adafruit_ILI9341 & display()
Gets the TFT display driver.
Definition: Dilbert.h:44
virtual void onEntry()
Called when the application is entered.
Definition: App.h:70
virtual void onEntry()
Called when the application is entered.
Definition: DilbertApp.h:24
App(char *name)
Creates a new instance of a badge application.
Definition: App.h:22
Dilbert * m_badge
Pointer to badge driver.
Definition: App.h:129
Used to encapsulate an individual application.
Definition: App.h:15