Merge develop into main (#339)

- Update ILI9341 driver to v2.0.1
- Lots of code cleanup for apps
- Refactor app "type" into "category" and added flags to the manifest (for show/hide statusbar and for hidden apps)
- Rename some ElfApp-related functionality and improved the way the static data was managed
- Rename "filebrowser" to "files"
- Added cstring functions to tt_init.cpp
- Minor fix in Boot app
- Updated external apps for SDK changes
This commit is contained in:
Ken Van Hoeylandt
2025-09-17 23:42:49 +02:00
committed by GitHub
parent a2af95b92d
commit faab6d825f
82 changed files with 349 additions and 360 deletions
+13 -19
View File
@@ -1,9 +1,9 @@
#include "Tactility/app/AppContext.h"
#include "Tactility/app/AppManifest.h"
#include "Tactility/app/timezone/TimeZone.h"
#include "Tactility/lvgl/Toolbar.h"
#include "Tactility/lvgl/LvglSync.h"
#include "Tactility/service/loader/Loader.h"
#include <Tactility/app/AppContext.h>
#include <Tactility/app/AppManifest.h>
#include <Tactility/app/timezone/TimeZone.h>
#include <Tactility/lvgl/Toolbar.h>
#include <Tactility/lvgl/LvglSync.h>
#include <Tactility/service/loader/Loader.h>
#include <Tactility/MountPoints.h>
#include <Tactility/StringUtils.h>
@@ -15,9 +15,8 @@
namespace tt::app::timezone {
constexpr auto* TAG = "TimeZone";
#define RESULT_BUNDLE_CODE_INDEX "code"
#define RESULT_BUNDLE_NAME_INDEX "name"
constexpr auto* RESULT_BUNDLE_CODE_INDEX = "code";
constexpr auto* RESULT_BUNDLE_NAME_INDEX = "name";
extern const AppManifest manifest;
@@ -113,14 +112,6 @@ class TimeZoneApp final : public App {
lv_obj_add_event_cb(btn, &onListItemSelectedCallback, LV_EVENT_SHORT_CLICKED, (void*)index);
}
static void updateTimerCallback() {
auto appContext = getCurrentAppContext();
if (appContext != nullptr && appContext->getManifest().id == manifest.id) {
auto app = std::static_pointer_cast<TimeZoneApp>(appContext->getApp());
app->updateList();
}
}
void readTimeZones(std::string filter) {
auto path = std::string(file::MOUNT_POINT_SYSTEM) + "/timezones.csv";
auto* file = fopen(path.c_str(), "rb");
@@ -228,14 +219,17 @@ public:
}
void onCreate(AppContext& app) override {
updateTimer = std::make_unique<Timer>(Timer::Type::Once, [] { updateTimerCallback(); });
updateTimer = std::make_unique<Timer>(Timer::Type::Once, [this] {
updateList();
});
}
};
extern const AppManifest manifest = {
.id = "TimeZone",
.name = "Select timezone",
.type = Type::Hidden,
.category = Category::System,
.flags = AppManifest::Flags::Hidden,
.createApp = create<TimeZoneApp>
};