Fix logic for choosing default display size

This commit is contained in:
Bohdan Kmit 2019-07-23 23:29:51 +03:00
parent fdda0429d6
commit 7b6850e6be
1 changed files with 2 additions and 2 deletions

View File

@ -86,10 +86,10 @@ void Ssd1306InitDriver(void)
}
if (XDSP_02 == Settings.display_model) {
if ((Settings.display_width != 96) || (Settings.display_width != 128)) {
if ((Settings.display_width != 96) && (Settings.display_width != 128)) {
Settings.display_width = 128;
}
if ((Settings.display_height != 16) || (Settings.display_height != 32) || (Settings.display_height != 64)) {
if ((Settings.display_height != 16) && (Settings.display_height != 32) && (Settings.display_height != 64)) {
Settings.display_height = 64;
}
int8_t reset_pin = -1;