[GAT562_Mesh_Tracker_Pro]
extends = rak4631_hw
board = rak4631
board_check = true
board_build.ldscript = boards/nrf52840_s140_v6.ld
build_flags = ${rak4631_hw.build_flags}
  ${sensor_base.build_flags}
  -I variants/gat562_mesh_tracker_pro
;  -D NRF52_POWER_MANAGEMENT
  -D PIN_BOARD_SCL=14
  -D PIN_BOARD_SDA=13
  -D PIN_OLED_RESET=-1
  -D UI_HAS_JOYSTICK=1
  -D RADIO_CLASS=CustomSX1262
  -D WRAPPER_CLASS=CustomSX1262Wrapper
  -D LORA_TX_POWER=22
  -D SX126X_CURRENT_LIMIT=140
  -D SX126X_RX_BOOSTED_GAIN=1
build_src_filter = ${rak4631_hw.build_src_filter}
  +<../variants/gat562_mesh_tracker_pro>
  +<helpers/ui/SSD1306Display.cpp>
  +<helpers/ui/MomentaryButton.cpp>
  +<helpers/sensors>
lib_deps =
  ${rak4631_hw.lib_deps}
  ${sensor_base.lib_deps}
  adafruit/Adafruit SSD1306 @ ^2.5.13
  sparkfun/SparkFun u-blox GNSS Arduino Library@^2.2.27


[env:GAT562_Mesh_Tracker_Pro_repeater]
extends = GAT562_Mesh_Tracker_Pro
build_flags =
  ${GAT562_Mesh_Tracker_Pro.build_flags}
  -UENABLE_OTA
  -D DISABLE_LORA_OTA=1                  ; Full external-sensor build exceeds the in-place OTA ceiling
  -D DISPLAY_CLASS=SSD1306Display
  -D ADVERT_NAME='"GAT562 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 = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
  +<helpers/ui/SSD1306Display.cpp>
  +<../examples/simple_repeater>

; Explicit lean alternative to the full-sensor, non-OTA repeater above.
[env:GAT562_Mesh_Tracker_Pro_repeater_lora_ota_no_external_sensors]
extends = GAT562_Mesh_Tracker_Pro
build_flags =
  ${GAT562_Mesh_Tracker_Pro.build_flags}
  ${nrf52_no_external_sensors.build_flags}
  -D DISPLAY_CLASS=SSD1306Display
  -D ADVERT_NAME='"GAT562 Repeater"'
  -D ADVERT_LAT=0.0
  -D ADVERT_LON=0.0
  -D ADMIN_PASSWORD='"password"'
  -D MAX_NEIGHBOURS=50
build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
  +<helpers/ui/SSD1306Display.cpp>
  +<../examples/simple_repeater>
lib_deps =
  ${nrf52_lora_ota.lib_deps}
  adafruit/Adafruit SSD1306 @ ^2.5.13


[env:GAT562_Mesh_Tracker_Pro_room_server]
extends = GAT562_Mesh_Tracker_Pro
build_flags =
  ${GAT562_Mesh_Tracker_Pro.build_flags}
  -D DISPLAY_CLASS=SSD1306Display
  -D ADVERT_NAME='"GAT562 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 = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
  +<helpers/ui/SSD1306Display.cpp>
  +<../examples/simple_room_server>


[env:GAT562_Mesh_Tracker_Pro_companion_radio_usb]
extends = GAT562_Mesh_Tracker_Pro
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
board_upload.maximum_size = 712704
build_flags =
  ${GAT562_Mesh_Tracker_Pro.build_flags}
  -I examples/companion_radio/ui-new
  -D DISPLAY_CLASS=SSD1306Display
  -D MAX_CONTACTS=350
  -D MAX_GROUP_CHANNELS=40
; NOTE: DO NOT ENABLE -->  -D MESH_PACKET_LOGGING=1
; NOTE: DO NOT ENABLE -->  -D MESH_DEBUG=1
build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
  +<../examples/companion_radio/*.cpp>
  +<../examples/companion_radio/ui-new/*.cpp>
lib_deps =
  ${GAT562_Mesh_Tracker_Pro.lib_deps}
  densaugeo/base64 @ ~1.4.0



[env:GAT562_Mesh_Tracker_Pro_companion_radio_ble]
extends = GAT562_Mesh_Tracker_Pro
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
board_upload.maximum_size = 712704
build_flags =
  ${GAT562_Mesh_Tracker_Pro.build_flags}
  -I examples/companion_radio/ui-new
  -D DISPLAY_CLASS=SSD1306Display
  -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 = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
  +<helpers/nrf52/SerialBLEInterface.cpp>
  +<helpers/ui/MomentaryButton.cpp>
  +<../examples/companion_radio/*.cpp>
  +<../examples/companion_radio/ui-new/*.cpp>
lib_deps =
  ${GAT562_Mesh_Tracker_Pro.lib_deps}
  densaugeo/base64 @ ~1.4.0

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