update ss_oled lib (experimental)

This commit is contained in:
Verkehrsrot committed 2019-12-21 15:18:42 +01:00
1 parent 12f00a9203
commit c65c32275e
4 files changed
+16 -14

No files matched your search

+5 -5
View File
@@ -56,7 +56,7 @@ static const char TAG[] = __FILE__;
const char *printmonth[] = {"xxx", "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
uint8_t DisplayIsOn = 0;
static uint8_t displaybuf[DISPLAY_WIDTH * DISPLAY_HEIGHT / 8] = {0};
uint8_t displaybuf[DISPLAY_WIDTH * DISPLAY_HEIGHT / 8] = {0};
QRCode qrcode;
@@ -83,7 +83,7 @@ void init_display(bool verbose) {
#endif
// set display buffer
//oledSetBackBuffer(displaybuf);
oledSetBackBuffer(displaybuf);
// clear display
oledSetContrast(DISPLAYCONTRAST);
@@ -111,7 +111,7 @@ void init_display(bool verbose) {
: "ext.");
// give user some time to read or take picture
oledDumpBuffer(NULL);
oledDumpBuffer(displaybuf);
delay(2000);
oledFill(0x00, 1);
#endif // VERBOSE
@@ -134,7 +134,7 @@ void init_display(bool verbose) {
dp_printf(80, i + 3, FONT_NORMAL, 0, "%4.4s", deveui + i * 4);
// give user some time to read or take picture
oledDumpBuffer(NULL);
oledDumpBuffer(displaybuf);
delay(8000);
oledSetContrast(DISPLAYCONTRAST);
oledFill(0x00, 1);
@@ -178,7 +178,7 @@ void refreshTheDisplay(bool nextPage) {
}
draw_page(t, DisplayPage);
oledDumpBuffer(NULL);
oledDumpBuffer(displaybuf);
I2C_MUTEX_UNLOCK(); // release i2c bus access
+6 -2
View File
@@ -49,6 +49,10 @@ void start_ota_update() {
#else
oledInit(OLED_128x64, ANGLE_FLIPY, false, -1, -1, 400000L);
#endif
// set display buffer
oledSetBackBuffer(displaybuf);
oledFill(0, 1);
dp_printf(0, 0, 0, 1, "SOFTWARE UPDATE");
dp_printf(0, 1, 0, 0, "WiFi connect ..");
@@ -56,7 +60,7 @@ void start_ota_update() {
dp_printf(0, 3, 0, 0, "Fetching ..");
dp_printf(0, 4, 0, 0, "Downloading ..");
dp_printf(0, 5, 0, 0, "Rebooting ..");
oledDumpBuffer(NULL);
oledDumpBuffer(displaybuf);
#endif
ESP_LOGI(TAG, "Starting Wifi OTA update");
@@ -309,7 +313,7 @@ void ota_display(const uint8_t row, const std::string status,
dp_printf(0, 7, 0, 0, " ");
dp_printf(0, 7, 0, 0, msg.substr(0, 16).c_str());
}
oledDumpBuffer(NULL);
oledDumpBuffer(displaybuf);
#endif
}