104 Commits

Author SHA1 Message Date
Ken Van Hoeylandt
2691dbb014
Implemented LaunchId and FileSelection, updated Notes (#281)
- Implemented `LaunchId` to keep track of the apps that are started
- Implemented `FileSelection` app to select existing and/or new files.
- Moved some re-usable file functionality to `tt::file::`
- Renamed `Files` app to `FileBrowser`
- Updated `Notes` app to use new `FileSelection` functionality, and cleaned it up a bit.
- General code cleanliness improvements
2025-05-25 22:11:50 +02:00
Shadowtrance
870924229a
Switch to dark theme (#278) 2025-05-06 19:52:55 +02:00
Ken Van Hoeylandt
b2647f46bb
Cleanup (#277) 2025-04-11 21:56:16 +02:00
Shadowtrance
d1c1a3a369
Add Notes app (#276) 2025-04-11 21:35:29 +02:00
Ken Van Hoeylandt
a5090ec194
Refactor display app (#275)
- Moved more code into class
- Refactored some logic
- UI is more dynamic: hide elements that are not supported by the hardware (gamma and/or brightness slider)
2025-04-08 22:38:03 +02:00
Ken Van Hoeylandt
b2d4dc5ecb
Simplify AppList (#271)
Remove categories, disable HelloWorld app
2025-04-03 23:06:54 +02:00
Shadowtrance
a7c5d6a2ee
Add Calculator app (#270)
Add Calculator app

Originally created by @maxbrito500 and tweaked/updated by me.
2025-04-03 18:28:15 +02:00
Ken Van Hoeylandt
08029a84dd
Various fixes and improvements (#269)
- Bump version for next release
- Fix default gamma for CYD 2432S032C
- Remember gamma curve setting from Display settings app
- Add UART to Core2 (still has no voltage on Grove port, though)
- LVGL performance improvements: pin to second core and set task priority to "critical"
- Fix build warnings, including deprecations
- Removed deprecated `Thread` constructor
- Fix WaveShare S3 display: Some displays would show a white screen at 12MHz, so I'm putting it back to the
official config values.
2025-04-01 23:42:56 +02:00
Ken Van Hoeylandt
eb4e9f9649
Fixes and cleanup (#266)
- Fix issue with GT911 driver: fixed a crash and an init issue
- Cleanup of unused code
2025-03-31 15:59:50 +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
d72852a6e2
Merge TactilityHeadless into Tactility (#263)
There currently is no practical use to have TactilityHeadless as a subproject. I'm merging it with the Tactility project.
2025-03-30 10:54:36 +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
49a46f6236
ESP-NOW service (#259)
Implemented Chat app with ESP-NOW service.

The Chat app was originally created by @maxbrito500 and adapted by me.
2025-03-29 10:45:34 +01:00
Ken Van Hoeylandt
19521791c5
CYD 4848S040C improvements and more (#245)
4848S040C:
- Fix SD card CS pin setting for 
- Fixes for colour
- Implement PwmBacklight driver 

Other:
- Fix for TouchDevice type
- Show landscape launcher for square displays
2025-03-12 23:45:49 +01:00
Ken Van Hoeylandt
85a6ad3bbe
Keyboard improvements (#240)
- Renamed various keyboard functions so it's easier to differentiate hardware versus software keyboard functionality
- Created `Tactility/lvgl/Keyboard.h` as a proxy  for the internal `Gui` service.
- Implemented `tt_lvgl_keyboard.h` in `TactilityC`.
2025-03-10 00:21:49 +01:00
Ken Van Hoeylandt
13d7e84ef3
Implement Serial Console app & more (#239)
- Implemented new app: Serial Console
- `Uart::writeString()`: fixed 2 mutex bugs
- `AlertDialog::start()` with default "OK" button added
- Created `tt::lvgl::defaultLockTime` for re-use
- Removed various usages of deprecated `lvgl::obj_set_style_no_padding()`
- Implemented `hal::uart::getNames()` to list all interface names
2025-03-07 21:58:52 +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
de46401d85
Loader refactored (#235)
- Moved all Loader functionality into Loader class
- Improvement for Dispatcher construction
- Dispatcher and DispatcherThread: you can now specify the timeout when calling `dispatch()`. Default timeout is max timeout.
2025-02-23 16:08:00 +01:00
Ken Van Hoeylandt
6d1d08944b
LVGL improvements for TactilityC (#233)
- Expose various `lv_event`-related functions
- Expose `tt::lvgl::toolbar`-related functions
- Update sample app and improved docs
2025-02-22 23:12:03 +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
d29e47f0eb
Logging improvements & other cleanup (#227) 2025-02-21 14:38:51 +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
a7a3b17ff6
SD card improvements (#214)
- Implement SD card locking logic and helper functions
- Fix issue with running ELF apps from SD card: this would crash when launched from the AppList
- Reduce Boot app wait time to 1 second
- Speed up boot by about 0.1 second by moving app&service registration to the Boot app
- Files app now uses proper SD card mount point name (and multiple SD cards)
- Removed `TT_SCREENSHOT_MODE`
2025-02-09 12:01:01 +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
88b3bfbe3e
Logging improvements and C++23 (#206)
- Improved logging code by splitting functionality up into different files
- Set C++23 as new standard (it was already the implied standard due to some code, but now it's explicit)
2025-02-06 22:55:51 +01:00
Ken Van Hoeylandt
6337458992
Refactor app access (#205)
- Use `tt::app::` functions to start/stop apps and get current app(context) instead of using loader everywhere
- Removed `tt_service_loader.*` from TactilityC
- Created `tt_app_stop()` for TactilityC
- Bumped version to 0.3.0 to prepare for upcoming release
2025-02-05 21:57:27 +01:00
Ken Van Hoeylandt
68e34ca740
Various improvements (#204)
- Fixed crash in logging app when not selecting filter
- Cleanup of unused code
- Cleanup of app code
2025-02-04 23:05:28 +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
c0f4738abe
I2C improvements and fixes (#201)
- Show I2C device name in I2C Scanner app
- Register various I2C devices from board implementations
- Fix M5Stack Core2 power status
- Fix pre-allocation issue in `hal::Device`
2025-02-02 17:54:36 +01:00
Ken Van Hoeylandt
2e61aea93c
Remember last selected bus/port and auto-scan when launching (#200)
- Remember last selected bus/port
- Auto-scan when starting or resuming the app
- Auto-scan when selecting new bus/port
- Cleaned up app code a bit
2025-02-02 16:14:59 +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
7856827ecf
Refactored manifest onStart/onStop to onCreate/onDestroy (#195)
When writing documentation, I realized how `onStart`/`onStop` isn't clearly communicating what it does (it could imply show/hide), so I renamed it to `onCreate` and `onDestroy`.
2025-01-28 21:34:48 +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
686f7cce83
TactilityCore improvements (#187)
FreeRTOS handles were stored plainly and they were deleted in the destructor of classes.
This meant that if a class were to be copied, the destructor would be called twice on the same handles and lead to double-free.

Seha on Discord suggested to fix this by using `std::unique_ptr` with a custom deletion function.

The changes affect:
- Thread
- Semaphore
- Mutex
- StreamBuffer
- Timer
- MessageQueue
- EventFlag

Thread  changes:
- Removal of the hack with the `Data` struct
- Thread's main body is now just a private static function inside the class.
- The C functions were relocated to static class members

PubSub changes:
- Refactored pubsub into class
- Renamed files to `PubSub` instead of `Pubsub`
- `PubSubSubscription` is now a private inner struct and `PubSub` only exposes `SubscriptionHandle`

Lockable, ScopedLockable, Mutex:
- Added `lock()` method that locks indefinitely
- Remove deprecated `acquire()` and `release()` methods
- Removed `TtWaitForever` in favour of `portMAX_DELAY`
2025-01-25 17:29:11 +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
3be251d8fb
Refactor services into classes (#183) 2025-01-24 18:21:47 +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
c3bcf93698
Refactor app launching (#174)
- Refactor the way apps work: Instead of a C interface, they are now C++ classes. The main reasoning is that attaching data to an app was cumbersome. Having different implementations for different kinds of apps was cumbersome too. (3 or 4 layers of manifest nesting for the TactilityC project)
- External apps are still written in C, but they get a createData/destroyData in their manifest, so:
- External apps now have their own manifest.
- All functions in the original AppManifest are removed and replaced by a single `createApp` function
- External apps now automatically register (each app individually!) when they run the first time. As a side-effect they become visible in the `AppList` app!
- Adapted all apps for the new interface.
- Adapted all internal logic for these changes (Gui, ViewPort, Loader, AppContext, AppInstance, etc.)
- Rewrote parts of Loader to use std::shared_ptr to make the code much safer.
- Added a refcount check for the `AppInstance` and `App` at the end of their lifecycle. Show warning if refcount is too high.
2025-01-21 17:48:32 +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