[ThinkNode_M7]
extends = esp32_base
board = thinknode_m7
build_flags = ${esp32_base.build_flags}
  -I src/helpers/esp32
  -I variants/thinknode_m7
  -I src/helpers/sensors
  -I src/helpers/ui
  -D THINKNODE_M7
  -D PIN_USER_BTN_ANA=4
  -D PIN_STATUS_LED=3 ; green
  -D LED_STATE_ON=LOW
  -D RADIO_CLASS=CustomLR1110
  -D WRAPPER_CLASS=CustomLR1110Wrapper
  -D USE_LR1110
  -D LORA_TX_POWER=22
  -D RF_SWITCH_TABLE
  -D RX_BOOSTED_GAIN=true
  -D P_LORA_BUSY=13
  -D P_LORA_SCLK=11
  -D P_LORA_NSS=12
  -D P_LORA_DIO_1=38
  -D P_LORA_MISO=9
  -D P_LORA_MOSI=10
  -D P_LORA_RESET=39
  -D P_LORA_TX_LED=46 ; blue
  -D LR11X0_DIO_AS_RF_SWITCH=true
  -D LR11X0_DIO3_TCXO_VOLTAGE=1.8
build_src_filter = ${esp32_base.build_src_filter}
  +<helpers/*.cpp>
  +<helpers/sensors/EnvironmentSensorManager.cpp>
  +<helpers/ui/MomentaryButton.cpp>
  +<../variants/thinknode_m7>
lib_deps = ${esp32_base.lib_deps}
  stevemarple/MicroNMEA @ ^2.0.6

[env:ThinkNode_M7_repeater]
extends = ThinkNode_M7
build_src_filter = ${ThinkNode_M7.build_src_filter}
  +<../examples/simple_repeater/*.cpp>
build_flags =
  ${ThinkNode_M7.build_flags}
  -D ADVERT_NAME='"ThinkNode M7 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
lib_deps =
  ${ThinkNode_M7.lib_deps}
  ${esp32_ota.lib_deps}

[env:ThinkNode_M7_room_server]
extends = ThinkNode_M7
build_src_filter = ${ThinkNode_M7.build_src_filter}
  +<../examples/simple_room_server>
build_flags =
  ${ThinkNode_M7.build_flags}
  -D ADVERT_NAME='"ThinkNode M7 Room Server"'
  -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
lib_deps =
  ${ThinkNode_M7.lib_deps}
  ${esp32_ota.lib_deps}

[env:ThinkNode_M7_companion_radio_ble]
extends = ThinkNode_M7
build_flags =
  ${ThinkNode_M7.build_flags}
  -I examples/companion_radio/ui-orig
  -D DISPLAY_CLASS=NullDisplayDriver
  -D MAX_CONTACTS=350
  -D MAX_GROUP_CHANNELS=40
  -D BLE_PIN_CODE=123456
  -D OFFLINE_QUEUE_SIZE=256
  ; -D BLE_DEBUG_LOGGING=1
  ; -D MESH_PACKET_LOGGING=1
build_src_filter = ${ThinkNode_M7.build_src_filter}
  +<helpers/esp32/*.cpp>
  +<helpers/ui/MomentaryButton.cpp>
  +<../examples/companion_radio/*.cpp>
  +<../examples/companion_radio/ui-orig/*.cpp>
lib_deps =
  ${ThinkNode_M7.lib_deps}
  densaugeo/base64 @ ~1.4.0

[env:ThinkNode_M7_companion_radio_usb]
extends = ThinkNode_M7
build_flags =
  ${ThinkNode_M7.build_flags}
  -I examples/companion_radio/ui-orig
  -D MAX_CONTACTS=350
  -D MAX_GROUP_CHANNELS=40
  -D OFFLINE_QUEUE_SIZE=256
build_src_filter = ${ThinkNode_M7.build_src_filter}
  +<helpers/esp32/*.cpp>
  +<helpers/ui/MomentaryButton.cpp>
  +<../examples/companion_radio/*.cpp>
  +<../examples/companion_radio/ui-orig/*.cpp>
lib_deps =
  ${ThinkNode_M7.lib_deps}
  densaugeo/base64 @ ~1.4.0

[env:ThinkNode_M7_companion_radio_wifi]
extends = ThinkNode_M7
build_flags =
  ${ThinkNode_M7.build_flags}
  -I examples/companion_radio/ui-orig
  -D MAX_CONTACTS=350
  -D MAX_GROUP_CHANNELS=40
  -D DISPLAY_CLASS=NullDisplayDriver
  -D WIFI_DEBUG_LOGGING=1
  -D WIFI_SSID='"myssid"'
  -D WIFI_PWD='"mypwd"'
  -D OFFLINE_QUEUE_SIZE=256
  -D MESH_PACKET_LOGGING=1
build_src_filter = ${ThinkNode_M7.build_src_filter}
  +<helpers/esp32/*.cpp>
  +<helpers/ui/MomentaryButton.cpp>
  +<../examples/companion_radio/*.cpp>
  +<../examples/companion_radio/ui-orig/*.cpp>
lib_deps =
  ${ThinkNode_M7.lib_deps}
  densaugeo/base64 @ ~1.4.0

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