Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pr-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on:
branches: [main, dev]
paths:
- 'src/**'
- 'examples/**'
- 'meshcore/**'
- 'variants/**'
- 'platformio.ini'
- '.github/workflows/pr-build-check.yml'
push:
branches: [main, dev]
paths:
- 'src/**'
- 'examples/**'
- 'meshcore/**'
- 'variants/**'
- 'platformio.ini'
- '.github/workflows/pr-build-check.yml'
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Thanks for considering contributing to this project!
- Bad: `update`
- Reference any related issue (`Fixes #123`, `Closes #89`, etc.)
- If you change public API, update README.md and library.properties
- New features should include an example sketch in `examples/`
- New features should include an example sketch in `meshcore/`

## Coding Style

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ For developers;
- Install [PlatformIO](https://docs.platformio.org) in [Visual Studio Code](https://code.visualstudio.com).
- Clone and open the MeshCore repository in Visual Studio Code.
- See the example applications you can modify and run:
- [Companion Radio](./examples/companion_radio) - For use with an external chat app, over BLE, USB or WiFi.
- [KISS Modem](./examples/kiss_modem) - Serial KISS protocol bridge for host applications. ([protocol docs](./docs/kiss_modem_protocol.md))
- [Simple Repeater](./examples/simple_repeater) - Extends network coverage by relaying messages.
- [Simple Room Server](./examples/simple_room_server) - A simple BBS server for shared Posts.
- [Simple Secure Chat](./examples/simple_secure_chat) - Secure terminal based text communication between devices.
- [Simple Sensor](./examples/simple_sensor) - Remote sensor node with telemetry and alerting.
- [Companion Radio](./meshcore/companion_radio) - For use with an external chat app, over BLE, USB or WiFi.
- [KISS Modem](./meshcore/kiss_modem) - Serial KISS protocol bridge for host applications. ([protocol docs](./docs/kiss_modem_protocol.md))
- [Simple Repeater](./meshcore/simple_repeater) - Extends network coverage by relaying messages.
- [Simple Room Server](./meshcore/simple_room_server) - A simple BBS server for shared Posts.
- [Simple Secure Chat](./meshcore/simple_secure_chat) - Secure terminal based text communication between devices.
- [Simple Sensor](./meshcore/simple_sensor) - Remote sensor node with telemetry and alerting.

The Simple Secure Chat example can be interacted with through the Serial Monitor in Visual Studio Code, or with a Serial USB Terminal on Android.

Expand Down
6 changes: 3 additions & 3 deletions build_as_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@
# INCLUDE EXAMPLE CODE IN BUILD (to provide your own support files without touching the tree)
elif isinstance(item, tuple) and item[0] == "BUILD_EXAMPLE":
example_name = item[1]
src_filter.append(f"+<../examples/{example_name}/*.cpp>")
src_filter.append(f"+<../meshcore/{example_name}/*.cpp>")

# EXCLUDE A SOURCE FILE FROM AN EXAMPLE (must be placed after example name or boom)
elif isinstance(item, tuple) and item[0] == "EXCLUDE_FROM_EXAMPLE":
exclude_name = item[1]
if example_name is None:
print("***** PLEASE DEFINE EXAMPLE FIRST *****")
break
src_filter.append(f"-<../examples/{example_name}/{exclude_name}>")
src_filter.append(f"-<../meshcore/{example_name}/{exclude_name}>")

# DEAL WITH UI VARIANT FOR AN EXAMPLE
elif isinstance(item, tuple) and item[0] == "MC_UI_FLAVOR":
ui_flavor = item[1]
if example_name is None:
print("***** PLEASE DEFINE EXAMPLE FIRST *****")
break
src_filter.append(f"+<../examples/{example_name}/{ui_flavor}/*.cpp>")
src_filter.append(f"+<../meshcore/{example_name}/{ui_flavor}/*.cpp>")

menv.Replace(SRC_FILTER=src_filter)

Expand Down
2 changes: 1 addition & 1 deletion docs/companion_protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ Bytes 1-6: ACK Code (6 bytes, hex)

### Error Codes

`PACKET_ERROR` (0x01) carries a single-byte error code in byte 1. Values match the `ERR_CODE_*` constants defined in `examples/companion_radio/MyMesh.cpp`:
`PACKET_ERROR` (0x01) carries a single-byte error code in byte 1. Values match the `ERR_CODE_*` constants defined in `meshcore/companion_radio/MyMesh.cpp`:

| Code | Constant (firmware) | Description |
|------|----------------------------|------------------------------------------------------------------------------|
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions variants/ebyte_eora_s3/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ build_flags =
; -D MESH_DEBUG=1
build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
+<../meshcore/simple_repeater>
lib_deps =
${Ebyte_EoRa-S3.lib_deps}
${esp32_ota.lib_deps}
Expand All @@ -70,7 +70,7 @@ build_flags =
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
+<../examples/simple_secure_chat/main.cpp>
+<../meshcore/simple_secure_chat/main.cpp>
lib_deps =
${Ebyte_EoRa-S3.lib_deps}
densaugeo/base64 @ ~1.4.0
Expand All @@ -89,7 +89,7 @@ build_flags =
; -D MESH_DEBUG=1
build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
+<../meshcore/simple_room_server>
lib_deps =
${Ebyte_EoRa-S3.lib_deps}
${esp32_ota.lib_deps}
Expand All @@ -98,7 +98,7 @@ lib_deps =
extends = Ebyte_EoRa-S3
build_flags =
${Ebyte_EoRa-S3.build_flags}
-I examples/companion_radio/ui-new
-I meshcore/companion_radio/ui-new
-D DISPLAY_CLASS=SSD1306Display
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
Expand All @@ -107,8 +107,8 @@ build_flags =
build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<../meshcore/companion_radio/*.cpp>
+<../meshcore/companion_radio/ui-new/*.cpp>
lib_deps =
${Ebyte_EoRa-S3.lib_deps}
densaugeo/base64 @ ~1.4.0
Expand All @@ -117,7 +117,7 @@ lib_deps =
extends = Ebyte_EoRa-S3
build_flags =
${Ebyte_EoRa-S3.build_flags}
-I examples/companion_radio/ui-new
-I meshcore/companion_radio/ui-new
-D DISPLAY_CLASS=SSD1306Display
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
Expand All @@ -130,13 +130,13 @@ build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/ui/SSD1306Display.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<../meshcore/companion_radio/*.cpp>
+<../meshcore/companion_radio/ui-new/*.cpp>
lib_deps =
${Ebyte_EoRa-S3.lib_deps}
densaugeo/base64 @ ~1.4.0

[env:Ebyte_EoRa-S3_kiss_modem]
extends = Ebyte_EoRa-S3
build_src_filter = ${Ebyte_EoRa-S3.build_src_filter}
+<../examples/kiss_modem/>
+<../meshcore/kiss_modem/>
18 changes: 9 additions & 9 deletions variants/gat562_30s_mesh_kit/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ build_flags =
; -D MESH_DEBUG=1
build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
+<../meshcore/simple_repeater>


[env:GAT562_30S_Mesh_Kit_room_server]
Expand All @@ -62,7 +62,7 @@ build_flags =
; -D MESH_DEBUG=1
build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
+<../meshcore/simple_room_server>


[env:GAT562_30S_Mesh_Kit_companion_radio_usb]
Expand All @@ -71,15 +71,15 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
board_upload.maximum_size = 712704
build_flags =
${GAT562_30S_Mesh_Kit.build_flags}
-I examples/companion_radio/ui-new
-I meshcore/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_30S_Mesh_Kit.build_src_filter}
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<../meshcore/companion_radio/*.cpp>
+<../meshcore/companion_radio/ui-new/*.cpp>
+<helpers/ui/buzzer.cpp>
lib_deps =
${GAT562_30S_Mesh_Kit.lib_deps}
Expand All @@ -93,7 +93,7 @@ board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
board_upload.maximum_size = 712704
build_flags =
${GAT562_30S_Mesh_Kit.build_flags}
-I examples/companion_radio/ui-new
-I meshcore/companion_radio/ui-new
-D DISPLAY_CLASS=SSD1306Display
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
Expand All @@ -105,8 +105,8 @@ build_flags =
build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<helpers/ui/buzzer.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<../meshcore/companion_radio/*.cpp>
+<../meshcore/companion_radio/ui-new/*.cpp>
lib_deps =
${GAT562_30S_Mesh_Kit.lib_deps}
densaugeo/base64 @ ~1.4.0
Expand All @@ -115,4 +115,4 @@ lib_deps =
[env:GAT562_30S_Mesh_Kit_kiss_modem]
extends = GAT562_30S_Mesh_Kit
build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
+<../examples/kiss_modem/>
+<../meshcore/kiss_modem/>
6 changes: 3 additions & 3 deletions variants/gat562_mesh_evb_pro/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ build_flags =
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${GAT562_Mesh_EVB_Pro.build_src_filter}
+<../examples/simple_repeater>
+<../meshcore/simple_repeater>


[env:GAT562_Mesh_EVB_Pro_room_server]
Expand All @@ -49,9 +49,9 @@ build_flags =
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${GAT562_Mesh_EVB_Pro.build_src_filter}
+<../examples/simple_room_server>
+<../meshcore/simple_room_server>

[env:GAT562_Mesh_EVB_Pro_kiss_modem]
extends = GAT562_Mesh_EVB_Pro
build_src_filter = ${GAT562_Mesh_EVB_Pro.build_src_filter}
+<../examples/kiss_modem/>
+<../meshcore/kiss_modem/>
18 changes: 9 additions & 9 deletions variants/gat562_mesh_tracker_pro/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ build_flags =
; -D MESH_DEBUG=1
build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
+<../meshcore/simple_repeater>


[env:GAT562_Mesh_Tracker_Pro_room_server]
Expand All @@ -58,7 +58,7 @@ build_flags =
; -D MESH_DEBUG=1
build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
+<../meshcore/simple_room_server>


[env:GAT562_Mesh_Tracker_Pro_companion_radio_usb]
Expand All @@ -67,15 +67,15 @@ 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
-I meshcore/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>
+<../meshcore/companion_radio/*.cpp>
+<../meshcore/companion_radio/ui-new/*.cpp>
lib_deps =
${GAT562_Mesh_Tracker_Pro.lib_deps}
densaugeo/base64 @ ~1.4.0
Expand All @@ -88,7 +88,7 @@ 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
-I meshcore/companion_radio/ui-new
-D DISPLAY_CLASS=SSD1306Display
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
Expand All @@ -100,13 +100,13 @@ build_flags =
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>
+<../meshcore/companion_radio/*.cpp>
+<../meshcore/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/>
+<../meshcore/kiss_modem/>
12 changes: 6 additions & 6 deletions variants/gat562_mesh_watch13/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ lib_deps =
;; -D MESH_DEBUG=1
;build_src_filter = ${GAT562_Mesh_Watch13.build_src_filter}
; +<helpers/ui/SSD1306Display.cpp>
; +<../examples/simple_repeater>
; +<../meshcore/simple_repeater>

;[env:GAT562_Mesh_Watch13_room_server]
;extends = GAT562_Mesh_Watch13
Expand All @@ -59,15 +59,15 @@ lib_deps =
;; -D MESH_DEBUG=1
;build_src_filter = ${GAT562_Mesh_Watch13.build_src_filter}
; +<helpers/ui/SSD1306Display.cpp>
; +<../examples/simple_room_server>
; +<../meshcore/simple_room_server>

[env:GAT562_Mesh_Watch13_companion_radio_ble]
extends = GAT562_Mesh_Watch13
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
board_upload.maximum_size = 712704
build_flags =
${GAT562_Mesh_Watch13.build_flags}
-I examples/companion_radio/ui-new
-I meshcore/companion_radio/ui-new
-D DISPLAY_CLASS=SSD1306Display
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
Expand All @@ -81,13 +81,13 @@ build_src_filter = ${GAT562_Mesh_Watch13.build_src_filter}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/GenericVibration.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<../meshcore/companion_radio/*.cpp>
+<../meshcore/companion_radio/ui-new/*.cpp>
lib_deps =
${GAT562_Mesh_Watch13.lib_deps}
densaugeo/base64 @ ~1.4.0

[env:GAT562_Mesh_Watch13_kiss_modem]
extends = GAT562_Mesh_Watch13
build_src_filter = ${GAT562_Mesh_Watch13.build_src_filter}
+<../examples/kiss_modem/>
+<../meshcore/kiss_modem/>
Loading