; Using original screen class
[env:t-echo]
custom_meshtastic_hw_model = 7
custom_meshtastic_hw_model_slug = T_ECHO
custom_meshtastic_architecture = nrf52840
custom_meshtastic_actively_supported = true
custom_meshtastic_support_level = 1
custom_meshtastic_display_name = LILYGO T-Echo
custom_meshtastic_images = t-echo.svg
custom_meshtastic_tags = LilyGo
custom_meshtastic_has_ink_hud = true

extends = nrf52840_base
board = t-echo
board_level = pr
board_check = true
debug_tool = jlink

# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.
build_flags = ${nrf52840_base.build_flags}
  -Ivariants/nrf52840/t-echo
  -DEINK_DISPLAY_MODEL=GxEPD2_154_D67
  -DEINK_WIDTH=200
  -DEINK_HEIGHT=200
  -DUSE_EINK
  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk
  -DEINK_LIMIT_FASTREFRESH=20          ; How many consecutive fast-refreshes are permitted
  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.

build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/t-echo>
lib_deps = 
  ${nrf52840_base.lib_deps}
  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip
  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
  lewisxhe/SensorLib@0.3.4
;upload_protocol = fs

[env:t-echo-inkhud]
extends = nrf52840_base, inkhud
board = t-echo
board_level = pr
board_check = true
debug_tool = jlink
build_flags = 
  ${nrf52840_base.build_flags}
  ${inkhud.build_flags}
  -I variants/nrf52840/t-echo
build_src_filter = 
  ${nrf52_base.build_src_filter} 
  ${inkhud.build_src_filter}
  +<../variants/nrf52840/t-echo>
lib_deps = 
  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
  ${nrf52840_base.lib_deps}
  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
  lewisxhe/SensorLib@0.3.4
