mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-21 01:15:05 +00:00
Cleanup
This commit is contained in:
parent
24860be671
commit
e618086590
@ -68,8 +68,15 @@ std::string getBootAssetsPath(const std::string& childPath) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setupDisplay() {
|
void setupDisplay() {
|
||||||
|
// TODO: Support for multiple displays
|
||||||
|
|
||||||
Device* display = nullptr;
|
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;
|
Device* backlight;
|
||||||
if (display_get_backlight(display, &backlight) == ERROR_NONE) {
|
if (display_get_backlight(display, &backlight) == ERROR_NONE) {
|
||||||
if (!device_is_ready(backlight)) {
|
if (!device_is_ready(backlight)) {
|
||||||
@ -92,10 +99,8 @@ void setupDisplay() {
|
|||||||
} else {
|
} else {
|
||||||
LOG_I(TAG, "No backlight for %s", display->name);
|
LOG_I(TAG, "No backlight for %s", display->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
device_put(display);
|
device_put(display);
|
||||||
} else {
|
|
||||||
LOG_I(TAG, "No kernel display");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool setupUsbBootMode() {
|
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
|
// This works with 5 ms on a T-Lora Pager, so we give it 10 ms to be safe
|
||||||
delay_millis(10);
|
delay_millis(10);
|
||||||
|
|
||||||
// TODO: Support for multiple displays
|
|
||||||
LOG_I(TAG, "Setup display");
|
LOG_I(TAG, "Setup display");
|
||||||
setupDisplay();
|
setupDisplay();
|
||||||
LOG_I(TAG, "Prepare file systems");
|
LOG_I(TAG, "Prepare file systems");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user