311 Commits

Author SHA1 Message Date
Ken Van Hoeylandt
70d36131f6
Implemented CrowPanel Basic 3.5" (#232) 2025-02-22 22:43:49 +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
44b366b557
Update esp_lvgl_port (#230)
Updated to espressif/esp-bsp@531ad57
531ad57f6a
2025-02-22 17:23:56 +01:00
Ken Van Hoeylandt
ee88a563dc
Fix for display settings (#229) 2025-02-22 16:39:17 +01:00
Shadowtrance
09cdf07b7c
Bring the ST7789 driver inline with the ILI934x driver (#228)
more configuration options as not every display / board is the same.
2025-02-22 13:53:48 +01:00
Ken Van Hoeylandt
d29e47f0eb
Logging improvements & other cleanup (#227) 2025-02-21 14:38:51 +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
6e8fbae62b
New board: Elecrow CrowPanel Basic 2.8" (#225)
- Implemented Elecrow CrowPanel Basic 2.8"
- Change default "invert" setting for ILI934x driver from `true` to `false`
- Created `Xpt2046` driver subproject
- Refactored unPhone to use new `Xpt2046` driver subproject
2025-02-19 22:41:39 +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
Shadowtrance
6e77d5027f
Windows Build and release scripts (#220) 2025-02-13 12:08:16 +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
2e86d4774b
Added HAL docs, improved HAL init&locking (#218) 2025-02-12 18:12:20 +01:00
Ken Van Hoeylandt
b7f39f883d
Reduce splash duration from 1.5s to 1s (#217) 2025-02-11 23:48:00 +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
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
e1bfdd7c91
Improve source file processing in CMakeLists.txt (#211) 2025-02-08 21:42:14 +01:00
Ken Van Hoeylandt
5b375c21bb
Implemented new driver projects (#210)
Moved drivers from the `Boards` projects to `Drivers` folder:
- BQ24295
- AW9523
- AXP2101

The I2C drivers are theoretically cross-platform, but for now they are only built for ESP32.
2025-02-08 21:08:23 +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
fa54eaa58a
TactilityC improvements for tt_app_ functions (#192)
- Renamed `tt_app_context_*` to tt_app_*`
- Renamed `AppContextHandle` to `AppHandle`
- Created `tt_app_start()` and `tt_app_start_with_bundle()`
2025-01-26 00:48:37 +01:00
Ken Van Hoeylandt
f9e1f737fd
Create FUNDING.yml (#191) 2025-01-25 17:37:26 +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
c2edbad0fb
Update CONTRIBUTING.md (#186) 2025-01-25 12:35:28 +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
bb7e79886f
Various fixes and improvements (#182)
- Fix for `logMutex` bug where the `Mutex` constructor is not called when doing early boot logging (with `DEBUG` level logging) . The only way to make it work is to explicitly call the constructor in the logging wrapper function.
- Fix for unPhone power states
2025-01-23 21:17:33 +01:00
Miguel Magno
9fb8d45b2e
Fix duplicate include (#181) 2025-01-23 15:27:19 +01:00
Ken Van Hoeylandt
b13502170e
Update issue templates (#180) 2025-01-22 23:30:14 +01:00
Ken Van Hoeylandt
aa85f7d19d
Create SECURITY.md (#179) 2025-01-22 23:21:42 +01:00
Ken Van Hoeylandt
dc20ed4874
Improvements & fixes (#178)
- Fix for unPhone sleep: it would wake up every minute briefly (draining the battery over the course of 1-3 days)
- Minor WiFi improvements (mainly added logging and improved filtering on connect .. the latter probably doesn't matter)
2025-01-22 23:10:28 +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
97b8007aca
Unphone battery status (#176) 2025-01-21 19:53:00 +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