aa7530e515
* **New Features** * BMI270 6-axis IMU driver added; new unified filesystem abstraction for mounted filesystems. * Public Wi‑Fi API surface (no implementation yet) * SDMMC driver added (kernel drive$) * expanded GPIO interrupt/callback support * **Improvements** * M5Stack Tab5: revamped GPIO/power initialization and IMU integration. * LVGL updates including device fontSize configuration. * Updated all code related to SD card device/fs handling * Rename LilyGO T-HMI S3 to LilyGO T-HMI * **Bug Fixes** * Simplified and consolidated SD card handling and mount discovery.
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
#include <Tactility/app/files/View.h>
|
|
#include <Tactility/app/files/State.h>
|
|
#include <Tactility/app/AppContext.h>
|
|
|
|
#include <Tactility/service/loader/Loader.h>
|
|
|
|
#include <memory>
|
|
|
|
namespace tt::app::files {
|
|
|
|
extern const AppManifest manifest;
|
|
|
|
class FilesApp final : public App {
|
|
|
|
std::unique_ptr<View> view;
|
|
std::shared_ptr<State> state;
|
|
|
|
public:
|
|
|
|
FilesApp() {
|
|
state = std::make_shared<State>();
|
|
view = std::make_unique<View>(state);
|
|
}
|
|
|
|
void onShow(AppContext& appContext, lv_obj_t* parent) override {
|
|
view->init(appContext, parent);
|
|
}
|
|
|
|
void onResult(AppContext& appContext, LaunchId launchId, Result result, std::unique_ptr<Bundle> bundle) override {
|
|
view->onResult(launchId, result, std::move(bundle));
|
|
}
|
|
|
|
void onHide(AppContext& appContext) override {
|
|
view->deinit(appContext);
|
|
}
|
|
};
|
|
|
|
extern const AppManifest manifest = {
|
|
.appId = "Files",
|
|
.appName = "Files",
|
|
.appCategory = Category::System,
|
|
.appFlags = AppManifest::Flags::Hidden,
|
|
.createApp = create<FilesApp>
|
|
};
|
|
|
|
void start() {
|
|
app::start(manifest.appId);
|
|
}
|
|
|
|
} // namespace
|