; 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]
extra_configs =
  wifi_credentials.ini

[env:de-timer]
platform = espressif8266
framework = arduino
board = d1_mini

upload_protocol = esptool
upload_speed = 921600
;upload_port = 10.0.1.48
;upload_protocol = espota
;upload_flags =  
;   --auth=${wifi_cred.admin_password}

build_flags=
  !python git_rev_macro.py
  -DATOMIC_FS_UPDATE
  ;-DFEATURE_ENABLE_WIFI_CLIENT
  ;-DCAPTIVE
  -DWIFI_AP_IP_GW=10,0,1,1
  -DADMIN_PASSWORD=${wifi_cred.admin_password}
  -DWIFI_SSID=${wifi_cred.wifi_ssid}
  -DWIFI_PASSWORD=${wifi_cred.wifi_password}
  -DWIFI_AP_SSID=${wifi_cred.wifi_ap_ssid}
  -DWIFI_AP_PASSWORD=${wifi_cred.wifi_ap_password}
  -DDEVICE_NAME='"Dark Emergency Timer"'
  -DFACTION_1_NAME='"GOF"'
  -DFACTION_2_NAME='"MILIZ"'
  -DFACTION_3_NAME='"KGG"'

;build_type = debug

board_build.filesystem = littlefs
board_build.ldscript = eagle.flash.4m1m.ld
extra_scripts = post:prepare_littlefs.py

monitor_filters = esp8266_exception_decoder
monitor_speed = 115200

lib_deps = 
	;xreef/EByte LoRa E220 library@^1.0.6   ; made Lib local, due to changes for I2C-controller M0,M1-Pins
	sstaub/Ticker@^4.4.0
  robtillaart/PCF8574 @ ^0.3.7
	adafruit/Adafruit INA219 @ ^1.1.1
  akj7/TM1637 Driver @ ^2.1.2
  me-no-dev/ESPAsyncTCP @ ^1.2.2
  robtillaart/I2C_EEPROM @ ^1.5.2
  sandeepmistry/LoRa @ ^0.8.0
  bblanchon/ArduinoJson @ ^6.19.4