remove most of the defines
This commit is contained in:
@@ -22,20 +22,20 @@ void LcdWrapper::run() {
|
||||
return;
|
||||
|
||||
this->lcd->clear();
|
||||
for (uint8_t i = 0; i < DISPLAY_WRAPPER_LINES; i++) {
|
||||
for (uint8_t i = 0; i < LcdWrapper::totalLines; i++) {
|
||||
this->lcd->setCursor(0, i);
|
||||
this->lcd->print(this->data[i]);
|
||||
}
|
||||
|
||||
if (this->callback)
|
||||
this->callback(this->data, DISPLAY_WRAPPER_LINES, DISPLAY_WRAPPER_ROWS);
|
||||
this->callback(this->data, LcdWrapper::totalLines, LcdWrapper::totalRows);
|
||||
|
||||
this->changed = false;
|
||||
}
|
||||
|
||||
void LcdWrapper::clear() {
|
||||
for (uint8_t i = 0; i < DISPLAY_WRAPPER_LINES; i++) {
|
||||
for (uint8_t j = 0; j < DISPLAY_WRAPPER_ROWS; j++) {
|
||||
for (uint8_t i = 0; i < LcdWrapper::totalLines; i++) {
|
||||
for (uint8_t j = 0; j < LcdWrapper::totalRows; j++) {
|
||||
data[i][j] = ' ';
|
||||
}
|
||||
}
|
||||
@@ -43,11 +43,11 @@ void LcdWrapper::clear() {
|
||||
}
|
||||
|
||||
void LcdWrapper::setCursor(uint8_t row, uint8_t line) {
|
||||
if (row > DISPLAY_WRAPPER_ROWS - 1)
|
||||
row = DISPLAY_WRAPPER_ROWS - 1;
|
||||
if (row > LcdWrapper::totalRows - 1)
|
||||
row = LcdWrapper::totalRows - 1;
|
||||
|
||||
if (line > DISPLAY_WRAPPER_LINES - 1)
|
||||
line = DISPLAY_WRAPPER_LINES - 1;
|
||||
if (line > LcdWrapper::totalLines - 1)
|
||||
line = LcdWrapper::totalLines - 1;
|
||||
|
||||
this->cursorRow = row;
|
||||
this->cursorLine = line;
|
||||
@@ -55,7 +55,7 @@ void LcdWrapper::setCursor(uint8_t row, uint8_t line) {
|
||||
|
||||
void LcdWrapper::print(const char *str) {
|
||||
uint8_t inputStringPosition = 0;
|
||||
for (uint8_t i = this->cursorRow; i < DISPLAY_WRAPPER_ROWS; i++) {
|
||||
for (uint8_t i = this->cursorRow; i < LcdWrapper::totalRows; i++) {
|
||||
if (str[inputStringPosition] == '\0')
|
||||
break;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user