This commit is contained in:
Ken Van Hoeylandt 2026-08-09 00:00:26 +02:00
parent 24860be671
commit e618086590

View File

@ -68,8 +68,15 @@ std::string getBootAssetsPath(const std::string& childPath) {
}
void setupDisplay() {
// TODO: Support for multiple displays
Device* display = nullptr;
if (device_get_first_by_type(&DISPLAY_TYPE, &display) == ERROR_NONE) {
if (device_get_first_by_type(&DISPLAY_TYPE, &display) != ERROR_NONE) {
LOG_I(TAG, "No kernel display");
return;
}
// Set backlight brightness
Device* backlight;
if (display_get_backlight(display, &backlight) == ERROR_NONE) {
if (!device_is_ready(backlight)) {
@ -92,10 +99,8 @@ void setupDisplay() {
} else {
LOG_I(TAG, "No backlight for %s", display->name);
}
device_put(display);
} else {
LOG_I(TAG, "No kernel display");
}
}
bool setupUsbBootMode() {
@ -253,7 +258,6 @@ void runBootSequence(TickType_t startTime) {
// This works with 5 ms on a T-Lora Pager, so we give it 10 ms to be safe
delay_millis(10);
// TODO: Support for multiple displays
LOG_I(TAG, "Setup display");
setupDisplay();
LOG_I(TAG, "Prepare file systems");