Pulled the class out of main.cpp, made a header to go along with it, externed globals in headers to make them accessible to button code. Added button code to send an advert on double press. Refactored ini files to prevent linker errors.
84 lines
2.2 KiB
INI
84 lines
2.2 KiB
INI
|
|
; ----------- Generic ESP32-C3 ------------
|
|
|
|
[Generic_ESPNOW]
|
|
extends = esp32_base
|
|
board = esp32-c3-devkitm-1
|
|
;board = esp32-s3-devkitm-1
|
|
build_flags =
|
|
${esp32_base.build_flags}
|
|
-I variants/generic_espnow
|
|
; -D ESP32_CPU_FREQ=80
|
|
-D PIN_BOARD_SDA=-1
|
|
-D PIN_BOARD_SCL=-1
|
|
; -D P_LORA_TX_LED=8
|
|
-D PIN_USER_BTN=0
|
|
; -D ARDUINO_USB_MODE=1
|
|
; -D ARDUINO_USB_CDC_ON_BOOT=1
|
|
; -D ESPNOW_DEBUG_LOGGING=1
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${esp32_base.build_src_filter}
|
|
+<helpers/esp32/ESPNOWRadio.cpp>
|
|
+<../variants/generic_espnow>
|
|
|
|
[env:Generic_ESPNOW_terminal_chat]
|
|
extends = Generic_ESPNOW
|
|
build_flags =
|
|
${Generic_ESPNOW.build_flags}
|
|
-D MAX_CONTACTS=100
|
|
-D MAX_GROUP_CHANNELS=1
|
|
build_src_filter = ${Generic_ESPNOW.build_src_filter}
|
|
+<../examples/simple_secure_chat/main.cpp>
|
|
lib_deps =
|
|
${Generic_ESPNOW.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:Generic_ESPNOW_repeatr]
|
|
extends = Generic_ESPNOW
|
|
build_flags =
|
|
${Generic_ESPNOW.build_flags}
|
|
-D ADVERT_NAME='"ESPNOW Repeater"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D MAX_NEIGHBOURS=8
|
|
build_src_filter = ${Generic_ESPNOW.build_src_filter}
|
|
+<../examples/simple_repeater/main.cpp>
|
|
lib_deps =
|
|
${Generic_ESPNOW.lib_deps}
|
|
${esp32_ota.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:Generic_ESPNOW_comp_radio_usb]
|
|
extends = Generic_ESPNOW
|
|
build_flags =
|
|
${Generic_ESPNOW.build_flags}
|
|
-D MAX_CONTACTS=100
|
|
-D MAX_GROUP_CHANNELS=8
|
|
; -D ENABLE_PRIVATE_KEY_IMPORT=1
|
|
; -D ENABLE_PRIVATE_KEY_EXPORT=1
|
|
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
|
|
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
|
; NOTE: DO NOT ENABLE --> -D ESPNOW_DEBUG_LOGGING=1
|
|
build_src_filter = ${Generic_ESPNOW.build_src_filter}
|
|
+<../examples/companion_radio>
|
|
lib_deps =
|
|
${Generic_ESPNOW.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:Generic_ESPNOW_room_svr]
|
|
extends = Generic_ESPNOW
|
|
build_flags =
|
|
${Generic_ESPNOW.build_flags}
|
|
-D ADVERT_NAME='"Heltec Room"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D ROOM_PASSWORD='"hello"'
|
|
build_src_filter = ${Generic_ESPNOW.build_src_filter}
|
|
+<../examples/simple_room_server/main.cpp>
|
|
lib_deps =
|
|
${Generic_ESPNOW.lib_deps}
|
|
${esp32_ota.lib_deps}
|