remove most of the defines

This commit is contained in:
2023-08-18 15:34:56 +02:00
parent 4cd2b9368d
commit a82b32087c
21 changed files with 155 additions and 285 deletions
+5 -7
View File
@@ -17,11 +17,7 @@
#include <displayWrapper.h>
#include <component.h>
#define DISPLAY_WRAPPER_ROWS 16
#define DISPLAY_WRAPPER_LINES 2
typedef void (*LcdWrapperCallback) (const char data[][DISPLAY_WRAPPER_ROWS], uint8_t lines, uint8_t rows);
typedef void (*LcdWrapperCallback) (const char data[][16], uint8_t lines, uint8_t rows);
/**
* @brief A class for the Menu class to print information
*
@@ -60,13 +56,15 @@ class LcdWrapper : public DisplayWrapper, public Component {
*/
void print(const char *str) override;
static constexpr uint8_t totalRows = 16;
static constexpr uint8_t totalLines = 2;
private:
void run() override;
LiquidCrystal_I2C* lcd;
LcdWrapperCallback callback = nullptr;
char data[DISPLAY_WRAPPER_LINES][DISPLAY_WRAPPER_ROWS];
char data[LcdWrapper::totalLines][LcdWrapper::totalRows];
uint8_t cursorRow = 0;
uint8_t cursorLine = 0;