From 4ee9ff7bf5455fa31c680775e5f6dc16e624a3c1 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Tue, 4 Feb 2020 14:05:46 +0100 Subject: [PATCH] SS_OLED library update --- platformio.ini | 8 ++++---- src/display.cpp | 6 ++++-- src/ota.cpp | 7 +++++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/platformio.ini b/platformio.ini index 074837ec..9cba5684 100644 --- a/platformio.ini +++ b/platformio.ini @@ -44,7 +44,7 @@ description = Paxcounter is a device for metering passenger flows in realtime. I [common] ; for release_version use max. 10 chars total, use any decimal format like "a.b.c" -release_version = 1.9.88 +release_version = 1.9.89 ; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running! ; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose debug_level = 3 @@ -59,7 +59,7 @@ lib_deps_lora = ;MCCI LoRaWAN LMIC library@>=3.1.0 ; MCCI LMIC by Terrill Moore https://github.com/mcci-catena/arduino-lmic.git#98a1b35 lib_deps_display = - ss_oled@>=3.2.0 ; simple and small OLED lib by Larry Bank + ss_oled@3.3.0 ; simple and small OLED lib by Larry Bank BitBang_I2C@>=1.3.0 QRCode@>=0.0.1 lib_deps_matrix_display = @@ -72,7 +72,7 @@ lib_deps_sensors = Adafruit Unified Sensor@>=1.1.1 Adafruit BME280 Library@>=2.0.0 Adafruit BMP085 Library@>=1.0.1 - BSEC Software Library@>=1.5.1474 + BSEC Software Library@1.5.1474 lib_deps_basic = ArduinoJson@^5.13.1 76@>=1.2.4 ; #76 Timezone by Jack Christensen @@ -124,5 +124,5 @@ upload_protocol = esptool [env:dev] upload_protocol = esptool build_type = debug -platform = https://github.com/platformio/platform-espressif32.git +platform = https://github.com/platformio/platform-espressif32.git#develop platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git \ No newline at end of file diff --git a/src/display.cpp b/src/display.cpp index 2260fb4f..95bf30a2 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -78,9 +78,11 @@ void init_display(bool verbose) { // init display #ifndef DISPLAY_FLIP - oledInit(OLED_128x64, false, false, -1, -1, 400000L); + oledInit(OLED_128x64, false, false, -1, -1, + MY_OLED_RST == NOT_A_PIN ? -1 : MY_OLED_RST, 400000L); #else - oledInit(OLED_128x64, true, false, -1, -1, 400000L); + oledInit(OLED_128x64, true, false, -1, -1, + MY_OLED_RST == NOT_A_PIN ? -1 : MY_OLED_RST, 400000L); #endif // set display buffer diff --git a/src/ota.cpp b/src/ota.cpp index 10a9ed43..a9fa8ba2 100644 --- a/src/ota.cpp +++ b/src/ota.cpp @@ -44,10 +44,13 @@ void start_ota_update() { // init display #ifdef HAS_DISPLAY + #ifndef DISPLAY_FLIP - oledInit(OLED_128x64, ANGLE_0, false, -1, -1, 400000L); + oledInit(OLED_128x64, false, false, -1, -1, + MY_OLED_RST == NOT_A_PIN ? -1 : MY_OLED_RST, 400000L); #else - oledInit(OLED_128x64, ANGLE_FLIPY, false, -1, -1, 400000L); + oledInit(OLED_128x64, true, false, -1, -1, + MY_OLED_RST == NOT_A_PIN ? -1 : MY_OLED_RST, 400000L); #endif // set display buffer