[LilyGo_TETH_Elite_sx1262]
extends = esp32_base
board = esp32s3box
board_build.partitions = default_16MB.csv
board_upload.flash_size = 16MB
build_flags =
  ${esp32_base.build_flags}
  -I variants/lilygo_teth_elite
  -D BOARD_HAS_PSRAM
  -D LILYGO_TETH_ELITE
  -D LILYGO_T_ETH_ELITE_ESP32S3
  -D ARDUINO_USB_CDC_ON_BOOT=1
  -D P_LORA_DIO_1=8
  -D P_LORA_NSS=40
  -D P_LORA_RESET=46
  -D P_LORA_BUSY=16
  -D P_LORA_SCLK=10
  -D P_LORA_MISO=9
  -D P_LORA_MOSI=11
  -D P_LORA_TX_LED=38
  -D SX126X_DIO2_AS_RF_SWITCH=true
  -D SX126X_DIO3_TCXO_VOLTAGE=1.8
  -D SX126X_CURRENT_LIMIT=140
  -D USE_SX1262
  -D RADIO_CLASS=CustomSX1262
  -D WRAPPER_CLASS=CustomSX1262Wrapper
  -D LORA_TX_POWER=8
  -D SX126X_RX_BOOSTED_GAIN=1
build_src_filter = ${esp32_base.build_src_filter}
  +<../variants/lilygo_teth_elite>
lib_deps =
  ${esp32_base.lib_deps}

[env:LilyGo_TETH_Elite_sx1262_repeater]
extends = LilyGo_TETH_Elite_sx1262
build_flags =
  ${LilyGo_TETH_Elite_sx1262.build_flags}
  -D ADVERT_NAME='"T-ETH Elite Repeater"'
  -D ADVERT_LAT=0.0
  -D ADVERT_LON=0.0
  -D ADMIN_PASSWORD='"password"'
  -D MAX_NEIGHBOURS=50
;  -D MESH_PACKET_LOGGING=1
;  -D MESH_DEBUG=1
build_src_filter = ${LilyGo_TETH_Elite_sx1262.build_src_filter}
  +<../examples/simple_repeater>
lib_deps =
  ${LilyGo_TETH_Elite_sx1262.lib_deps}
  ${esp32_ota.lib_deps}

[env:LilyGo_TETH_Elite_sx1262_room_server]
extends = LilyGo_TETH_Elite_sx1262
build_flags =
  ${LilyGo_TETH_Elite_sx1262.build_flags}
  -D ADVERT_NAME='"T-ETH Elite Room"'
  -D ADVERT_LAT=0.0
  -D ADVERT_LON=0.0
  -D ADMIN_PASSWORD='"password"'
  -D ROOM_PASSWORD='"hello"'
;  -D MESH_PACKET_LOGGING=1
;  -D MESH_DEBUG=1
build_src_filter = ${LilyGo_TETH_Elite_sx1262.build_src_filter}
  +<../examples/simple_room_server>
lib_deps =
  ${LilyGo_TETH_Elite_sx1262.lib_deps}
  ${esp32_ota.lib_deps}

[env:LilyGo_TETH_Elite_sx1262_companion_radio_usb]
extends = LilyGo_TETH_Elite_sx1262
build_flags =
  ${LilyGo_TETH_Elite_sx1262.build_flags}
  -D MAX_CONTACTS=350
  -D MAX_GROUP_CHANNELS=40
  -D OFFLINE_QUEUE_SIZE=256
  -D ENABLE_USB_INTERFACE
;  -D MESH_PACKET_LOGGING=1
;  -D MESH_DEBUG=1
build_src_filter = ${LilyGo_TETH_Elite_sx1262.build_src_filter}
  +<../examples/companion_radio/*.cpp>
lib_deps =
  ${LilyGo_TETH_Elite_sx1262.lib_deps}
  densaugeo/base64 @ ~1.4.0

[env:LilyGo_TETH_Elite_sx1262_companion_radio_ble]
extends = LilyGo_TETH_Elite_sx1262
build_flags =
  ${LilyGo_TETH_Elite_sx1262.build_flags}
  -D MAX_CONTACTS=350
  -D MAX_GROUP_CHANNELS=40
  -D BLE_PIN_CODE=123456
  -D BLE_DEBUG_LOGGING=1
  -D OFFLINE_QUEUE_SIZE=256
;  -D MESH_PACKET_LOGGING=1
;  -D MESH_DEBUG=1
build_src_filter = ${LilyGo_TETH_Elite_sx1262.build_src_filter}
  +<helpers/esp32/*.cpp>
  +<../examples/companion_radio/*.cpp>
lib_deps =
  ${LilyGo_TETH_Elite_sx1262.lib_deps}
  densaugeo/base64 @ ~1.4.0

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