diff --git a/esp32/uwb_tag/src/main.cpp b/esp32/uwb_tag/src/main.cpp index fe48cb4..6ff653c 100644 --- a/esp32/uwb_tag/src/main.cpp +++ b/esp32/uwb_tag/src/main.cpp @@ -766,7 +766,7 @@ static void pm_update(void) { pm_enter_deep_sleep(); } } else { - g_btn_held_ms = 0; + if (g_btn_held_ms > 0 && (now - g_btn_held_ms) < 1000) { g_pm_last_activity_ms = now; display.ssd1306_command(SSD1306_DISPLAYON); } g_btn_held_ms = 0; } } @@ -969,6 +969,9 @@ void setup(void) { Serial.println("[uwb_tag] WARN: SSD1306 not found"); } else { display.clearDisplay(); + display.ssd1306_command(SSD1306_DISPLAYON); // Turn display ON! + display.ssd1306_command(SSD1306_SETCONTRAST); + display.ssd1306_command(g_cfg.display_brightness); display.setTextSize(2); display.setTextColor(SSD1306_WHITE); display.setCursor(0, 0);