; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documenation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
;
; There are numerous configurations of NightDriver that can be built here.  For example, the
; simplest is the DEMO config.  The HUB75 matrix project is the mesermizer.  You simply set
; default_envs to the project you wish to build.  There are project configs for various different
; NightDriver projects ranging from WiFi LED Strip to the simple lantern candle:
;
; demo          Simple WS2812B strip controller, runs a rainbow on PIN 5
; ledstrip      Waits for color data over wifi, so used for home displays, etc
; spectrum      M5StickCPlus project, a spectrum analyzer, on 48x16 WS2812B matrix
; mesmerizer    HUB75 info panel with audio effects, weather, info, etc,

[platformio]
default_envs = 
build_cache_dir = .pio/build_cache
extra_configs =
    custom_*.ini ; This file can be created in the root directory to store user defined devices and environments.

; ==================
; Base configuration
;
; Options that are used (or extended) in all device sections (and hence environments) are defined here

[base]
upload_port     = 
monitor_port    = 
build_type      = release
upload_speed    = 2000000
build_flags     = -std=gnu++2a
                  -g3
                  -Ofast
                  -ffunction-sections
                  -fdata-sections

build_src_flags = -Wformat=2                        ; Warnings for our code only, excluding libraries
                  -Wformat-truncation
                  -Wstack-usage=4096

