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
+12 -22
View File
@@ -40,7 +40,6 @@ namespace app {
namespace alertdialog { extern const AppManifest manifest; }
namespace applist { extern const AppManifest manifest; }
namespace boot { extern const AppManifest manifest; }
namespace desktop { extern const AppManifest manifest; }
namespace files { extern const AppManifest manifest; }
namespace gpio { extern const AppManifest manifest; }
namespace display { extern const AppManifest manifest; }
@@ -48,6 +47,7 @@ namespace app {
namespace i2csettings { extern const AppManifest manifest; }
namespace imageviewer { extern const AppManifest manifest; }
namespace inputdialog { extern const AppManifest manifest; }
namespace launcher { extern const AppManifest manifest; }
namespace log { extern const AppManifest manifest; }
namespace power { extern const AppManifest manifest; }
namespace selectiondialog { extern const AppManifest manifest; }
@@ -74,7 +74,6 @@ static const std::vector<const app::AppManifest*> system_apps = {
&app::alertdialog::manifest,
&app::applist::manifest,
&app::boot::manifest,
&app::desktop::manifest,
&app::display::manifest,
&app::files::manifest,
&app::gpio::manifest,
@@ -82,6 +81,7 @@ static const std::vector<const app::AppManifest*> system_apps = {
&app::i2csettings::manifest,
&app::imageviewer::manifest,
&app::inputdialog::manifest,
&app::launcher::manifest,
&app::log::manifest,
&app::settings::manifest,
&app::selectiondialog::manifest,
@@ -104,7 +104,7 @@ static const std::vector<const app::AppManifest*> system_apps = {
static void register_system_apps() {
TT_LOG_I(TAG, "Registering default apps");
for (const auto& app_manifest: system_apps) {
for (const auto* app_manifest: system_apps) {
addApp(app_manifest);
}
@@ -113,16 +113,11 @@ static void register_system_apps() {
}
}
static void register_user_apps(const app::AppManifest* const apps[TT_CONFIG_APPS_LIMIT]) {
static void register_user_apps(const std::vector<const app::AppManifest*>& apps) {
TT_LOG_I(TAG, "Registering user apps");
for (size_t i = 0; i < TT_CONFIG_APPS_LIMIT; i++) {
const app::AppManifest* manifest = apps[i];
if (manifest != nullptr) {
addApp(manifest);
} else {
// reached end of list
break;
}
for (auto* manifest : apps) {
assert(manifest != nullptr);
addApp(manifest);
}
}
@@ -134,17 +129,12 @@ static void register_and_start_system_services() {
}
}
static void register_and_start_user_services(const service::ServiceManifest* const services[TT_CONFIG_SERVICES_LIMIT]) {
static void register_and_start_user_services(const std::vector<const service::ServiceManifest*>& services) {
TT_LOG_I(TAG, "Registering and starting user services");
for (size_t i = 0; i < TT_CONFIG_SERVICES_LIMIT; i++) {
const service::ServiceManifest* manifest = services[i];
if (manifest != nullptr) {
addService(manifest);
tt_check(service::startService(manifest->id));
} else {
// reached end of list
break;
}
for (auto* manifest : services) {
assert(manifest != nullptr);
addService(manifest);
tt_check(service::startService(manifest->id));
}
}