[Mesh_pocket]
extends = nrf52_base
board = heltec_mesh_pocket
board_build.ldscript = boards/nrf52840_s140_v6.ld
build_flags =  ${nrf52_base.build_flags}
  -I src/helpers/nrf52
  -I lib/nrf52/s140_nrf52_6.1.1_API/include
  -I lib/nrf52/s140_nrf52_6.1.1_API/include/nrf52
  -I variants/mesh_pocket
  -D HELTEC_MESH_POCKET
  -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 EINK_DISPLAY_MODEL=GxEPD2_213_B74
  -D EINK_SCALE_X=1.953125f
  -D EINK_SCALE_Y=1.28f
  -D EINK_X_OFFSET=0
  -D EINK_Y_OFFSET=10
  -D DISPLAY_CLASS=GxEPDDisplay
  -D DISABLE_DIAGNOSTIC_OUTPUT
build_src_filter = ${nrf52_base.build_src_filter}
  +<helpers/*.cpp>
  +<../variants/mesh_pocket>
  +<helpers/ui/GxEPDDisplay.cpp>
lib_deps =
  ${nrf52_base.lib_deps}
  adafruit/Adafruit EPD @ 4.6.1
  rweather/Crypto @ ^0.4.0
  stevemarple/MicroNMEA @ ^2.0.6
  zinggjm/GxEPD2 @ 1.6.2
  bakercp/CRC32 @ ^2.0.0
debug_tool = jlink
upload_protocol = nrfutil

[env:Mesh_pocket_repeater]
extends = Mesh_pocket
extra_scripts = ${nrf52_lora_ota.extra_scripts}
build_src_filter = ${Mesh_pocket.build_src_filter}
  +<helpers/ota/*.cpp>
  +<../examples/simple_repeater>
build_flags =
  ${Mesh_pocket.build_flags}
  -D ADVERT_NAME='"Heltec_Mesh_Pocket Repeater"'
  -D ADVERT_LAT=0.0
  -D ADVERT_LON=0.0
  -D ADMIN_PASSWORD='"password"'
  -D MAX_NEIGHBOURS=50
  -D ENABLE_OTA=1
  -D OTA_FLASH_STORE=1
  -D OTA_FOLDER_SERIAL
;  -D MESH_PACKET_LOGGING=1
;  -D MESH_DEBUG=1

[env:Mesh_pocket_room_server]
extends = Mesh_pocket
build_src_filter = ${Mesh_pocket.build_src_filter}
  +<../examples/simple_room_server>
build_flags =
  ${Mesh_pocket.build_flags}
  -D ADVERT_NAME='"Heltec_Mesh_Pocket 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

[env:Mesh_pocket_companion_radio_ble]
extends = Mesh_pocket
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
board_upload.maximum_size = 712704
build_flags =
  ${Mesh_pocket.build_flags}
  -I examples/companion_radio/ui-new
  -D MAX_CONTACTS=350
  -D MAX_GROUP_CHANNELS=40
  -D BLE_PIN_CODE=123456
  -D OFFLINE_QUEUE_SIZE=256
  -D AUTO_OFF_MILLIS=0
;  -D BLE_DEBUG_LOGGING=1
;  -D MESH_PACKET_LOGGING=1
;  -D MESH_DEBUG=1

build_src_filter = ${Mesh_pocket.build_src_filter}
  +<helpers/nrf52/SerialBLEInterface.cpp>
  +<../examples/companion_radio/*.cpp>
  +<../examples/companion_radio/ui-new/*.cpp>
lib_deps =
  ${Mesh_pocket.lib_deps}
  densaugeo/base64 @ ~1.4.0

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

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