update ss_oled to 3.1.0

This commit is contained in:
Verkehrsrot 2019-12-15 17:49:55 +01:00
parent ff44e4935f
commit a2274cda2c
2 changed files with 11 additions and 2 deletions

View File

@ -58,7 +58,8 @@ lib_deps_lora =
;MCCI LoRaWAN LMIC library@>=3.1.0 ;MCCI LoRaWAN LMIC library@>=3.1.0
https://github.com/mcci-catena/arduino-lmic.git#5322dd1 https://github.com/mcci-catena/arduino-lmic.git#5322dd1
lib_deps_display = lib_deps_display =
ss_oled@=3.0.0 ;ss_oled@>=3.1.0
https://github.com/bitbank2/ss_oled.git#26f5d40
BitBang_I2C@>=1.2.0 BitBang_I2C@>=1.2.0
QRCode@>=0.0.1 QRCode@>=0.0.1
lib_deps_matrix_display = lib_deps_matrix_display =

View File

@ -56,7 +56,12 @@ static const char TAG[] = __FILE__;
const char *printmonth[] = {"xxx", "Jan", "Feb", "Mar", "Apr", "May", "Jun", const char *printmonth[] = {"xxx", "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
uint8_t DisplayIsOn = 0; uint8_t DisplayIsOn = 0;
uint8_t displaybuf[DISPLAY_WIDTH * DISPLAY_HEIGHT / 8] = {0};
#ifdef USE_BACKBUFFER
static uint8_t displaybuf[DISPLAY_WIDTH * DISPLAY_HEIGHT / 8] = {0};
#else
static uint8_t *displaybuf = NULL;
#endif
QRCode qrcode; QRCode qrcode;
@ -82,6 +87,9 @@ void init_display(bool verbose) {
oledInit(OLED_128x64, true, false, -1, -1, 400000L); oledInit(OLED_128x64, true, false, -1, -1, 400000L);
#endif #endif
// set display buffer
oledSetBackBuffer(displaybuf);
// clear display // clear display
oledSetContrast(DISPLAYCONTRAST); oledSetContrast(DISPLAYCONTRAST);
oledFill(0, 1); oledFill(0, 1);