mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Add BLE mesh logging
Made with Claude AI.
This commit is contained in:
parent
aedc00e16a
commit
9f7d644a0c
9 changed files with 217 additions and 18 deletions
|
|
@ -2,6 +2,11 @@
|
|||
#include <Mesh.h>
|
||||
|
||||
#include "MyMesh.h"
|
||||
#include <helpers/BLELogInterface.h>
|
||||
|
||||
#if MESH_PACKET_LOGGING && BLE_PACKET_LOGGING && (defined(NRF52_PLATFORM) || defined(ESP32))
|
||||
static BLELogInterface ble_log;
|
||||
#endif
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
#include "UITask.h"
|
||||
|
|
@ -95,6 +100,11 @@ void setup() {
|
|||
|
||||
the_mesh.begin(fs);
|
||||
|
||||
#if MESH_PACKET_LOGGING && BLE_PACKET_LOGGING && (defined(NRF52_PLATFORM) || defined(ESP32))
|
||||
ble_log.begin(the_mesh.getNodeName());
|
||||
the_mesh.setPacketLogStream(&ble_log);
|
||||
#endif
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
ui_task.begin(the_mesh.getNodePrefs(), FIRMWARE_BUILD_DATE, FIRMWARE_VERSION);
|
||||
#endif
|
||||
|
|
@ -153,6 +163,9 @@ void loop() {
|
|||
ui_task.loop();
|
||||
#endif
|
||||
rtc_clock.tick();
|
||||
#if MESH_PACKET_LOGGING && BLE_PACKET_LOGGING && defined(ESP32)
|
||||
ble_log.loop();
|
||||
#endif
|
||||
|
||||
if (the_mesh.getNodePrefs()->powersaving_enabled && !the_mesh.hasPendingWork()) {
|
||||
#if defined(NRF52_PLATFORM)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue