Merge develop into main branch (#137)

* SdCard HAL refactored (#135)

- Refactor SdCard HAL
- introduce Lockable

* Screenshot and FatFS improvements (#136)

- Fix screenshots on ESP32
- Improve Screenshot service
- Convert Screenshot app to class-based instead of structs
- Screenshot app now automatically updates when task is finished
- Enable FatFS long filename support

* Re-use common log messages (#138)

For consistency and binary size reduction

* Toolbar spinner should get margin to the right

* More TactilityC features (#139)

* Rewrote Loader

- Simplified Loader by removing custom threa
- Created DispatcherThread
- Move auto-starting apps to Boot app
- Fixed Dispatcher bug where it could get stuck not processing new
messages

* Hide AP settings if the AP is not saved

* Missing from previous commit

* Replace LV_EVENT_CLICKED with LV_EVENT_SHORT_CLICKED

* Refactored files app and created InputDialog (#140)

- Changed Files app so that it has a View and State
- Files app now allows for long-pressing on files to perform actions
- Files app now has rename and delete actions
- Created InputDialog app
- Improved AlertDialog app layout
This commit is contained in:
Ken Van Hoeylandt
2024-12-27 22:12:39 +00:00
committed by GitHub
parent 9033daa6dd
commit 50bd6e8bf6
144 changed files with 3244 additions and 2038 deletions
+27 -8
View File
@@ -4,29 +4,33 @@
#include "app/AppContext.h"
#include "app/display/DisplaySettings.h"
#include "hal/Display.h"
#include "kernel/PanicHandler.h"
#include "service/loader/Loader.h"
#include "lvgl/Style.h"
#include "lvgl.h"
#include "Tactility.h"
#ifdef ESP_PLATFORM
#include "kernel/PanicHandler.h"
#include "sdkconfig.h"
#else
#define CONFIG_TT_SPLASH_DURATION 0
#endif
#define TAG "Boot"
namespace tt::app::boot {
static int32_t threadCallback(void* context);
static int32_t bootThreadCallback(void* context);
static void startNextApp();
struct Data {
Data() : thread("boot", 4096, threadCallback, this) {}
Data() : thread("boot", 4096, bootThreadCallback, this) {}
Thread thread;
};
static int32_t threadCallback(TT_UNUSED void* context) {
static int32_t bootThreadCallback(TT_UNUSED void* context) {
TickType_t start_time = tt::kernel::getTicks();
auto* lvgl_display = lv_display_get_default();
@@ -46,18 +50,33 @@ static int32_t threadCallback(TT_UNUSED void* context) {
}
tt::service::loader::stopApp();
startNextApp();
return 0;
}
static void startNextApp() {
auto config = tt::getConfiguration();
std::string next_app;
if (config->autoStartAppId) {
TT_LOG_I(TAG, "init auto-starting %s", config->autoStartAppId);
next_app = config->autoStartAppId;
} else {
next_app = "Desktop";
}
#ifdef ESP_PLATFORM
esp_reset_reason_t reason = esp_reset_reason();
if (reason == ESP_RST_PANIC) {
tt::service::loader::startApp("CrashDiagnostics");
} else {
tt::service::loader::startApp("Desktop");
tt::service::loader::startApp(next_app);
}
#else
tt::service::loader::startApp("Desktop");
tt::service::loader::startApp(next_app);
#endif
return 0;
}
static void onShow(TT_UNUSED AppContext& app, lv_obj_t* parent) {