; 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_flags =
;  --port=8266
;  --auth=${wifi_cred.admin_password}

build_flags=
  -DATOMIC_FS_UPDATE
  -DFEATURE_ENABLE_WIFI_CLIENT
  ;-DFEATURE_ENABLE_LORA
  -DFEATURE_ENABLE_UARTLORA
  -DWIFI_AP_IP_GW=10,0,0,1
  -DADMIN_PASSWORD=${wifi_cred.admin_password}
  -DWIFI_SSID_CLIENT=${wifi_cred.wifi_ssid_client}
  -DWIFI_PASSWORD_CLIENT=${wifi_cred.wifi_password_client}
  -DADMIN_PASSWORD=${wifi_cred.admin_password}
  -DWIFI_AP_PASSWORD=${wifi_cred.wifi_ap_password}
  -DDEVICE_NAME='"Dark Emergency Timer"'

;build_type = debug

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

monitor_filters = esp8266_exception_decoder
monitor_speed = 115200

lib_ldf_mode = deep
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
  sstaub/Ticker @ ^4.4.0
  robtillaart/I2C_EEPROM @ ^1.8.2
  esphome/ESPAsyncWebServer-esphome @ ^3.2.2
  sandeepmistry/LoRa @ ^0.8.0
  bblanchon/ArduinoJson @ ^7.0.4