do i2cscan earlier in main.cpp

This commit is contained in:
Klaus K Wilting committed 2020-05-09 13:41:19 +02:00
1 parent c4c817828e
commit 2a7c020e1b
1 file changed
+3 -3
+3 -3
View File
@@ -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");