1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-24 16:55:15 +03:00

X7 + XLite - Default contrast is too dark. Change from 20 to 15. Untested. (#7906)

This commit is contained in:
Bertrand Songis 2020-08-28 15:14:14 +02:00 committed by GitHub
parent db5b9dc1fc
commit 1cfe0edeb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 9 deletions

View file

@ -266,7 +266,9 @@ void generalDefault()
#if defined(PCBHORUS)
g_eeGeneral.blOffBright = 20;
#else
#endif
#if defined(LCD_CONTRAST_DEFAULT)
g_eeGeneral.contrast = LCD_CONTRAST_DEFAULT;
#endif
@ -2041,7 +2043,7 @@ int main()
// important to disable it before commencing with system initialisation (or
// we could put a bunch more WDG_RESET()s in. But I don't like that approach
// during boot up.)
#if defined(PCBTARANIS)
#if defined(LCD_CONTRAST_DEFAULT)
g_eeGeneral.contrast = LCD_CONTRAST_DEFAULT;
#endif

View file

@ -847,7 +847,7 @@ void ledBlue();
#define IS_LCD_RESET_NEEDED() true
#define LCD_CONTRAST_MIN 10
#define LCD_CONTRAST_MAX 30
#define LCD_CONTRAST_DEFAULT 20
#define LCD_CONTRAST_DEFAULT 15
#endif
#if defined(PCBX9D) || defined(PCBX9E) || (defined(PCBX9DP) && PCBREV < 2019)

View file

@ -144,9 +144,9 @@ void lcdStart()
lcdWriteCommand(0xE9); // Set bias=1/10
lcdWriteCommand(0x81); // Set Vop
#if defined(BOOT)
lcdWriteCommand(LCD_CONTRAST_OFFSET+LCD_CONTRAST_DEFAULT);
lcdWriteCommand(LCD_CONTRAST_OFFSET + LCD_CONTRAST_DEFAULT);
#else
lcdWriteCommand(LCD_CONTRAST_OFFSET+g_eeGeneral.contrast);
lcdWriteCommand(LCD_CONTRAST_OFFSET + g_eeGeneral.contrast);
#endif
lcdWriteCommand(0xA2); // Set line rate: 28KLPS
lcdWriteCommand(0x28); // Set panel loading
@ -173,11 +173,11 @@ void lcdStart()
void lcdWriteAddress(uint8_t x, uint8_t y)
{
lcdWriteCommand(x & 0x0F); // Set Column Address LSB CA[3:0]
lcdWriteCommand((x>>4) | 0x10); // Set Column Address MSB CA[7:4]
lcdWriteCommand(x & 0x0Fu); // Set Column Address LSB CA[3:0]
lcdWriteCommand((x >> 4u) | 0x10u); // Set Column Address MSB CA[7:4]
lcdWriteCommand((y&0x0F) | 0x60); // Set Row Address LSB RA [3:0]
lcdWriteCommand(((y>>4) & 0x0F) | 0x70); // Set Row Address MSB RA [7:4]
lcdWriteCommand((y & 0x0Fu) | 0x60u); // Set Row Address LSB RA [3:0]
lcdWriteCommand(((y >> 4u) & 0x0Fu) | 0x70u); // Set Row Address MSB RA [7:4]
}
#endif