48 const uint16_t _x = 10;
50 const uint16_t _yStart = 10;
51 const uint16_t _yMax = 480;
52 const uint16_t _deltaY = 25;
57 uint16_t _fontFG = 0xFFFF;
58 uint16_t _fontBG = 0x0000;
60 static ErrMsg *_instance;
73 : _canvas{}, _y{_yStart}, _line{
""}, pos{0}, _type{ErrorType::WARNING}
78 ~ErrMsg(
void) =
default;
94 _instance =
new ErrMsg();
136 template <
typename T>
149 _addToLine(value, buffSize);
171 void _resetCanvas(uint16_t color);
174 void _sendError(
void);
177 void _sendWarning(
void);
180 void _addToLine(
const char *
const value, int16_t buffSize);
181 void _addToLine(
const int value, int16_t buffSize);
182 void _addToLine(
const bool value, int16_t buffSize);
183 void _addToLine(
const unsigned int value, int16_t buffSize);
ErrMsg & errMsg
Global instance of ErrMsg.
Definition ErrMsg.cpp:185
#define _MAXCHARS
Maximum number of characters that can be displayed in each line.
Definition ErrMsg.h:16
Provides higher level TFT graphic functionality used by the menu system.
Definition Canvas.h:34
Provides a mechnism for displaying error and warning messages on the TFT display.
Definition ErrMsg.h:45
ErrMsg & warning(void)
Sets up the display to shown a warning message.
Definition ErrMsg.cpp:40
void send(void)
Displays the error message on the screen.
Definition ErrMsg.cpp:66
static ErrMsg & getInstance(void)
Returns reference to the ErrMsg object.
Definition ErrMsg.h:91
static EndlToken endl
End of line token used by the operator<< method.
Definition ErrMsg.h:84
ErrMsg & error(void)
Sets up the display to show an error message.
Definition ErrMsg.cpp:17
void checkForUserInput(void)
Method used by TaskManager. Asks ErrMsg check to see if the screen has been touched.
Definition ErrMsg.cpp:98
ErrMsg & operator<<(const T value)
Adds information to the error message.
Definition ErrMsg.h:137
Token that indicates the end of a line in the error message.
Definition ErrMsg.h:82