Skip to content

Commit bb2de63

Browse files
Merge pull request #961 from OpenEVSE/local_ui_tidyup
Local UI tidy up
2 parents 59b1c40 + 2e1b578 commit bb2de63

14 files changed

+958
-540
lines changed

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ neopixel_lib = adafruit/Adafruit [email protected]
128128
ws2812fx_lib = kitesurfer1404/[email protected]
129129

130130
gfx_display_libs =
131-
131+
# lvgl/lvgl@^8.3.9
132132
bodmer/TFT_eSPI@^2.5.31
133133
bitbank2/PNGdec@^1.0.1
134134
SPI

src/lcd_common.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#ifndef __LCD_COMMON_H
2+
#define __LCD_COMMON_H
3+
4+
#include <TFT_eSPI.h>
5+
//#include <Fonts/FreeSans9pt7b.h>
6+
//#include <Fonts/FreeSans24pt7b.h>
7+
8+
// LCD colour definitions
9+
#define TFT_OPENEVSE_BACK 0x2413
10+
#define TFT_OPENEVSE_GREEN 0x3E92
11+
#define TFT_OPENEVSE_TEXT 0x1BD1
12+
#define TFT_OPENEVSE_INFO_BACK 0x23d1
13+
14+
// Message definitions
15+
#define LCD_MAX_LEN 16
16+
#define LCD_MAX_LINES 2
17+
18+
#define LCD_CLEAR_LINE (1 << 0)
19+
#define LCD_DISPLAY_NOW (1 << 1)
20+
21+
#ifndef LCD_BACKLIGHT_PIN
22+
#define LCD_BACKLIGHT_PIN TFT_BL
23+
#endif
24+
25+
// Helper macro
26+
#ifndef ARRAY_ITEMS
27+
#define ARRAY_ITEMS(a) (sizeof(a) / sizeof(a[0]))
28+
#endif
29+
30+
// Message line buffer - shared across screens
31+
extern char _msg[LCD_MAX_LINES][LCD_MAX_LEN + 1];
32+
33+
#endif // __LCD_COMMON_H

0 commit comments

Comments
 (0)