feat(display): add active state parameter to hint animation
1. **Added `active` parameter to hint animation** - `updateHint()` now accepts a boolean `active` parameter across both display drivers (TFT and GFX) - When `active=true`: faster pulse animation (500ms period) during active hold - When `active=false`: slower pulse animation (2000ms period) during idle state 2. **Improved animation calculations** - Replaced modulo operator with `fmodf()` for cleaner float calculations - Standardized to `static_cast<uint8_t>()` for type conversions - Fixed GFX driver to use `color565()` method instead of manual bit shifting 3. **Updated hint display logic** - Now differentiates between "holding" state (fast pulse) and "idle" state (slow pulse) - Hint draws at both states when `holdStartX >= 0` (touch position captured) 4. **Added code formatter task** - New `mise.toml` task for running clang-format across all source files - Users get **visual feedback differentiation**: fast pulsing during active hold vs. slow pulsing when idle - More intuitive UI that clearly indicates whether a long-press is in progress or just waiting - Cleaner, more maintainable code with standardized calculations and type conversions
This commit is contained in:
14
mise.toml
14
mise.toml
@@ -139,3 +139,17 @@ rm -rf boards/esp32-32e/build
|
||||
rm -rf boards/esp32-s3-lcd-43/build
|
||||
echo "[OK] Build artifacts cleaned"
|
||||
"""
|
||||
|
||||
[tasks.format]
|
||||
run = """
|
||||
clang-format -i --style=file \
|
||||
boards/esp32-32e/*.cpp \
|
||||
boards/esp32-32e/*.h \
|
||||
boards/esp32-32e/*.ino \
|
||||
boards/esp32-s3-lcd-43/*.cpp \
|
||||
boards/esp32-s3-lcd-43/*.h \
|
||||
boards/esp32-s3-lcd-43/*.ino \
|
||||
libraries/KlubhausCore/src/*.cpp \
|
||||
libraries/KlubhausCore/src/*.h \
|
||||
libraries/KlubhausCore/*.properties
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user