Fixes and improvements (#620)
- Standardized keyboard input using Unicode-based key codes across supported devices and the simulator. Keyboards don't emit `LV_KEY_*` anymore. - Refactored lilygo encoder driver into a reusable GPIO rotary encoder driver (see `Drivers/gpio-encoder-module/`). Added more features to the config file. - Improved LVGL keyboard device management, including duplicate prevention and reliable reconnects. - LVGL file mutex now registers with lvgl start/stop - Improved LVGL startup/shutdown stability and memory allocation reliability. - Increased simulator LVGL memory capacity and improved USB device-class handling.
This commit is contained in:
committed by
GitHub
parent
4fea48f433
commit
db48dfe812
@@ -74,6 +74,7 @@ constexpr auto* TAG = "Tactility";
|
||||
static DispatcherHandle_t mainDispatcherHandle = dispatcher_alloc();
|
||||
|
||||
void initFileMutexForLvgl();
|
||||
void deinitFileMutexForLvgl();
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -423,6 +424,8 @@ static void applySavedTouchCalibration() {
|
||||
#endif // CONFIG_TT_TOUCH_CALIBRATION_SUPPORTED
|
||||
|
||||
static void onLvglStarted() {
|
||||
initFileMutexForLvgl();
|
||||
|
||||
window_manager_configure(windowManagerScreenInit);
|
||||
check(module_ensure_started(&lvgl_window_manager_module) == ERROR_NONE);
|
||||
|
||||
@@ -453,6 +456,8 @@ static void onLvglStarted() {
|
||||
}
|
||||
|
||||
static void onLvglStopped() {
|
||||
deinitFileMutexForLvgl();
|
||||
|
||||
if (softwareKeyboard.object != nullptr) {
|
||||
lvgl_software_keyboard_destruct(&softwareKeyboard);
|
||||
}
|
||||
@@ -510,9 +515,6 @@ void run(Module* const dtsModules[], const DtsDevice dtsDevices[]) {
|
||||
|
||||
registerAndStartServices();
|
||||
|
||||
// Must start right before LVGL
|
||||
initFileMutexForLvgl();
|
||||
|
||||
lvgl_module_configure((LvglModuleConfig) {
|
||||
.on_start = onLvglStarted,
|
||||
.on_stop = onLvglStopped,
|
||||
|
||||
Reference in New Issue
Block a user