Skip to content

Commit

Permalink
Fixed issue in OLED.cpp where display would not fully clear on idle…
Browse files Browse the repository at this point in the history
… when LogoScreensaver=0
  • Loading branch information
Chipster committed Jun 14, 2023
1 parent b8c5317 commit a0f1005
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions OLED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ void COLED::setIdleInt()
m_display.clearDisplay();
OLED_statusbar();

if (m_displayScroll && m_displayLogoScreensaver)
m_display.startscrolldiagleft(0x00,0x0f); //the MMDVM logo scrolls the whole screen

unsigned char info[100U];
CNetworkInfo* m_network;

Expand Down Expand Up @@ -303,26 +306,28 @@ void COLED::setIdleInt()
ssid = "Unknown"; // `/etc/hostapd.conf` does not exist...
}

m_display.setCursor(0, OLED_LINE3);
m_display.setTextSize(1);
m_display.printf("Auto-AP Running...");
m_display.setCursor(0, OLED_LINE5);
m_display.setTextSize(1);
m_display.printf("SSID: %s", ssid.c_str());
m_display.setCursor(0, OLED_LINE6);
m_display.setTextSize(1);
m_display.printf("IP: %s", m_ipaddress.c_str());
if (m_displayLogoScreensaver) {
m_display.setCursor(0, OLED_LINE3);
m_display.setTextSize(1);
m_display.printf("Auto-AP Running...");
m_display.setCursor(0, OLED_LINE5);
m_display.setTextSize(1);
m_display.printf("SSID: %s", ssid.c_str());
m_display.setCursor(0, OLED_LINE6);
m_display.setTextSize(1);
m_display.printf("IP: %s", m_ipaddress.c_str());
}
} else { // Connected to network - no Auto-AP mode; normal display layout...
m_display.setCursor(0,OLED_LINE3);
m_display.setTextSize(1);
m_display.print(" -IDLE-");
m_display.setCursor(0, OLED_LINE5);
m_display.printf("%s", m_ipaddress.c_str());
if (m_displayLogoScreensaver) {
m_display.setCursor(0,OLED_LINE3);
m_display.setTextSize(1);
m_display.print(" -IDLE-");
m_display.setCursor(0, OLED_LINE5);
m_display.printf("%s", m_ipaddress.c_str());
}
}

if (m_displayScroll && m_displayLogoScreensaver)
m_display.startscrolldiagleft(0x00,0x0f); // the MMDVM logo scrolls the whole screen
m_display.display();

}

void COLED::setErrorInt(const char* text)
Expand Down

0 comments on commit a0f1005

Please sign in to comment.