- WiFi Connect app is now hidden by default, but accessible at the bottom of the WiFi Manage app when WiFi is turned on. - WiFi service now turns on WiFi when calling connect() and WiFi is not on. - Removed `blocking` option for `service::loader::startApp()`. This feature was unused and complex. - Various apps: Moved private headers into Private/ folder. - Various apps: created start() function for easy starting. - Added documentation to all TactilityC APIs - Refactored various `enum` into `class enum` - Refactor M5Stack `initBoot()` (but VBus is still 0V for some reason)
32 lines
695 B
C++
32 lines
695 B
C++
#include "TactilityConfig.h"
|
|
|
|
#if TT_FEATURE_SCREENSHOT_ENABLED
|
|
|
|
#include "app/screenshot/ScreenshotUi.h"
|
|
#include <memory>
|
|
|
|
namespace tt::app::screenshot {
|
|
|
|
static void onShow(AppContext& app, lv_obj_t* parent) {
|
|
auto ui = std::static_pointer_cast<ScreenshotUi>(app.getData());
|
|
ui->createWidgets(app, parent);
|
|
}
|
|
|
|
static void onStart(AppContext& app) {
|
|
auto ui = std::make_shared<ScreenshotUi>();
|
|
app.setData(ui); // Ensure data gets deleted when no more in use
|
|
}
|
|
|
|
extern const AppManifest manifest = {
|
|
.id = "Screenshot",
|
|
.name = "Screenshot",
|
|
.icon = LV_SYMBOL_IMAGE,
|
|
.type = TypeSystem,
|
|
.onStart = onStart,
|
|
.onShow = onShow,
|
|
};
|
|
|
|
} // namespace
|
|
|
|
#endif
|