Ken Van Hoeylandt 7ea8c346b0
Various improvements (#673)
Graphics & rendering

- Implement `binfont-module` to generate bitmap fonts on the device itself
- Remove lodepng support from LVGL library and create `Modules/lodepng-module` to make the feature re-usable in non-LVGL apps too. Add binding functions for LVGL support.
- Implement large icons for boot screen (Tactility and USB logos)
- Remove unused asset files in `Data/`

Boot

- Split up `Tactility.cpp` and its `run()` function into various `Init*.cpp` files.
- Re-implement `Boot.cpp` app as non-LVGL app
- Boot app now has a `BootSequence.cpp` for the init code.
- LVGL is now started when the Boot app finishes
- Move more init logic into Boot app

BLE

- Don't allocate scan result buffers unless BLE is on
- Allocate scan results in external memory if possible

UX & UI

- USB Settings app: remove border from the button container
2026-10-04 18:09:21 +02:00

55 lines
1.3 KiB
C++

#ifdef ESP_PLATFORM
#include <sdkconfig.h>
#include <Tactility/InitEsp.h>
#endif
#include <Tactility/Tactility.h>
#include <Tactility/TactilityPrivate.h>
#include <Tactility/bluetooth/Bluetooth.h>
#include <Tactility/file/File.h>
#include <Tactility/hal/SdCard.h>
#include <Tactility/network/NtpPrivate.h>
#include <Tactility/settings/TimePrivate.h>
#include <tactility/kernel_init.h>
#include <tactility/log.h>
#include <tactility/paths.h>
namespace tt {
constexpr auto* TAG = "Tactility";
void prepareFileSystems() {
char temp_path[FILE_MAX_PATH_STRING_LENGTH];
if (paths_get_temp_path(temp_path, sizeof(temp_path)) != ERROR_NONE) {
LOG_E(TAG, "Failed to determine temp path");
return;
}
if (!file::findOrCreateDirectory(temp_path, 0777)) {
LOG_E(TAG, "Failed to create %s", temp_path);
}
}
bool init(Module* const dtsModules[], const DtsDevice dtsDevices[]) {
LOG_I(TAG, "Tactility v%s on %s (%s)", TT_VERSION, CONFIG_TT_DEVICE_NAME, CONFIG_TT_DEVICE_ID);
LOG_I(TAG, "Initializing kernel");
if (kernel_init(dtsModules, dtsDevices) != ERROR_NONE) {
LOG_E(TAG, "Failed to initialize kernel");
return false;
}
initModules();
#ifdef ESP_PLATFORM
initEsp();
#endif
startBootApp();
return true;
}
} // namespace