fix(doorbell-touch): correct LovyanGFX library integration and build
This commit is contained in:
31
mise.toml
31
mise.toml
@@ -28,22 +28,41 @@ echo "[OK] TFT_eSPI 2.5.43 vendored + configured"
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
[tasks.install-libs-s3-43]
|
[tasks.install-libs-s3-43]
|
||||||
|
description = "Vendor LovyanGFX into vendor/esp32-s3-lcd-43"
|
||||||
run = """
|
run = """
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
LOVyanGFX_DIR="vendor/esp32-s3-lcd-43/LovyanGFX"
|
||||||
|
|
||||||
# Clone LovyanGFX (latest)
|
# Clone LovyanGFX (latest)
|
||||||
if [ ! -d "vendor/esp32-s3-lcd-43/LovyanGFX" ]; then
|
if [ ! -d "$LOVyanGFX_DIR" ]; then
|
||||||
echo "Cloning LovyanGFX..."
|
echo "Cloning LovyanGFX..."
|
||||||
git clone --depth 1 \
|
git clone --depth 1 \
|
||||||
https://github.com/lovyan03/LovyanGFX.git \
|
https://github.com/lovyan03/LovyanGFX.git \
|
||||||
vendor/esp32-s3-lcd-43/LovyanGFX
|
"$LOVyanGFX_DIR"
|
||||||
else
|
else
|
||||||
echo "LovyanGFX already exists, skipping"
|
echo "LovyanGFX already exists, skipping"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove any old library.properties (let Arduino detect automatically)
|
# Create library.properties that correctly points to source
|
||||||
rm -f vendor/esp32-s3-lcd-43/LovyanGFX/library.properties
|
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"
|
echo "[OK] LovyanGFX vendored"
|
||||||
"""
|
"""
|
||||||
@@ -92,8 +111,8 @@ run = """
|
|||||||
arduino-cli compile \
|
arduino-cli compile \
|
||||||
--fqbn "esp32:esp32:waveshare_esp32_s3_touch_lcd_43:PSRAM=enabled,FlashSize=16M,USBMode=hwcdc,PartitionScheme=app3M_fat9M_16MB" \
|
--fqbn "esp32:esp32:waveshare_esp32_s3_touch_lcd_43:PSRAM=enabled,FlashSize=16M,USBMode=hwcdc,PartitionScheme=app3M_fat9M_16MB" \
|
||||||
--libraries ./libraries \
|
--libraries ./libraries \
|
||||||
--libraries ./vendor/esp32-s3-lcd-43/LovyanGFX/src \
|
--library ./vendor/esp32-s3-lcd-43/LovyanGFX \
|
||||||
--build-property "compiler.cpp.extra_flags=-DDEBUG_MODE -DBOARD_HAS_PSRAM" \
|
--build-property "compiler.cpp.extra_flags=-DDEBUG_MODE -DBOARD_HAS_PSRAM -DLGFX_USE_V1" \
|
||||||
--warnings default \
|
--warnings default \
|
||||||
./boards/esp32-s3-lcd-43
|
./boards/esp32-s3-lcd-43
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user