Boot splash and more (#98)

* Boot splash and more

- Added developer sdkconfig
- Refactored the way FreeRTOS includes are included
- Improved Gui/Loader logic
- Implemented boot app with splash screen

* Updated naming for Gui and Loader services

* Renamed Screenshot service methods

* Renames

* Service renames
This commit is contained in:
Ken Van Hoeylandt
2024-11-30 15:37:16 +01:00
committed by GitHub
parent 3f62ec2efa
commit 0188ce721c
60 changed files with 726 additions and 307 deletions
@@ -8,7 +8,7 @@
#include "service/loader/Loader.h"
#include "lvgl/LvglSync.h"
namespace tt::service::screenshot {
namespace tt::service::screenshot::task {
#define TAG "screenshot_task"
@@ -39,7 +39,7 @@ static void task_unlock(ScreenshotTaskData* data) {
tt_check(tt_mutex_release(data->mutex) == TtStatusOk);
}
ScreenshotTask* task_alloc() {
ScreenshotTask* alloc() {
auto* data = static_cast<ScreenshotTaskData*>(malloc(sizeof(ScreenshotTaskData)));
*data = (ScreenshotTaskData) {
.thread = nullptr,
@@ -49,10 +49,10 @@ ScreenshotTask* task_alloc() {
return data;
}
void task_free(ScreenshotTask* task) {
void free(ScreenshotTask* task) {
auto* data = static_cast<ScreenshotTaskData*>(task);
if (data->thread) {
task_stop(data);
stop(data);
}
}
@@ -98,7 +98,7 @@ static int32_t screenshot_task(void* context) {
break; // Interrupted loop
}
} else if (data->work.type == TASK_WORK_TYPE_APPS) {
app::App* _Nullable app = loader::get_current_app();
app::App* _Nullable app = loader::getCurrentApp();
if (app) {
const app::Manifest& manifest = app->getManifest();
if (manifest.id != last_app_id) {
@@ -136,7 +136,7 @@ static void task_start(ScreenshotTaskData* data) {
task_unlock(data);
}
void task_start_apps(ScreenshotTask* task, const char* path) {
void startApps(ScreenshotTask* task, const char* path) {
tt_check(strlen(path) < (SCREENSHOT_PATH_LIMIT - 1));
auto* data = static_cast<ScreenshotTaskData*>(task);
task_lock(data);
@@ -151,7 +151,7 @@ void task_start_apps(ScreenshotTask* task, const char* path) {
task_unlock(data);
}
void task_start_timed(ScreenshotTask* task, const char* path, uint8_t delay_in_seconds, uint8_t amount) {
void startTimed(ScreenshotTask* task, const char* path, uint8_t delay_in_seconds, uint8_t amount) {
tt_check(strlen(path) < (SCREENSHOT_PATH_LIMIT - 1));
auto* data = static_cast<ScreenshotTaskData*>(task);
task_lock(data);
@@ -168,7 +168,7 @@ void task_start_timed(ScreenshotTask* task, const char* path, uint8_t delay_in_s
task_unlock(data);
}
void task_stop(ScreenshotTask* task) {
void stop(ScreenshotTask* task) {
auto* data = static_cast<ScreenshotTaskData*>(task);
if (data->thread != nullptr) {
task_lock(data);