fix(uwb_tag): turn display ON after initialization and add button wake

- Display was never turned on after display.begin() in setup()
- Added SSD1306_DISPLAYON command after initialization
- Added short button press detection to wake display
- Fixes blank display issue reported by SAUL
This commit is contained in:
Sebastien Vayrette 2026-03-18 11:17:31 -04:00
parent 61939c6d2e
commit 688a9bdbe9

View File

@ -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);