mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-24 02:10:46 +00:00

because the ESP32 implementation will be different from NRF52 to make this possible I needed to decouple knowlege about bluetooth from our mesh service. Instead mesh service now uses the Obserable pattern to let any interested consumer get notified of important mesh changes (currently that is only bluetooth, but really we should do the same thing for decoupling the GUI 'app' from the mesh service) @girtsf would you mind reviewing my Observer changes? I haven't written C++ code in a long time ;-)
15 lines
340 B
C
15 lines
340 B
C
#pragma once
|
|
|
|
#include <Arduino.h>
|
|
#include <BLEServer.h>
|
|
#include <BLEService.h>
|
|
|
|
BLEService *createMeshBluetoothService(BLEServer *server);
|
|
void destroyMeshBluetoothService();
|
|
|
|
/**
|
|
* Tell any bluetooth clients that the number of rx packets has changed
|
|
*/
|
|
void bluetoothNotifyFromNum(uint32_t newValue);
|
|
|
|
void stopMeshBluetoothService(); |