Trackball rewrite (#600)

- Implement generic trackball settings
- Refactor T-Deck trackball driver into generic driver at `Drivers/gpio-trackball-module`
- Automatically bind/unbind trackball devices with LVGL
- Automatically load settings for trackball devices on boot
This commit is contained in:
Ken Van Hoeylandt
2026-07-30 13:38:19 +02:00
committed by GitHub
parent de6fc3b346
commit c729e8340f
39 changed files with 1194 additions and 666 deletions
+13 -5
View File
@@ -12,8 +12,8 @@
#include <Tactility/app/AppManifestParsing.h>
#include <Tactility/app/AppRegistration.h>
#include <Tactility/file/File.h>
#include <Tactility/file/FileLock.h>
#include <Tactility/LogMessages.h>
#include <Tactility/lvgl/TrackballInit.h>
#include <Tactility/hal/SdCard.h>
#include <Tactility/network/NtpPrivate.h>
#include <Tactility/Paths.h>
@@ -34,11 +34,13 @@
#include <lvgl/widgets/toolbar.h>
#include <tactility/concurrent/thread.h>
#include <tactility/device.h>
#include <tactility/drivers/audio_stream.h>
#include <tactility/drivers/display.h>
#include <tactility/drivers/grove.h>
#include <tactility/drivers/power_supply.h>
#include <tactility/drivers/rtc.h>
#include <tactility/drivers/trackball.h>
#include <tactility/drivers/uart_controller.h>
#include <tactility/filesystem/file_mutex.h>
#include <tactility/filesystem/file_system.h>
@@ -154,9 +156,10 @@ namespace app {
namespace webserversettings { extern const AppManifest manifest; }
#if CONFIG_TT_TDECK_WORKAROUND == 1
namespace keyboardsettings { extern const AppManifest manifest; } // T-Deck only for now
#endif
#endif
namespace trackballsettings { extern const AppManifest manifest; } // T-Deck only for now
#endif
#endif
#if TT_FEATURE_SCREENSHOT_ENABLED
namespace screenshot { extern const AppManifest manifest; }
@@ -216,9 +219,12 @@ static void registerInternalApps() {
addAppManifest(app::development::manifest);
#if defined(CONFIG_TT_TDECK_WORKAROUND)
addAppManifest(app::keyboardsettings::manifest);
#endif
#endif
if (device_exists_of_type(&TRACKBALL_TYPE)) {
addAppManifest(app::trackballsettings::manifest);
#endif
#endif
}
#if defined(CONFIG_TINYUSB_MSC_ENABLED) && CONFIG_TINYUSB_MSC_ENABLED
addAppManifest(app::usbsettings::manifest);
@@ -373,6 +379,8 @@ static void onLvglStarted() {
addService(service::screenshot::manifest);
#endif
lvgl::initTrackball();
memory_print_stats();
}