[X7D] UI fixes
This commit is contained in:
@@ -102,6 +102,9 @@ uint8_t switchState(uint8_t index);
|
||||
#define LCD_W 128
|
||||
#define LCD_H 64
|
||||
#define LCD_DEPTH 1
|
||||
#define LCD_CONTRAST_MIN 10
|
||||
#define LCD_CONTRAST_MAX 45
|
||||
#define LCD_CONTRAST_DEFAULT 25
|
||||
void lcdRefresh(void);
|
||||
#define lcdRefreshWait()
|
||||
void lcdSetRefVolt(unsigned char val);
|
||||
|
||||
@@ -173,6 +173,9 @@ enum EnumSwitches
|
||||
#define LCD_W 128
|
||||
#define LCD_H 64
|
||||
#define LCD_DEPTH 1
|
||||
#define LCD_CONTRAST_MIN 10
|
||||
#define LCD_CONTRAST_MAX 45
|
||||
#define LCD_CONTRAST_DEFAULT 25
|
||||
void lcdInit(void);
|
||||
void lcdRefresh(void);
|
||||
#define lcdRefreshWait()
|
||||
|
||||
@@ -519,11 +519,17 @@ void ledBlue(void);
|
||||
#define LCD_H 64
|
||||
#define LCD_DEPTH 1
|
||||
#define IS_LCD_RESET_NEEDED() true
|
||||
#define LCD_CONTRAST_MIN 10
|
||||
#define LCD_CONTRAST_MAX 30
|
||||
#define LCD_CONTRAST_DEFAULT 20
|
||||
#else
|
||||
#define LCD_W 212
|
||||
#define LCD_H 64
|
||||
#define LCD_DEPTH 4
|
||||
#define IS_LCD_RESET_NEEDED() (!WAS_RESET_BY_WATCHDOG_OR_SOFTWARE())
|
||||
#define LCD_CONTRAST_MIN 0
|
||||
#define LCD_CONTRAST_MAX 45
|
||||
#define LCD_CONTRAST_DEFAULT 25
|
||||
#endif
|
||||
void lcdInit(void);
|
||||
void lcdInitFinish(void);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
#define CONTRAST_OFS 160
|
||||
#define LCD_CONTRAST_OFFSET 160
|
||||
#define RESET_WAIT_DELAY_MS 300 // Wait time after LCD reset before first command
|
||||
#define WAIT_FOR_DMA_END() do { } while (lcd_busy)
|
||||
|
||||
@@ -124,9 +124,9 @@ void lcdStart()
|
||||
lcdWriteCommand(0xE9); // Set bias=1/10
|
||||
lcdWriteCommand(0x81); // Set Vop
|
||||
#if defined(BOOT)
|
||||
lcdWriteCommand(CONTRAST_OFS+25);
|
||||
lcdWriteCommand(LCD_CONTRAST_OFFSET+LCD_CONTRAST_DEFAULT);
|
||||
#else
|
||||
lcdWriteCommand(CONTRAST_OFS+g_eeGeneral.contrast);
|
||||
lcdWriteCommand(LCD_CONTRAST_OFFSET+g_eeGeneral.contrast);
|
||||
#endif
|
||||
lcdWriteCommand(0xA2); // Set line rate: 28KLPS
|
||||
lcdWriteCommand(0x28); // Set panel loading
|
||||
@@ -330,8 +330,8 @@ void lcdSetRefVolt(uint8_t val)
|
||||
|
||||
#if !defined(PCBX7D)
|
||||
WAIT_FOR_DMA_END();
|
||||
#endif
|
||||
|
||||
lcdWriteCommand(0x81); // Set Vop
|
||||
lcdWriteCommand(val+CONTRAST_OFS); // 0-255
|
||||
#endif
|
||||
lcdWriteCommand(val+LCD_CONTRAST_OFFSET); // 0-255
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user