# Exclude libraries that we don't control from 'pio check'.
# format is error number(optional :path_with_wildcards(optional :line_number))
check_flags     = cppcheck: --suppress=*:*src/uzlib/src/*

lib_deps        = crankyoldgit/IRremoteESP8266  @ ^2.7.20
                  fastled/FastLED               @ 3.8.0
                  adafruit/Adafruit BusIO       @ ^1.9.1
                  adafruit/Adafruit GFX Library @ ^1.10.12
                  olikraus/U8g2                 @ ^2.28.8
                  kosme/arduinoFFT              @ ^1.5.6
                  me-no-dev/AsyncTCP            @ ^1.1.1
                  https://github.com/PlummersSoftwareLLC/ESPAsyncWebServer.git
                  bblanchon/ArduinoJson         @ ^6.21.3
                  thomasfredericks/Bounce2      @ ^2.7.0
                  https://github.com/PlummersSoftwareLLC/RemoteDebug
                  QRCode                        @ ^0.0.1
                  Bodmer/TJpg_Decoder           @ ^1.0.8
                  plageoj/UrlEncode             @ ^1.0.1

; This partition table attempts to fit everything in 4M of flash.

board_build.partitions = config/partitions_custom.csv


; =================================
; Build flags for enabling a remote
;
; You can set these here once to match your setup; they are then included in all environments
; that are configured to be used with a remote.

[remote_flags]
build_flags     = -D_IR_ENABLE_DEFAULT_=false       ; Don't automatically include every remote control decoder
                  -DDECODE_NEC=true                 ; Enable whichever you need for your remote.  Try not disabling
                                                    ; above to figure out which it is.

; ===============
; Device sections
;
; Sections starting with "dev_" contain general settings for a particular type of device.
; They extend the "base" config, both in general and in terms of build flags and dependencies,
; where applicable.

[dev_adafruit_feather]
extends         = base
board           = adafruit_feather_esp32s3_tft
monitor_speed   = 1500000
upload_speed    = 1500000
lib_deps        = ${base.lib_deps}
                  TFT_eSPI

[dev_esp32]
extends         = base
board           = esp32dev
monitor_speed   = 115200
upload_speed    = 921600

[dev_esp32-s3]
extends         = base
board           = esp32-s3-devkitc-1
board_build.mcu = esp32s3
board_build.f_cpu = 240000000L
monitor_speed   = 115200
upload_speed    = 1000000

[dev_heltec_wifi]
extends         = base
board           = heltec_wifi_kit_32
monitor_speed   = 115200
upload_speed    = 921600
build_flags     = -DUSE_SCREEN=1
                  -DARDUINO_HELTEC_WIFI_KIT_32=1
                  ${base.build_flags}

[dev_heltec_wifi_v2]
extends         = dev_heltec_wifi
board           = heltec_wifi_kit_32_v2
build_flags     = -DARDUINO_HELTEC_WIFI_KIT_32_V2=1
                  ${dev_heltec_wifi.build_flags}

[dev_heltec_wifi_v3]
extends         = dev_heltec_wifi
board           = heltec_wifi_kit_32_V3
build_flags     = -DARDUINO_HELTEC_WIFI_KIT_32_V3=1
                  -DUSE_SSD1306=1
                  ${dev_heltec_wifi.build_flags}
lib_deps        = ${dev_heltec_wifi.lib_deps}
                  heltecautomation/Heltec ESP32 Dev-Boards @ ^1.1.1

[dev_heltec_wifi_lora_v3]
extends         = dev_heltec_wifi
board           = heltec_wifi_lora_32_V3
build_flags     = -DARDUINO_HELTEC_WIFI_LORA_32_V3=1
                  -DUSE_SSD1306=1
                  ${dev_heltec_wifi.build_flags}
lib_deps        = ${dev_heltec_wifi.lib_deps}
                  heltecautomation/Heltec ESP32 Dev-Boards @ ^1.1.1

[dev_lolin_d32_pro]
extends         = base
board           = lolin_d32_pro
monitor_speed   = 115200
upload_speed    = 921600

[dev_m5]
extends         = base
monitor_speed   = 115200
upload_speed    = 1500000
build_flags     = -DUSE_SCREEN=1
                  ${base.build_flags}
lib_deps        = ${base.lib_deps}
                  m5stack/M5Unified @ ^0.1.17

[dev_m5stick-c]
extends         = dev_m5
board           = m5stick-c
build_flags     = -DM5STICKC=1
                  ${dev_m5.build_flags}

[dev_m5stick-c-plus]
extends         = dev_m5
board           = m5stick-c                         ; Requires the M5StickC Plus (note the Plus)
build_flags     = -DM5STICKCPLUS=1
                  ${dev_m5.build_flags}

[dev_m5stick-c-plus2]
extends         = dev_m5
board           = m5stick-c                         ; Requires the M5StickC Plus2 (note the Plus2)
upload_speed    = 2000000

build_flags     = -DM5STICKCPLUS2=1
                  ${dev_m5.build_flags}
                  ${psram_flags.build_flags}
board_build.partitions = config/partitions_custom_8M.csv
board_upload.flash_size = 8MB

[dev_m5stack]
extends         = dev_m5
board           = m5stack-core2
build_flags     = -DM5STACKCORE2=1
                  ${dev_m5.build_flags}
                  ${psram_flags.build_flags}
board_build.partitions = config/partitions_custom_8M.csv
board_upload.flash_size = 8MB

[dev_elecrow_mesmerizer]
extends         = dev_esp32-s3
board           = esp32-s3-devkitc-1
monitor_speed   = 115200
upload_speed    = 1500000
lib_deps        = ${dev_esp32-s3.lib_deps}
                  lovyan03/LovyanGFX@^1.1.7
build_flags     = ${dev_esp32-s3.build_flags}

[dev_tinypico]
extends         = base
board           = tinypico
monitor_speed   = 115200
upload_speed    = 1500000

[dev_wrover]
extends         = base
board           = esp-wrover-kit
monitor_speed   = 115200
upload_speed    = 1500000
lib_deps        = ${base.lib_deps}
                  adafruit/Adafruit ILI9341     @ ^1.5.10

[dev_mesmerizer]
extends         = dev_wrover
upload_speed    = 2000000
board_build.partitions  = config/partitions_custom_8M.csv
board_upload.flash_size = 8MB

[dev_lilygo-tdisplay-s3]
extends         = dev_esp32-s3
build_flags     = -DLILYGOTDISPLAYS3=1
                  -DPIN_SDA=21
                  -DTOGGLE_BUTTON_1=0
                  -DTOGGLE_BUTTON_2=14
                  ${dev_esp32-s3.build_flags}


[dev_lilygo_amoled]

extends        = base
board          = lilygo-t-amoled
monitor_speed  = 115200
upload_speed   = 1500000
board_build.partitions = config/partitions_custom_noota.csv
build_flags    = ${base.build_flags}
                 -DLILYGO_TDISPLAY_AMOLED_SERIES=1
                 -DARDUINO_USB_CDC_ON_BOOT=1
                 -DAMOLED_S3=1
                 -DUSE_SCREEN=1
                 -DTOGGLE_BUTTON_1=21
                 -DTOGGLE_BUTTON_2=0
                 -DNUM_INFO_PAGES=2
                 -DLED_PIN0=2
                 -DLV_CONF_PATH="../../../../include/amoled/lv_conf.h"
                 -DLV_CONF_INCLUDE_SIMPLE
                 ${psram_flags.build_flags}
                 ${unity_double_flags.build_flags}
lib_deps      =  lewisxhe/SensorLib @ ^0.1.4
                 lewisxhe/XPowersLib @ ^0.2.1
                 https://github.com/lvgl/lvgl.git#release/v8.3
                 ${base.lib_deps}

; ===================
; Capability sections
;
; The following sections contain build flags and/or dependencies to enable a particular capability
; or module in specific environments. They applicable option(s) - build_flags, lib_deps or both -
; are included in the environments in question.
;
; Note that these sections do not extend "base", as they are basically feature toggles.


; Build flags for use of PSRAM
[psram_flags]
build_flags     = -DUSE_PSRAM=1
                  -DBOARD_HAS_PSRAM=1
                  -mfix-esp32-psram-cache-issue

; Libs needed to link with a TTGO Module
[ttgo_deps]
lib_deps        = https://github.com/Xinyuan-LilyGO/TTGO-T-Display
                  TFT_eSPI

; Build flags for enabling high precision Unity double
[unity_double_flags]
build_flags     = -DUNITY_INCLUDE_DOUBLE
                  -DUNITY_DOUBLE_PRECISION=1e-12    ; Make doubles real 8 byte doubles

; ================================================================
; Basic environment section, automatically inherited by all others
;

[env]
platform        = platformio/espressif32@^6.3.0
framework       = arduino
build_type      = release
build_unflags   = -std=gnu++11
lib_extra_dirs  = ${PROJECT_DIR}/lib
monitor_filters = esp32_exception_decoder
extra_scripts   = pre:tools/bake_site.py
                  post:tools/merge_image.py
board_build.embed_files = site/dist/index.html.gz
                          site/dist/index.js.gz
                          site/dist/favicon.ico.gz
board_build.embed_txtfiles = config/timezones.json

; ================================================================
; Common project configurations
;

[mesmerizer_config]
build_flags     = -DMESMERIZER=1
                  -DUSE_HUB75=1
                  -DSHOW_VU_METER=1
                  ${psram_flags.build_flags}
                  ${remote_flags.build_flags}

lib_deps        = https://github.com/PlummersSoftwareLLC/SmartMatrix.git
                  https://github.com/PlummersSoftwareLLC/GifDecoder.git
                  bitbank2/AnimatedGIF @ ^1.4.7

board_build.embed_files = assets/bmp/brokenclouds.jpg
                          assets/bmp/brokencloudsnight.jpg
                          assets/bmp/clearsky.jpg
                          assets/bmp/clearnight.jpg
                          assets/bmp/fewclouds.jpg
                          assets/bmp/fewcloudsnight.jpg
                          assets/bmp/lowreslogo.jpg
                          assets/bmp/mist.jpg
                          assets/bmp/mistnight.jpg
                          assets/bmp/rain.jpg
                          assets/bmp/rainnight.jpg
                          assets/bmp/scatteredclouds.jpg
                          assets/bmp/scatteredcloudsnight.jpg
                          assets/bmp/showerrain.jpg
                          assets/bmp/showerrainnight.jpg
                          assets/bmp/snow.jpg
                          assets/bmp/snownight.jpg
                          assets/bmp/thunderstorm.jpg
                          assets/bmp/thunderstormnight.jpg
                          assets/gif/colorsphere.gif
                          assets/gif/atomic.gif
                          assets/gif/pacman.gif
                          assets/gif/threerings.gif
                          assets/gif/banana.gif
                          assets/gif/tesseract.gif
                          assets/gif/firelog.gif
                          assets/gif/nyancat.gif
                          ${env.board_build.embed_files}

; ====================
; Project environments
;
; These are the actual environments defined in this file. Each configures one project for one
; specific device. They extend the "dev_" config for the device in question, both in general
; and in terms of build flags and dependencies, where applicable.
;
; Note: when adding a new environment to the list, don't forget to explicitly add the device
; section's build_flags and lib_deps options (using ${dev_<device>.<option>}) if you define
; either or both in the environment you add. PlatformIO does not merge them automatically.
; In addition to the build_flags and lib_deps of the device, capability flags and/or dependencies
; can be included where appropriate.

;=========

[env:demo]
extends         = dev_esp32
build_flags     = -DDEMO=1
                  ${dev_esp32.build_flags}

; This is the basic DEMO project again, but expanded to work on the M5, which means it can draw to
; the built in LCD.  It's made so that you can connect to the small 4-pin connector on the M5,
; so it sends power and ground as well as data on PIN 32.

[env:m5demo]
extends         = dev_m5stick-c
build_flags     = -DM5DEMO=1
                  ${dev_m5stick-c.build_flags}
board_build.partitions = config/partitions_custom_noota.csv

; This is largely the same as the m5demo above except it links to the PLUS version of the lib
[env:m5plusdemo]
extends         = dev_m5stick-c-plus
build_flags     = -DM5DEMO=1
                  ${dev_m5stick-c-plus.build_flags}

; Also one for the M5Stack Core2
[env:m5stackdemo]
extends         = dev_m5stack
build_flags     = -DM5DEMO=1
                  ${dev_m5stack.build_flags}

; Now for the Heltec, with WiFi and webserver enabled
[env:heltecdemo]
extends         = dev_heltec_wifi
build_flags     = -DDEMO=1
                  -DENABLE_WIFI=1
                  ${dev_heltec_wifi.build_flags}

; Now for Heltec V2, which has 8M flash
[env:heltecv2demo]
extends         = dev_heltec_wifi_v2
build_flags     = -DDEMO=1
                  -DENABLE_WIFI=1
                  ${dev_heltec_wifi_v2.build_flags}

; Heltec V3 board, which is an S3 with USB-C
[env:heltecv3demo]
extends         = dev_heltec_wifi_v3
build_flags     = -DDEMO=1
                  -DENABLE_WIFI=1
                  -DROTATE_SCREEN=1
                  ${dev_heltec_wifi_v3.build_flags}

; Heltec LoRa V3 board, which is an S3 with USB-C and LoRa
[env:helteclorav3demo]
extends         = dev_heltec_wifi_lora_v3
build_flags     = -DDEMO=1
                  -DENABLE_WIFI=1
                  ${dev_heltec_wifi_lora_v3.build_flags}

; LILYGO T-Display-S3
[env:lilygo-tdisplay-s3-demo]
extends         = dev_lilygo-tdisplay-s3
build_flags     = -DDEMO=1
                  -DENABLE_WIFI=1
                  -DUSE_SCREEN=0
                  ${dev_lilygo-tdisplay-s3.build_flags}

[env:demo_amoled]
extends        = dev_lilygo_amoled
build_flags    =  -DDEMO=1
                  ${dev_lilygo_amoled.build_flags}
    
;=============

[env:ledstrip]
extends         = dev_heltec_wifi
build_flags     = -DLEDSTRIP=1
                  ${unity_double_flags.build_flags}
                  ${dev_heltec_wifi.build_flags}

; ledstrip_feather is based off ledstrip but intended for the ESP32S3 TFT Feather from Adafruit with 2MB PSRAM

[env:ledstrip_feather]
extends         = dev_adafruit_feather
build_flags     = -DLEDSTRIP=1
                  -DUSE_SCREEN=1
                  -DUSE_TFTSPI=1
                  -DUSER_SETUP_LOADED
                  -DTOUCH_CS=0
                  -DST7789_2_DRIVER
                  -DTFT_WIDTH=135                   ; Define the TFT screen setup
                  -DTFT_HEIGHT=240
                  -DTFT_BL=45
                  -DTFT_BACKLIGHT_ON=HIGH
                  -DTFT_RGB_ORDER=TFT_RGB           ; Fix color order being swapped
                  -DTFT_CS=7                        ; CS, DC, RST
                  -DTFT_DC=39
                  -DTFT_RST=40
                  -DTFT_MOSI=35                     ; MOSI, MISO, CLK
                  -DTFT_MISO=37
                  -DTFT_SCLK=36
                  -DLOAD_GLCD=1                     ; Font info
                  -DSPI_FREQUENCY=27000000
                  -DESP32FEATHERTFT=1               ; This board has a TFT that is supported by TFT_eSPI
                  -DNUM_INFO_PAGES=1
                  ${psram_flags.build_flags}
                  ${unity_double_flags.build_flags}
                  ${dev_adafruit_feather.build_flags}

[env:ledstrip_feather_hexagon]
extends         = dev_adafruit_feather
build_flags     = -DHEXAGON=1
                  -DUSE_SCREEN=1
                  -DUSE_TFTSPI=1
                  -DUSER_SETUP_LOADED
                  -DTOUCH_CS=0
                  -DST7789_2_DRIVER
                  -DTFT_WIDTH=135                   ; Define the TFT screen setup
                  -DTFT_HEIGHT=240
                  -DTFT_BL=45
                  -DTFT_BACKLIGHT_ON=HIGH
                  -DTFT_RGB_ORDER=TFT_RGB           ; Fix color order being swapped
                  -DTFT_CS=7                        ; CS, DC, RST
                  -DTFT_DC=39
                  -DTFT_RST=40
                  -DTFT_MOSI=35                     ; MOSI, MISO, CLK
                  -DTFT_MISO=37
                  -DTFT_SCLK=36
                  -DLOAD_GLCD=1                     ; Font info
                  -DSPI_FREQUENCY=27000000
                  -DESP32FEATHERTFT=1               ; This board has a TFT that is supported by TFT_eSPI
                  -DTOGGLE_BUTTON_1=0               ; Use GPIO0 button as the info toggle
                  -DNUM_INFO_PAGES=1
                  ${psram_flags.build_flags}
                  ${unity_double_flags.build_flags}
                  ${dev_adafruit_feather.build_flags}

[env:ledstrip_feather_wrover]
extends         = dev_wrover
build_flags     = -DLEDSTRIP=1
                  -DUSER_SETUP_LOADED
                  ${psram_flags.build_flags}
                  ${dev_wrover.build_flags}
debug_init_break = tbreak setup

[env:ledstriplite]
extends         = dev_esp32
build_flags     = -DLEDSTRIP=1
                  ${unity_double_flags.build_flags}
                  ${dev_esp32.build_flags}

[env:ledstrip_pico]
extends         = dev_tinypico
build_flags     = -DLEDSTRIP=1
                  ${psram_flags.build_flags}
                  ${unity_double_flags.build_flags}
                  ${dev_tinypico.build_flags}

;=============

[env:spectrum]
extends         = dev_m5stick-c-plus
build_flags     = -DSPECTRUM=1
                  -DSHOW_VU_METER=1
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c-plus.build_flags}
board_build.partitions = config/partitions_custom_noota.csv

[env:spectrum2]
extends         = dev_m5stick-c-plus2
build_flags     = -DSPECTRUM=1
                  -DSHOW_VU_METER=1
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c-plus2.build_flags}
board_build.partitions = config/partitions_custom_noota.csv

[env:helmet]
extends         = dev_m5stick-c-plus
build_flags     = -DHELMET=1
                  -DSHOW_VU_METER=1
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c-plus.build_flags}
board_build.partitions = config/partitions_custom_noota.csv

[env:spectrum_elecrow]
extends         = dev_elecrow_mesmerizer
build_flags     = -DSPECTRUM=1
                  -DSHOW_VU_METER=1
                  -DELECROW=1
                  -DUSE_SCREEN=1
                  -DTFT_WIDTH=320
                  -DTFT_HEIGHT=480
                  -DNUM_INFO_PAGES=2
                  ${psram_flags.build_flags}
                  ${remote_flags.build_flags}
                  ${dev_elecrow_mesmerizer.build_flags}
board_build.partitions = config/partitions_custom_8M.csv
board_upload.flash_size = 8MB
board_build.arduino.memory_type = dio_opi           ; Without this magic incantation, PSRAM will not work on this board

[env:spectrumstack]
extends         = dev_m5stack
build_flags     = -DSPECTRUM=1
                  -DSHOW_VU_METER=1
                  -DLOAD_GFXFF
                  ${psram_flags.build_flags}
                  ${remote_flags.build_flags}
                  ${dev_m5stack.build_flags}
board_build.partitions = config/partitions_custom_8M.csv

; Same as Spectrum but using a non-Plus M5 Stick (older version with smaller screen)
[env:spectrumlite]
extends         = dev_m5stick-c
build_flags     = -DSPECTRUM=1
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c.build_flags}
board_build.partitions = config/partitions_custom_noota.csv

; And again, for the Wrover
[env:spectrum_wrover_kit]
extends         = dev_wrover
build_flags     = -DSPECTRUM=1
                  -DUSE_SCREEN=1
                  -DSPECTRUM_WROVER_KIT=1
                  ${remote_flags.build_flags}
                  ${dev_wrover.build_flags}
debug_init_break = tbreak setup
board_build.partitions = config/partitions_custom_noota.csv

;===============

[env:mesmerizer]
extends         = dev_mesmerizer
build_flags     = ${mesmerizer_config.build_flags}
                  ${dev_mesmerizer.build_flags}
lib_deps        = ${dev_mesmerizer.lib_deps}
                  ${mesmerizer_config.lib_deps}
board_build.embed_files = ${mesmerizer_config.board_build.embed_files}
debug_tool      = ftdi

[env:mesmerizer_lolin]
extends         = dev_lolin_d32_pro
build_flags     = ${mesmerizer_config.build_flags}
                  ${dev_lolin_d32_pro.build_flags}
lib_deps        = ${dev_lolin_d32_pro.lib_deps}
                  ${mesmerizer_config.lib_deps}
board_build.embed_files = ${mesmerizer_config.board_build.embed_files}
board_build.partitions = config/partitions_custom_noota.csv

;==============

[env:laserline]
extends         = dev_m5stick-c-plus
build_flags     = -DLASERLINE=1
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c-plus.build_flags}

[env:lantern]
extends         = dev_m5stick-c
build_flags     = -DLANTERN=1
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c.build_flags}

[env:pdpgrid]
extends         = dev_m5stick-c-plus2
build_flags     = -DPDPGRID=1
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c-plus2.build_flags}

[env:chieftain]
extends         = dev_tinypico
build_flags     = -DCHIEFTAIN=1
                  ${unity_double_flags.build_flags}
                  ${dev_tinypico.build_flags}

[env:umbrella]
extends         = dev_esp32
build_flags     = -DUMBRELLA=1
                  -DUSE_SCREEN=0
                  ${remote_flags.build_flags}
                  ${unity_double_flags.build_flags}
                  ${dev_esp32.build_flags}

[env:generic]
extends         = dev_esp32
build_flags     = -DLEDSTRIP=1
                  ${dev_esp32.build_flags}

[env:panlee]
extends         = dev_esp32-s3
build_flags     = -DLEDSTRIP=1
                  -DUSE_SCREEN=1
                  -DUSE_TFTSPI=1
                  -DUSER_SETUP_LOADED=1
                  -DST7796_DRIVER=1
                  -DTFT_WIDTH=480
                  -DTFT_HEIGHT=320
                  -DUSE_HSPI_PORT=1
                  -DPIN_SDA=38
                  -DPIN_SCL=19
                  -DTFT_MISO=12
                  -DTFT_MOSI=13
                  -DTFT_SCLK=39
                  -DTFT_CS=15
                  -DTFT_DC=21
                  -DTFT_RST=22
                  -DTFT_BL=48
                  -DLOAD_GLCD
                  -DLOAD_FONT2
                  -DLOAD_FONT4
                  -DLOAD_FONT6
                  -DLOAD_FONT7
                  -DLOAD_FONT8
                  -DLOAD_GFXFF
                  -DSPI_FREQUENCY=27000000
                  -DSPI_READ_FREQUENCY=20000000
                  -DSPI_TOUCH_FREQUENCY=2500000
                  -DSMOOTH_FONT
                  -DNUM_INFO_PAGES=1
                  -DPANLEE=1
                  ${psram_flags.build_flags}
                  ${remote_flags.build_flags}
                  ${dev_esp32-s3.build_flags}
lib_deps        = ${dev_esp32-s3.lib_deps}
                  TFT_eSPI

[env:ttgo]
extends         = dev_esp32
build_flags     = -DTTGO=1
                  -DUSE_SCREEN=1
                  ${remote_flags.build_flags}
                  ${dev_esp32.build_flags}
lib_deps        = ${dev_esp32.lib_deps}
                  ${ttgo_deps.lib_deps}

[env:xmastrees]
extends         = dev_m5stick-c-plus
build_flags     = -DXMASTREES=1
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c-plus.build_flags}
board_build.partitions = config/partitions_custom_noota.csv

[env:insulators]
extends         = dev_m5stick-c-plus
build_flags     = -DINSULATORS=1
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c-plus.build_flags}

[env:magicmirror]
extends         = dev_m5stick-c
build_flags     = -DMAGICMIRROR=1
                  ${dev_m5stick-c.build_flags}
board_build.partitions = config/partitions_custom_noota.csv

[env:atomlight]
extends         = dev_esp32
build_flags     = -DATOMLIGHT=1
                  ${dev_esp32.build_flags}
                  -UUSE_SCREEN                      ; Unset USE_SCREEN that is set in the device build flags.
                                                    ; The ATOMLIGHT project really prefers not to use it.

[env:spirallamp]
extends         = dev_m5stick-c-plus
build_flags     = -DSPIRALLAMP=1
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c-plus.build_flags}
board_build.partitions = config/partitions_custom.csv

[env:platecover]
extends         = dev_m5stick-c-plus
build_flags     = -DPLATECOVER=1
                  -DFASTLED_EXPERIMENTAL_ESP32_RGBW_ENABLED=1
                  -DFASTLED_EXPERIMENTAL_ESP32_RGBW_MODE=kRGBWMaxBrightness
                  -DCOLOR_ORDER=EOrder::BRG
                  -DLEDTYPE=WS2812
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c-plus.build_flags}
board_build.partitions = config/partitions_custom.csv

[env:fanset]
extends         = dev_m5stick-c-plus
build_flags     = -DFANSET=1
                  ${remote_flags.build_flags}
                  ${dev_m5stick-c-plus.build_flags}
monitor_filters = esp32_exception_decoder
board_build.partitions = config/partitions_custom_noota.csv

[env:cube]
extends         = dev_m5stick-c-plus
build_flags     = -DCUBE=1
                  ${dev_m5stick-c-plus.build_flags}
board_build.partitions = config/partitions_custom_noota.csv
