From 2a7c020e1b611a20255643e356b787b4296dcb10 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sat, 9 May 2020 13:41:19 +0200 Subject: [PATCH] do i2cscan earlier in main.cpp --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3d83ebce..b4b1ee5c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -193,6 +193,9 @@ void setup() { // read (and initialize on first run) runtime settings from NVRAM loadConfig(); // includes initialize if necessary + // now that we are powered, we scan i2c bus for devices + i2c_scan(); + // initialize display #ifdef HAS_DISPLAY strcat_P(features, " OLED"); @@ -201,9 +204,6 @@ void setup() { dp_init(RTC_runmode == RUNMODE_POWERCYCLE ? true : false); #endif - // scan i2c bus for devices - i2c_scan(); - #ifdef BOARD_HAS_PSRAM assert(psramFound()); ESP_LOGI(TAG, "PSRAM found and initialized");