; 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=
	m5stack-atom
	m5stack-atom-canunit
	m5stickc-atom-canunit
	nodemcu-homberger
extra_configs=
	lib/*task*/platformio.ini

[env]
platform = espressif32
framework = arduino
lib_deps = 
	ttlappalainen/NMEA2000-library @ ^4.17.2
	ttlappalainen/NMEA2000_esp32 @ ^1.0.3
	ttlappalainen/NMEA0183 @ ^1.7.1
	bblanchon/ArduinoJson@^6.18.5
	ottowinter/ESPAsyncWebServer-esphome@^2.0.1
	fastled/FastLED @ ^3.4.0
board_build.embed_files = 
	lib/generated/index.html.gz
	lib/generated/index.js.gz
	lib/generated/index.css.gz
	lib/generated/config.json.gz
	lib/generated/xdrconfig.json.gz
	lib/generated/md5.js.gz
board_build.partitions = partitions_custom.csv	
extra_scripts = 
	pre:extra_script.py
	post:post.py
lib_ldf_mode = chain+	
monitor_speed = 115200
build_flags = 
	-D PIO_ENV_BUILD=$PIOENV

[env:m5stack-atom]
board = m5stack-atom
lib_deps = ${env.lib_deps}
build_flags = 
	-D BOARD_M5ATOM
	${env.build_flags}
upload_port = /dev/esp32
upload_protocol = esptool

[env:m5stack-atom-canunit]
board = m5stack-atom
lib_deps = ${env.lib_deps}
build_flags = 
	-D BOARD_M5ATOM_CANUNIT
	${env.build_flags}
upload_port = /dev/esp32
upload_protocol = esptool

[env:m5stickc-atom-canunit]
board = m5stick-c
lib_deps = ${env.lib_deps}
build_flags = 
	-D BOARD_M5STICK_CANUNIT -D HAS_RTC -D HAS_M5LCD
	${env.build_flags}
upload_port = /dev/esp32
upload_protocol = esptool

[env:nodemcu-homberger]
board = nodemcu-32s
lib_deps = ${env.lib_deps}
build_flags = 
	-D BOARD_HOMBERGER
	${env.build_flags}
upload_port = /dev/esp32
upload_protocol = esptool
