Merge develop into main (#150)

- Update `Configuration` to use C++ vector instead of C arrays
- Rename `Desktop` app to `Launcher`
- Fix for hard-coded app start of `Launcher` and `CrashDiagnostics` apps.
- Ensure `Launcher` icons are clickable, even if they're not loading.
- Don't show error scenario for SD card in statusbar when SD card status is unknown (this happens during Mutex timeout due to LVGL rendering delays)
- Cleanup deprecated `Mutex` methods.
- `hal::getConfiguration()` now returns a pointer instead of a reference, just like `tt:getConfiguration()`
This commit is contained in:
Ken Van Hoeylandt
2025-01-07 21:57:03 +01:00
committed by GitHub
parent 415096c3b2
commit 4f360741a1
25 changed files with 107 additions and 200 deletions
@@ -132,20 +132,19 @@ static const char* getSdCardStatusIcon(hal::SdCard::State state) {
}
static void updateSdCardIcon(const service::Paths* paths, const std::shared_ptr<ServiceData>& data) {
auto sdcard = tt::hal::getConfiguration().sdcard;
auto sdcard = tt::hal::getConfiguration()->sdcard;
if (sdcard != nullptr) {
auto state = sdcard->getState();
const char* desired_icon = getSdCardStatusIcon(state);
if (data->sdcard_last_icon != desired_icon) {
if (desired_icon != nullptr) {
if (state != hal::SdCard::StateUnknown) {
auto* desired_icon = getSdCardStatusIcon(state);
if (data->sdcard_last_icon != desired_icon) {
auto icon_path = paths->getSystemPathLvgl(desired_icon);
lvgl::statusbar_icon_set_image(data->sdcard_icon_id, icon_path);
lvgl::statusbar_icon_set_visibility(data->sdcard_icon_id, true);
} else {
lvgl::statusbar_icon_set_visibility(data->sdcard_icon_id, false);
data->sdcard_last_icon = desired_icon;
}
data->sdcard_last_icon = desired_icon;
}
// TODO: Consider tracking how long the SD card has been in unknown status and then show error
}
}