; 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 = ttgo-lora32-v21

[env]
platform = espressif32 @ 6.7.0
board_build.partitions = min_spiffs.csv
framework = arduino
monitor_speed = 115200
board_build.embed_files = 
	data_embed/index.html.gz
	data_embed/style.css.gz
	data_embed/script.js.gz
	data_embed/bootstrap.css.gz
	data_embed/bootstrap.js.gz
	data_embed/favicon.png.gz
extra_scripts = 
	pre:tools/compress.py
debug_tool = esp-prog

[common]
lib_deps = 
	jgromes/RadioLib @ 6.6.0
	mikalhart/TinyGPSPlus @ 1.0.3
	bblanchon/ArduinoJson @ 6.21.3
	adafruit/Adafruit Unified Sensor @ 1.1.14
	adafruit/Adafruit BME280 Library @ 2.2.4
	adafruit/Adafruit BMP280 Library @ 2.6.8
	adafruit/Adafruit BME680 Library @ 2.0.4
	adafruit/Adafruit Si7021 Library @ 1.5.3
	ayushsharma82/ElegantOTA @ 3.1.5
	mathieucarbou/ESPAsyncWebServer @ 3.2.3
	mathieucarbou/AsyncTCP @ 3.2.5
	arduino-libraries/NTPClient @ 3.2.1

[env:ttgo-lora32-v21]
board = ttgo-lora32-v21
build_flags = 
	-Werror -Wall
	-DTTGO_T_LORA32_V2_1
	-DHAS_SX1278
	-DHAS_ADC_CALIBRATION
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:ttgo-lora32-v21_915]
board = ttgo-lora32-v21
build_flags = 
	-Werror -Wall
	-DTTGO_T_LORA32_V2_1_915
	-DHAS_SX1276
	-DHAS_ADC_CALIBRATION
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:heltec-lora32-v2]
board = ttgo-lora32-v21
build_flags = 
	-Werror -Wall
	-DHELTEC_V2
	-DHAS_SX1278
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:heltec_wifi_lora_32_V3]
board = heltec_wifi_lora_32_V3
board_build.mcu = esp32s3
build_flags = 
	-Werror -Wall
	-DHELTEC_V3
	-DHAS_SX1262
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:heltec_wireless_stick]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags = 
	-Werror -Wall
	-DHELTEC_WS
	-DHAS_SX1262
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:heltec_wireless_stick_lite_v3]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags = 
	-Werror -Wall
	-DHELTEC_WSL_V3
	-DHAS_SX1262
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}

[env:heltec_wireless_stick_lite_v3_display]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags = 
	-Werror -Wall
	-DHELTEC_WSL_V3_DISPLAY
	-DHAS_SX1262
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}

[env:ESP32_DIY_LoRa]
board = esp32dev
build_flags = 
	-Werror -Wall
	-DESP32_DIY_LoRa
	-DHAS_SX1278
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:ESP32_DIY_LoRa_915]
board = esp32dev
build_flags = 
	-Werror -Wall
	-DESP32_DIY_LoRa_915
	-DHAS_SX1276
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:ESP32_DIY_1W_LoRa]
board = esp32dev
build_flags = 
	-Werror -Wall
	-DESP32_DIY_1W_LoRa
	-DHAS_SX1268
	-DHAS_1W_LORA
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:ESP32_DIY_1W_LoRa_915]
board = esp32dev
build_flags = 
	-Werror -Wall
	-DESP32_DIY_1W_LoRa_915
	-DHAS_SX1262
	-DHAS_1W_LORA
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:ESP32_DIY_1W_LoRa_LLCC68]
board = esp32dev
build_flags = 
	-Werror -Wall
 	-DESP32_DIY_1W_LoRa_LLCC68
 	-DHAS_LLCC68
 	-DHAS_1W_LORA
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
 	${common.lib_deps}
 	adafruit/Adafruit GFX Library @ 1.11.9
 	adafruit/Adafruit SSD1306 @ 2.5.10

[env:ESP32_DIY_1W_LoRa_Mesh_V1_2]
board = esp32dev
build_flags = 
	-Werror -Wall
	-DESP32_DIY_1W_LoRa_Mesh_V1_2
	-DHAS_SX1268
	-DHAS_1W_LORA
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10


[env:ttgo-t-beam-v1_2]
board = ttgo-t-beam
build_flags = 
	-Werror -Wall
	-DTTGO_T_Beam_V1_2
	-DHAS_SX1278
	-DHAS_AXP2101
	-DHAS_GPS
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10
	lewisxhe/XPowersLib @ 0.2.4

[env:ttgo-t-beam-v1_2_915]
board = ttgo-t-beam
build_flags = 
	-Werror -Wall
	-DTTGO_T_Beam_V1_2_915
	-DHAS_SX1276
	-DHAS_AXP2101
	-DHAS_GPS
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10
	lewisxhe/XPowersLib @ 0.2.4

[env:ttgo-t-beam-v1]
board = ttgo-t-beam
build_flags = 
	-Werror -Wall
	-DTTGO_T_Beam_V1_0
	-DHAS_SX1278
	-DHAS_AXP192
	-DHAS_GPS
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10
	lewisxhe/XPowersLib @ 0.2.4

[env:ttgo-t-beam-v1_915]
board = ttgo-t-beam
build_flags = 
	-Werror -Wall
	-DTTGO_T_Beam_V1_0_915
	-DHAS_SX1276
	-DHAS_AXP192
	-DHAS_GPS
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10
	lewisxhe/XPowersLib @ 0.2.4

