45 Commits

Author SHA1 Message Date
Ken Van Hoeylandt
50007ea9ed
Merge develop into main (#307)
## Launcher

- Launcher now has optional power button to show
- Launcher layout improvements
- Removed text from Launcher (translations with larger amounts of text did not fit small device formats)

## T-Lora Pager

- Implement power off (created `BQ25896` driver)
- Implemented haptics (created `DRV2605` driver project) and buzz on startup
- Reversed scroll wheel
- Created `TloraEncoder` device and relocated its logic from `TloraKeyboard`
- Disabled SPIRAM test to save 0.5 seconds of boot time (current boot time is very slow)
- Update `ST7796` esp_lcd driver to v1.3.4
- Fixed keyboard bug: delete queue in destructor
- Fixed driver dependencies: Avoiding usage of global static shared_ptr. Properly constructor-inject everywhere, or use `tt::hal::findDevices()`
- I2C configuration is now immutable (you cannot disable it anymore from the I2C Settings app, as it would break crucial drivers)
- Renamed I2C and UART subsystems to "Internal"

## Drivers

- On/off interface added to `PowerDevice`
- Created `tt::hal::Configuration.createDevices`, which is intended to replace all custom create calls for display, keyboard, etc.
- Created `EncoderDevice` as a `Device` subtype

## Other Improvements

- Changed `findDevices(type, function)` into a templatized function.
- Improved SD card mounting

## Fixes

- Show Screenshot app again
- Fixed Statusbar: some updates were allowed to time out and fail silently: When the Statusbar service would do a state update, the LVGL statusbar would never get updated due to this timeout.
- Fixed memory leaks in all `createSdCard()` functions (in most board implementations)
2025-08-30 21:54:55 +02:00
Ken Van Hoeylandt
d875ade8cb
Touch and display driver subsystems reworked (and more) (#302)
- Refactored `TouchDevice`: it can now start/stop LVGL separately, and it has an optional `TouchDriver` interface
- Refactored `DisplayDevice`: it can now start/stop LVGL separately, and it has an optional `DisplayDriver` interface
- Updated all boards and drivers for above changes
- LVGL can now be stopped and (re)started on the fly
- Fixed issues with restarting Gui and Statusbar services
- Refactored `Gui` service to be class and renamed `Gui` to `GuiService`
- Fixed `Statusbar` service: forgot to deregister one of the icons
- Updated `esp_lcd_st7701` to v1.1.3
- `lv_textarea_create()` now automatically registers the hardware keyboard hooks (by wrapping the function)
- Fixed and updated `tactility.py`
- Cleanup of a lot of code
- `BootInitLvglBegin` and `BootInitLvglEnd` are replaced by `LvglStarted` and `LvglStopped`.
- Introduced `tt::service::State` which is accessible via `tt::service::getState()` (and internally via `ServiceInstance`)
- Started replacing `#define TAG` with `constexpr auto TAG = "..";`
2025-08-16 20:22:49 +02:00
Ken Van Hoeylandt
efd3dc43ed
Revert "Updated screenshots and .gitignore of HelloWorld (#291)" (#292)
This reverts commit 6de0f442fbe44ed26ace8aadbe4e242178e22186.
2025-06-15 13:50:29 +02:00
Ken Van Hoeylandt
6de0f442fb
Updated screenshots and .gitignore of HelloWorld (#291)
* T-Deck Pro work in progress

* Add .gitignore to HelloWorld
2025-06-15 13:49:00 +02:00
Ken Van Hoeylandt
3f1bfee3f5
Various improvements (#264)
- Replace C function pointers with C++ `std::function` in `Thread`, `Timer` and `DispatcherThread`
- Rename `SystemEvent`-related functions
- WiFi: fix auto-connect when WiFi disconnects from bad signal
- WiFi: fix auto-connect when WiFi fails to auto-connect
- WiFi: implement disconnect() when tapping connected WiFi ap in WiFi management app
2025-03-30 21:59:31 +02:00
Ken Van Hoeylandt
d0ca3b16f8
GPS refactored (#262)
- Refactored GPS service and HAL: GPS is no longer part of the HAL configuration. You can now add configure new GPS devices from the GPS settings app.
- T-Deck adds a boot hook to check if a GPS configuration exists and adds it when the config is empty.
- Implemented the concept of ObjectFile to read/write arrays of a raw data type (e.g. struct) to disk.
- Implemented more file utils (e.g. to create all directories of a path)
2025-03-30 01:14:22 +01:00
Ken Van Hoeylandt
f85d0239ff
Board implementations and fixes (#247)
- Implemented Elecrow Crowpanel Basic 5.0"
- Implemented Elecrow Crowpanel Advance 5.0"
- Implemented CYD 2432S032C
- Fix for CYD 4848S040C rendering drift (lower transfer speed)
- Fix for SD card locking mechanism for various boards
2025-03-14 22:37:09 +01:00
Ken Van Hoeylandt
83a82be901
Simplify I2C and SPI code (#237) 2025-02-26 17:47:19 +01:00
Ken Van Hoeylandt
b85ef7a2e7
UART refactored (#236)
`Uart` is now an abstract class with a `UartEsp` and a `UartPosix` implementation.
2025-02-26 17:13:37 +01:00
Ken Van Hoeylandt
b14887d5fb
New board: Elecrow CrowPanel Advance 3.5" (#231)
- Implement CrowPanel Advance 3.5"
- New driver subproject: ILI9488
- New driver subproject: GT911
- Refactor T-Deck to use new driver subproject
- Fix for `flash.ps1`: don't set flash speed
2025-02-22 19:09:15 +01:00
Ken Van Hoeylandt
ee88a563dc
Fix for display settings (#229) 2025-02-22 16:39:17 +01:00
Ken Van Hoeylandt
933bc5fb97
Driver improvements (#226)
- Created driver subprojects: `FT5x06`, `FT6x36`, `CST816S`.
- Refactored existing projects to use new drivers.
- Improve `PwmBacklight` driver: expose frequency, channel id and timer id
- Update `build-and-release-all.sh` for recent board addition
2025-02-20 22:41:56 +01:00
Ken Van Hoeylandt
0563e42dc9
New board: Elecrow CrowPanel Avance 2.8" (#224)
- Added new board
- Extracted ST7789 driver and backlight PWM driver into separate subprojects
- Refactored T-Deck to use the shared driver modules
- Fix bug in WiFi service: searching for APs was broken
2025-02-19 21:01:13 +01:00
Ken Van Hoeylandt
5055fa7822
Improved GPS Settings app and GPS service (#222)
- Fixes and improvements to `GpsSettings` app, `GpsDevice` and `GpsService`
- Implemented location/GPS statusbar icon
- Added app icon
- Added support for other GPS models (based on Meshtastic code)
2025-02-18 22:07:37 +01:00
Ken Van Hoeylandt
ad2cad3bf1
Renamed getLvglSyncLock() to getSyncLock() (#221) 2025-02-14 00:06:52 +01:00
Ken Van Hoeylandt
55bfb9fe3b
Lockable renamed to Lock (#219)
Also changed usage from unique_ptr to class value.
2025-02-12 22:28:22 +01:00
Ken Van Hoeylandt
14e459e50f
GPS implementation (#216)
Implemented basic GPS support:
- GPS HAL
- GPS Service
- GPS Settings app
2025-02-11 23:46:52 +01:00
Ken Van Hoeylandt
2345ba6d13
HAL renaming & relocation (#215)
Implemented more consistent naming:
- Moved all HAL devices into their own namespace (and related folder)
- Post-fixed all HAL device names with "Device"
2025-02-09 16:48:23 +01:00
Ken Van Hoeylandt
fd1e31dec4
Fix serial config for T-Deck (#213)
Port 0 clashed with the serial monitor and affected performance.
2025-02-09 00:00:14 +01:00
Ken Van Hoeylandt
c5fc8790bb
Implement UART HAL (#212)
- Implement UART HAL
- Improved I2C and SPI HAL mocking mechanism (removed mock files)
2025-02-08 23:10:31 +01:00
Ken Van Hoeylandt
c74006f8b6
Created Drivers folder with ILI934x subproject (#209)
Refactored all existing boards to re-use the ILI934x driver code.
2025-02-08 18:54:09 +01:00
Ken Van Hoeylandt
8ccba15c25
Simplify LVGL init: move code into Tactility (#208)
The esp_lvgl_port code was duplicated across all boards, so I moved it into the Tactility subproject to simplify the board implementations.
2025-02-08 17:06:16 +01:00
Ken Van Hoeylandt
c1f55429b6
SPI HAL implemented and more (#207)
- Cleanup unused code and move ISR/IRQ checks to `Kernel.h`
- Improve clang-format
- Fix for LVGL lock transfer: ensure lock isn't activate when changing the lock
- Implement SPI HAL
- Remove `initHardware` HAL configuration entry
- Fix `I2cScanner`: don't scan when port isn't started
2025-02-08 00:21:50 +01:00
Ken Van Hoeylandt
5ec96f60f1
Performance improvements (#203)
- Use DMA buffers for drawing
- Fix for draw buffer sizes
- Reduced rendering refresh interval
- Removed custom icons from wifi app to fix scroll performance issue
2025-02-02 23:02:50 +01:00
Ken Van Hoeylandt
cff0605b0a
Implement device management (#199)
- Added `tt::hal::Device` and functions (de)register devices and search for them.
- Refactored apps: `Power` and `Display` settings apps now use the device API to find devices.
- Implemented the new API for all existing drivers for all devices, including the simulator.
- Updated HAL Configuration to return `std::shared_ptr` instead of raw pointers.
- Added test project for headless tests and implemented tests for the new code.
2025-02-02 15:16:51 +01:00
Ken Van Hoeylandt
c87200a80d
Project restructuring (fixes macOS builds) (#198)
- Create `Include/` folder for all main projects
- Fix some issues here and there (found while moving things)
- All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
2025-02-01 18:13:20 +01:00
Ken Van Hoeylandt
6c67845645
Cleanup and improvements (#194)
- Lots of changes for migrating C code to C++
- Improved `Lockable` in several ways like adding `withLock()` (+ tests)
- Improved `Semaphore` a bit for improved readability, and also added some tests
- Upgrade Linux machine in GitHub Actions so that we can compile with a newer GCC
- Simplification of WiFi connection
- Updated funding options
- (and more)
2025-01-28 17:39:58 +01:00
Ken Van Hoeylandt
1bb1260ea0
Update to ESP-IDF v5.4 and fix warnings (#193)
- Update to ESP-IDF v5.4
- Fixed a lot of new and existing warnings
- Fix issue with incorrect `EventFlag` usage in Dispatcher
2025-01-26 15:52:57 +01:00
Ken Van Hoeylandt
d86dc40472
Fixes and improvements (#185)
- unPhone improvements related to power and boot (add boot count logging)
- Cleanup of Mutex acquire/release
- Removed `tt_assert()` in favour of `assert()`
- Fix sim build (likely failed due to migration of GitHub Actions to Ubuntu 24.04)
2025-01-24 22:49:29 +01:00
Ken Van Hoeylandt
12a9839420
Various fixes and improvements (#177)
- Remove custom `ESP_TARGET` and use `ESP_PLATFORM` everywhere
- Add `Loader` service functionality to `tt::app::` namespace
- Make `Loader` `PubSub` usable by exposing the messages
- Add board type to crash log
- Don't show SD card in Files app when it's not mounted
- Set default SPI frequency for SD cards
- Move TT_VERSION to scope that works for sim too
- Log Tactility version and board on boot
- Rename "Yellow Board" to "CYD 2432S024C"
2025-01-21 21:55:54 +01:00
Ken Van Hoeylandt
72230129bb
unPhone implementation and more (#169)
- Implemented [unPhone](https://unphone.net/) v9 board
- Updated `.clang-format` to better reflect the intended code style
- Fix SD card compatibility issues for all boards (frequency wasn't set well)
- Moved `I2cDevice` class from CoreS3 board project to TactilityHeadless project
- Tactility configuration now has default empty lists for apps and services fields
- Fix for Launcher app: we don't need padding when showing it vertically
- Fix for I2cDevice read/write calls that checked for `esp_err_t` instead of `bool`
- Fix for TinyUSB init that checked for `esp_err_t` instead of `bool`
2025-01-19 16:57:00 +01:00
Ken Van Hoeylandt
3ea02d912f
Merge develop into main (#167)
- WiFi Connect app is now hidden by default, but accessible at the bottom of the WiFi Manage app when WiFi is turned on.
- WiFi service now turns on WiFi when calling connect() and WiFi is not on.
- Removed `blocking` option for `service::loader::startApp()`. This feature was unused and complex.
- Various apps: Moved private headers into Private/ folder.
- Various apps: created start() function for easy starting.
- Added documentation to all TactilityC APIs
- Refactored various `enum` into `class enum`
- Refactor M5Stack `initBoot()` (but VBus is still 0V for some reason)
2025-01-17 19:37:42 +01:00
Ken Van Hoeylandt
43c78c69d8
Thread, Timer and flash.sh improvements (#165)
- Various improvements to Thread and Timer:
  - Remove "mark as static" option as it is unused
  - Implemented core pinning for ESP32 platforms
  - Use `TickType_t` consistently (instead of `uint32_t`)
  - Use `enum class` instead of `enum`
- Fix for `flash.sh` not working when using `pip` to install `esptool`
2025-01-13 20:20:43 +01:00
Ken Van Hoeylandt
bf91e7530d
Time & date, system events and much more (#152)
## Time & Date
- Added time to statusbar widget
- Added Time & Date Settings app
- Added TimeZone app for selecting TimeZone
- Added `tt::time` namespace with timezone code

## Other changes

- Added `SystemEvent` to publish/subscribe to system wide (e.g. for init code, but also for time settings changes)
- Changed the way the statusbar widget works: now there's only 1 that gets shown/hidden, instead of 1 instance per app instance.
- Moved `lowercase()` function to new namespace: `tt::string`
- Increased T-Deck flash & PSRAM SPI frequencies to 120 MHz (from 80 MHz)
- Temporary work-around (+ TODO item) for LVGL stack size (issue with WiFi app)
- Suppress T-Deck keystroke debugging to debug level (privacy issue)
- Improved SDL dependency wiring in various `CMakeLists.txt`
- `Loader` service had some variables renamed to the newer C++ style (from previous C style)
2025-01-10 23:44:32 +01:00
Ken Van Hoeylandt
7187e5e49e
Improve I2C locking and implement I2C for TactilityC (#147)
I2C:
- Lock timeout set to reasonable times
- Check lock status in all functions
- Refactor lock/unlock to return `bool` values
- Implement functions in TactilityC
Other:
- Updated screenshots
2025-01-03 23:39:23 +01:00
Ken Van Hoeylandt
ec90198dbf
Upgrade to ESP-IDF 5.3.2 (#145)
This also fixes the touch driver issue.
I also fixed an unrelated touch driver cleanup issue.
2025-01-02 22:04:20 +01:00
Ken Van Hoeylandt
9581978fc7
Re-implement Core2 and other improvements (#141)
- Create real drivers instead of wrapping M5Unified/M5GFX
- Display HAL improvements (better default base class behaviour)
- Fixed bug with LVGL statusbar service locking (would hang indefinitely waiting for mutex, causing WDT issues)
- Fixes for `Critical.h`
- Fixes and improvements for `Dispatcher` and `DispatcherThread`
2024-12-30 14:17:47 +01:00
Ken Van Hoeylandt
50bd6e8bf6
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
2024-12-27 23:12:39 +01:00
Ken Van Hoeylandt
da3a93ce73
Display driver simplified and implemented gamma (#133) 2024-12-18 16:43:41 +01:00
Ken Van Hoeylandt
80b69b7f45
Update LVGL (master 9.2+) and related libraries (#130)
- LVGL 9.2+ (master commit)
- esp_lvgl_port (master with my PR hotfix changes)
- espressif/esp_lcd_touch_gt911 1.1.1~2
2024-12-16 23:30:57 +01:00
Ken Van Hoeylandt
51c6aaa428
Implement crash handler and diagnostics app (#119) 2024-12-12 22:38:48 +01:00
Ken Van Hoeylandt
da81256622
Power improvements (#114) 2024-12-09 21:58:30 +01:00
Ken Van Hoeylandt
42e843b463
C++ conversions (#111)
* Remove version from artifact name
* Target C++ 20 and higher
* Use cpp string
* Better crash implementation
* String utils in cpp style
* Replace parameter methods with start() method
* MutexType to Mutex::Type
* Kernel c to cpp style
* Cleanup event flag
* More cpp conversions
* Test fixes
* Updated ideas docs
2024-12-07 12:24:28 +01:00
Ken Van Hoeylandt
d52fe52d96
Various services improved (#110) 2024-12-06 23:16:29 +01:00
Ken Van Hoeylandt
33bb742dfb
Hal refactored (#99) 2024-12-02 00:32:39 +01:00