; 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 documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
default_envs = uno_linux
extra_configs = platformio_override.ini

[env]
platform = platformio/espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps =
    arminjo/ServoEasing
    madhephaestus/ESP32Servo@^3.0.6
    bblanchon/ArduinoJson@^6.21.5
    links2004/WebSockets@^2.6.1

[env:uno_linux]
upload_speed = 576000
upload_port = /dev/ttyUSB*
lib_deps =
    ${env.lib_deps}
    gin66/FastAccelStepper@^0.33.13
    h2zero/NimBLE-Arduino@^2.3.6

[env:uno_windows]
extra_scripts = pre:scripts/patch_legacy_esp32_libs.py
build_flags =
    -DEGGDUINO_WINDOWS_BUILD_FIXES=1
    -include $PROJECT_INCLUDE_DIR/ArduinoEsp32Compat.h
monitor_port = COM*
upload_port = COM8
lib_deps =
    ${env.lib_deps}
    gin66/FastAccelStepper@0.30.15
    h2zero/NimBLE-Arduino@2.2.3

[env:uno_macos]
monitor_port = /dev/cu.usb*
upload_port = /dev/cu.usb*
lib_deps =
    ${env.lib_deps}
    gin66/FastAccelStepper@^0.33.13
    h2zero/NimBLE-Arduino@^2.3.6