[env:ttgo-t-beam-v1_SX1268]
board = ttgo-t-beam
build_flags = 
	-Werror -Wall
	-DTTGO_T_Beam_V1_0_SX1268
	-DHAS_SX1268
	-DHAS_AXP192
	-DHAS_GPS
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10
	lewisxhe/XPowersLib @ 0.2.4

[env:ttgo-t-beam-v1_2_SX1262]
board = ttgo-t-beam
build_flags = 
	-Werror -Wall
	-DTTGO_T_Beam_V1_2_SX1262
	-DHAS_SX1262
	-DHAS_AXP2101
	-DHAS_GPS
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10
	lewisxhe/XPowersLib @ 0.2.4

[env:ESP32_DIY_LoRa_A7670]
board = esp32dev
build_flags = 
	-Werror -Wall
	-DESP32_DIY_LoRa_A7670
	-DHAS_SX1278
	-DHAS_A7670
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10
	vshymanskyy/TinyGSM @ 0.12.0
	vshymanskyy/StreamDebugger @ 1.0.1

[env:ESP32_DIY_LoRa_A7670_915]
board = esp32dev
build_flags = 
	-Werror -Wall
	-DESP32_DIY_LoRa_A7670_915
	-DHAS_SX1276
	-DHAS_A7670
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10
	vshymanskyy/TinyGSM @ 0.12.0
	vshymanskyy/StreamDebugger @ 1.0.1


[env:heltec_wireless_tracker]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags = 
	-Werror -Wall
	-DHELTEC_WIRELESS_TRACKER
	-DHAS_SX1262
	-DHAS_GPS
	-DGPS_BAUDRATE=115200
	-DHAS_TFT
	-D USER_SETUP_LOADED
	-D TFT_WIDTH=80
	-D TFT_HEIGHT=160
	-D ST7735_DRIVER
	-D ST7735_GREENTAB160x80
	-D TFT_RGB_ORDER=TFT_BGR
	-D TFT_MOSI=42
	-D TFT_SCLK=41
	-D TFT_CS=38
	-D TFT_DC=40
	-D TFT_RST=39
	-D TFT_BL=21
	-D TFT_BACKLIGHT_ON=1
	-D TOUCH_CS=-1
	-D LOAD_GLCD
	-D LOAD_FONT2
	-D LOAD_FONT4
	-D LOAD_FONT6
	-D LOAD_FONT7
	-D LOAD_FONT8
	-D SPI_FREQUENCY=27000000
	-D USE_HSPI_PORT
	-DARDUINO_USB_MODE=1
	-DARDUINO_USB_CDC_ON_BOOT=1
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	bodmer/TFT_eSPI @ 2.5.43

[env:heltec_ht-ct62]
board = heltec_wireless_stick_lite
board_build.mcu = esp32c3
build_flags = 
	-Werror -Wall
	-DHELTEC_HTCT62
	-DHAS_SX1262
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:heltec_wireless_paper]
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags =
	-Werror -Wall
	-DHELTEC_WP
	-DHAS_SX1262
	-DHAS_EPAPER
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
	${common.lib_deps}


[env:OE5HWN_MeshCom]
board = esp32dev
build_flags = 
	-Werror -Wall
	-DOE5HWN_MeshCom
	-DHAS_SX1268
	-DHAS_1W_LORA
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:WEMOS-LOLIN32-OLED-DIY]
board = lolin32
build_flags = 
	-Werror -Wall
	-DWEMOS_LOLIN32_OLED_DIY_LoRa
	-DHAS_SX1278
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:WEMOS-D1-R32-RA02]
board = wemos_d1_uno32
build_flags = 
	-Werror -Wall
	-DWEMOS_D1_R32_RA02
	-DHAS_SX1278
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:WEMOS_S2_MINI_DIY_LoRa]
board = lolin_s2_mini
build_flags = 
	-Werror -Wall
	-DWEMOS_S2_MINI_DIY_LoRa
	-DHAS_SX1278
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps = 
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:esp32c3_DIY_1W_LoRa]
board = esp32-c3-devkitm-1
board_build.mcu = esp32c3
build_flags =
	-Werror -Wall
	-DESP32C3_DIY_1W_LoRa
	-DHAS_SX1268
	-DHAS_1W_LORA
	-DARDUINO_USB_MODE=1
	-DARDUINO_USB_CDC_ON_BOOT=1
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:esp32c3_DIY_1W_LoRa_915]
board = esp32-c3-devkitm-1
board_build.mcu = esp32c3
build_flags =
	-Werror -Wall
	-DESP32C3_DIY_1W_LoRa_915
	-DHAS_SX1262
	-DHAS_1W_LORA
	-DARDUINO_USB_MODE=1
	-DARDUINO_USB_CDC_ON_BOOT=1
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10

[env:ESP32_C3_OctopusLab_LoRa]
board = esp32-c3-devkitm-1
board_build.mcu = esp32c3
build_flags =
	-Werror -Wall
	-DESP32_C3_OctopusLab_LoRa
	-DHAS_SX1268
	-DRADIO_HAS_XTAL
	-DARDUINO_USB_MODE=1
	-DARDUINO_USB_CDC_ON_BOOT=1
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
	${common.lib_deps}
	adafruit/Adafruit GFX Library @ 1.11.9
	adafruit/Adafruit SSD1306 @ 2.5.10