Better support for LCD 2004A 20x4 #8062

This commit is contained in:
Khoa Ton 2020-04-04 02:01:38 -07:00
parent c066b0c8e2
commit f1ed412acb
2 changed files with 11 additions and 0 deletions

View File

@ -502,6 +502,8 @@
// #define USE_DISPLAY // Add I2C Display Support (+2k code)
#define USE_DISPLAY_MODES1TO5 // Enable display mode 1 to 5 in addition to mode 0
#define USE_DISPLAY_LCD // [DisplayModel 1] [I2cDriver3] Enable Lcd display (I2C addresses 0x27 and 0x3F) (+6k code)
#define USE_DISPLAY_LCD_ROWS 4 // Rows of display
#define USE_DISPLAY_LCD_COLS 20 // Columns of display
#define USE_DISPLAY_SSD1306 // [DisplayModel 2] [I2cDriver4] Enable SSD1306 Oled 128x64 display (I2C addresses 0x3C and 0x3D) (+16k code)
#define USE_DISPLAY_MATRIX // [DisplayModel 3] [I2cDriver5] Enable 8x8 Matrix display (I2C adresseses see below) (+11k code)
#define MTX_ADDRESS1 0x71 // [DisplayAddress1] I2C address of first 8x8 matrix module

View File

@ -1087,9 +1087,18 @@ void SettingsDefaultSet2(void)
// Settings.display_model = 0;
Settings.display_mode = 1;
Settings.display_refresh = 2;
#ifdef USE_DISPLAY_LCD_ROWS
Settings.display_rows = USE_DISPLAY_LCD_ROWS;
#else
Settings.display_rows = 2;
#endif
#ifdef USE_DISPLAY_LCD_COLS
Settings.display_cols[0] = USE_DISPLAY_LCD_COLS;
Settings.display_cols[1] = USE_DISPLAY_LCD_COLS/2;
#else
Settings.display_cols[0] = 16;
Settings.display_cols[1] = 8;
#endif
Settings.display_dimmer = 1;
Settings.display_size = 1;
Settings.display_font = 1;