[LilyGo_T_Impulse_Plus]
extends = nrf52_base
board = lilygo_t_impulse_plus_nrf52840
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
build_flags = ${nrf52_base.build_flags}
  ${sensor_base.build_flags}
  -I variants/lilygo_t_impulse_plus
  -D USE_SX1262
  -D RADIO_CLASS=CustomSX1262
  -D WRAPPER_CLASS=CustomSX1262Wrapper
  -D LORA_TX_POWER=22
  -D SX126X_CURRENT_LIMIT=140
  -D SX126X_RX_BOOSTED_GAIN=1
  -D PIN_USER_BTN=-1
  ; -D PIN_USER_BTN=TTP223_KEY ; leave button disabled until screen implemented
  ; -D USER_BTN_PRESSED=HIGH
  -D PIN_WIRE_SDA=SCREEN_SDA
  -D PIN_WIRE_SCL=SCREEN_SCL
  -D ENV_PIN_SDA=IIC_SDA_2 ; firmware hangs without this
  -D ENV_PIN_SCL=IIC_SCL_2 ; firmware hangs without this
build_src_filter = ${nrf52_base.build_src_filter}
  +<TImpulsePlusBoard.cpp>
  +<../variants/lilygo_t_impulse_plus>
  +<helpers/ui/SSD1306Display.cpp>
  +<helpers/sensors>
lib_deps= ${nrf52_base.lib_deps}
  ${sensor_base.lib_deps}
  adafruit/Adafruit SSD1306 @ ^2.5.13
  adafruit/Adafruit GFX Library @ ^1.12.1

[env:LilyGo_T_Impulse_Plus_repeater]
extends = LilyGo_T_Impulse_Plus
build_src_filter = ${LilyGo_T_Impulse_Plus.build_src_filter}
  +<../examples/simple_repeater>
build_flags =
  ${LilyGo_T_Impulse_Plus.build_flags}
  -D ADVERT_NAME='"T-Impulse-Plus Repeater"'
  -D ADMIN_PASSWORD='"password"'
  -D MAX_NEIGHBOURS=50
;  -D MESH_PACKET_LOGGING=1
;  -D MESH_DEBUG=1
lib_deps = ${LilyGo_T_Impulse_Plus.lib_deps}
  adafruit/RTClib @ ^2.1.3

[env:LilyGo_T_Impulse_Plus_companion_radio_ble]
extends = LilyGo_T_Impulse_Plus
; board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
; board_upload.maximum_size = 712704
build_flags =
  ${LilyGo_T_Impulse_Plus.build_flags}
  -I src/helpers/ui
  -I examples/companion_radio/ui-new
  -D DISPLAY_CLASS=SSD1306Display
  -D MAX_CONTACTS=350
  -D MAX_GROUP_CHANNELS=40
  -D QSPIFLASH=1
  -D BLE_PIN_CODE=123456
  -D OFFLINE_QUEUE_SIZE=256
  ; -D BLE_DEBUG_LOGGING=1
  ; -D MESH_PACKET_LOGGING=1
  ; -D MESH_DEBUG=1
build_src_filter = ${LilyGo_T_Impulse_Plus.build_src_filter}
  +<helpers/nrf52/SerialBLEInterface.cpp>
  +<../examples/companion_radio/*.cpp>
  +<../examples/companion_radio/ui-new/*.cpp>
lib_deps =
  ${LilyGo_T_Impulse_Plus.lib_deps}
  densaugeo/base64 @ ~1.4.0

[env:LilyGo_T_Impulse_Plus_kiss_modem]
extends = LilyGo_T_Impulse_Plus
build_src_filter = ${LilyGo_T_Impulse_Plus.build_src_filter}
  +<../examples/kiss_modem/>
