; 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
;
; 2024-03-17

[platformio]
default_envs = ttgo-LILYGO_T3_V1_6
;default_envs = ttgo-t-beam-v1_SX1268
;default_envs = ttgo-t-beam-v1
;default_envs = ttgo-t-beam-v1_2

[env]
platform = espressif32 @ 6.3.1
framework = arduino
monitor_speed = 115200
monitor_filters = time
lib_ldf_mode = deep+

lib_deps =
	adafruit/Adafruit GFX Library @ 1.11.7
	adafruit/Adafruit SSD1306 @ 2.5.7
    adafruit/Adafruit SH110X@^2.1.8
    peterus/esp-logger @ 1.0.0
    adafruit/Adafruit Unified Sensor@^1.1.9
    adafruit/Adafruit BME280 Library@^2.2.2
    adafruit/Adafruit BME680 Library@^2.0.4
    adafruit/Adafruit BMP280 Library@^2.6.8
    robtillaart/SHT31@^0.5.0
    sstaub/NTP@^1.6
    knolleary/PubSubClient@^2.8
	ottowinter/ESPAsyncWebServer-esphome@^3.0.0
	esphome/AsyncTCP-esphome@2.1.1
	ayushsharma82/ElegantOTA@^3.1.0
	jgromes/RadioLib@^6.3.0
    lewisxhe/XPowersLib@^0.2.1
    sstaub/TickTwo@^4.4.0

check_tool = cppcheck
check_flags = 
	cppcheck: --suppress=*:*.pio\* --inline-suppr -DCPPCHECK
    check_skip_packages = yes
    board_build.partitions = no_ota.csv    

[common]
build_flags =
    -DELEGANTOTA_USE_ASYNC_WEBSERVER=1
    -DRADIOLIB_EXCLUDE_CC1101=1
    -DRADIOLIB_EXCLUDE_LLCC68=1
    -DRADIOLIB_EXCLUDE_NRF24=1
    -DRADIOLIB_EXCLUDE_RF69=1
    -DRADIOLIB_EXCLUDE_SX1231=1
    -DRADIOLIB_EXCLUDE_SX1233=1
    -DRADIOLIB_EXCLUDE_SI443X=1
    -DRADIOLIB_EXCLUDE_RFM2X=1
    -DRADIOLIB_EXCLUDE_AFSK=1
    -DRADIOLIB_EXCLUDE_HELLSCHREIBER=1
    -DRADIOLIB_EXCLUDE_MORSE=1
    -DRADIOLIB_EXCLUDE_RTTY=1
    -DRADIOLIB_EXCLUDE_SSTV=1
    -DRADIOLIB_EXCLUDE_AX25=1
    -DRADIOLIB_EXCLUDE_DIRECT_RECEIVE=1
    -DRADIOLIB_EXCLUDE_BELL=1
    -DRADIOLIB_EXCLUDE_PAGER=1
    -DRADIOLIB_EXCLUDE_FSK4=1
    -DRADIOLIB_EXCLUDE_APRS=1
    
[env:ttgo-t-beam-v1]
board = ttgo-t-beam
build_flags =
    -Werror
    -Wall
    -DTTGO_T_Beam_V1_0
    ;-DELEGANTOTA_USE_ASYNC_WEBSERVER=1

[env:ttgo-t-beam-v1_2]
board = ttgo-t-beam
build_flags =
    -Werror
    -Wall
    -DTTGO_T_Beam_V1_2
    ;-DELEGANTOTA_USE_ASYNC_WEBSERVER=1

[env:ttgo-t-beam-v1_SX1268]
board = ttgo-t-beam
build_flags =
    -Werror
    -Wall
    -DTTGO_T_Beam_V1_0_SX1268
    ;-DELEGANTOTA_USE_ASYNC_WEBSERVER=1

[env:ttgo-LILYGO_T3_V1_6]
board = ttgo-lora32-v21
build_flags =
    ${common.build_flags}
    -Werror
    -Wall
    -DLILYGO_T3_V1_6
    ;-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
