fix(doorbell-touch): correct LovyanGFX library integration and build

This commit is contained in:
2026-02-17 01:13:28 -08:00
parent de45f89f9b
commit 246bfe0cb9

View File

@@ -28,22 +28,41 @@ echo "[OK] TFT_eSPI 2.5.43 vendored + configured"
"""
[tasks.install-libs-s3-43]
description = "Vendor LovyanGFX into vendor/esp32-s3-lcd-43"
run = """
#!/usr/bin/env bash
set -euo pipefail
LOVyanGFX_DIR="vendor/esp32-s3-lcd-43/LovyanGFX"
# Clone LovyanGFX (latest)
if [ ! -d "vendor/esp32-s3-lcd-43/LovyanGFX" ]; then
if [ ! -d "$LOVyanGFX_DIR" ]; then
echo "Cloning LovyanGFX..."
git clone --depth 1 \
https://github.com/lovyan03/LovyanGFX.git \
vendor/esp32-s3-lcd-43/LovyanGFX
"$LOVyanGFX_DIR"
else
echo "LovyanGFX already exists, skipping"
fi
# Remove any old library.properties (let Arduino detect automatically)
rm -f vendor/esp32-s3-lcd-43/LovyanGFX/library.properties
# Create library.properties that correctly points to source
cat > "$LOVyanGFX_DIR/library.properties" << 'EOF'
name=LovyanGFX
version=1.2.0
author=lovyan03
maintainer=lovyan03
sentence=Display and touch driver library for ESP32
paragraph=Universal graphics library for ESP32 with support for various displays and touch controllers
category=Display
url=https://github.com/lovyan03/LovyanGFX
architectures=esp32
includes=LovyanGFX.hpp
# This tells Arduino to build from src/
# Arduino will look in src/ for .cpp files
EOF
# Create a empty src to ensure sources are found
mkdir -p "$LOVyanGFX_DIR/src"
echo "[OK] LovyanGFX vendored"
"""
@@ -92,8 +111,8 @@ run = """
arduino-cli compile \
--fqbn "esp32:esp32:waveshare_esp32_s3_touch_lcd_43:PSRAM=enabled,FlashSize=16M,USBMode=hwcdc,PartitionScheme=app3M_fat9M_16MB" \
--libraries ./libraries \
--libraries ./vendor/esp32-s3-lcd-43/LovyanGFX/src \
--build-property "compiler.cpp.extra_flags=-DDEBUG_MODE -DBOARD_HAS_PSRAM" \
--library ./vendor/esp32-s3-lcd-43/LovyanGFX \
--build-property "compiler.cpp.extra_flags=-DDEBUG_MODE -DBOARD_HAS_PSRAM -DLGFX_USE_V1" \
--warnings default \
./boards/esp32-s3-lcd-43
"""