[platformio]
default_envs = arduino-2, arduino-3, arduino-rc
lib_dir = .

; src_dir = examples/EnergyReset
; src_dir = examples/EnergyResetAsync
src_dir = examples/Read
; src_dir = examples/ReadAsync
; src_dir = examples/SetMaxSpeed
; src_dir = examples/ChangeSpeed
; src_dir = examples/PerfTest1
; src_dir = examples/PerfTest2
; src_dir = examples/Callback
; src_dir = examples/CallbackAsync
; src_dir = examples/Repair
; src_dir = examples/SwitchModeACDC

; src_dir = examples/raw/RawEnergyReset
; src_dir = examples/raw/RawSetSpeed
; src_dir = examples/raw/RawRead1
; src_dir = examples/raw/RawRead2
; src_dir = examples/raw/RawRead3
; src_dir = examples/raw/RawRead4
; src_dir = examples/raw/RawRead5

[env]
framework = arduino
board = esp32dev
build_flags = 
  -std=c++17
  -std=gnu++17
  -Wall -Wextra
  -D CONFIG_ARDUHAL_LOG_COLORS
  -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
  -D MYCILA_JSON_SUPPORT
  ; -D MYCILA_JSY_DEBUG
  ; -D RX2=16
  ; -D TX2=17
lib_deps = bblanchon/ArduinoJson @ 7.4.2
upload_protocol = esptool
monitor_speed = 115200
monitor_filters = esp32_exception_decoder, log2file
build_unflags =
    -std=gnu++11

[env:arduino-2]
platform = espressif32@6.12.0

[env:arduino-3]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.30-2/platform-espressif32.zip
; board = esp32-s3-devkitc-1
; board = esp32-c6-devkitc-1

[env:arduino-rc]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.20-rc2/platform-espressif32.zip
; board = esp32-s3-devkitc-1
; board = esp32-c6-devkitc-1

;  CI

[env:ci-arduino-2]
platform = espressif32@6.12.0
board = ${sysenv.PIO_BOARD}

[env:ci-arduino-3]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.30-2/platform-espressif32.zip
board = ${sysenv.PIO_BOARD}

[env:ci-arduino-rc]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.20-rc2/platform-espressif32.zip
board = ${sysenv.PIO_BOARD}
