[env:thinknode_m5]
custom_meshtastic_hw_model = 107
custom_meshtastic_hw_model_slug = THINKNODE_M5
custom_meshtastic_architecture = esp32-s3
custom_meshtastic_actively_supported = true
custom_meshtastic_support_level = 1
custom_meshtastic_display_name = ThinkNode M5
custom_meshtastic_images = thinknode_m1.svg
custom_meshtastic_tags = Elecrow
custom_meshtastic_requires_dfu = false

extends = esp32s3_base
board = ESP32-S3-WROOM-1-N4
build_src_filter =
  ${esp32s3_base.build_src_filter}
  +<../variants/esp32s3/ELECROW-ThinkNode-M5>

build_flags =
  ${esp32s3_base.build_flags}
  -D ELECROW_ThinkNode_M5
  -I variants/esp32s3/ELECROW-ThinkNode-M5
  -DEINK_DISPLAY_MODEL=GxEPD2_154_D67
  -DEINK_WIDTH=200
  -DEINK_HEIGHT=200
  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk
  -DEINK_LIMIT_FASTREFRESH=10          ; How many consecutive fast-refreshes are permitted    //20
  -DEINK_LIMIT_RATE_BACKGROUND_SEC=10  ; Minimum interval between BACKGROUND updates          //30
  -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1   ; Minimum interval between RESPONSIVE updates
;   -DEINK_LIMIT_GHOSTING_PX=2000        ; (Optional) How much image ghosting is tolerated
  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.

lib_deps = ${esp32s3_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=PCA9557-arduino packageName=maxpromer/library/PCA9557-arduino
  maxpromer/PCA9557-arduino@1.0.0
  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
  lewisxhe/SensorLib@0.3.4