add locks in presence detection for _device dictionary

This commit is contained in:
technyon
2024-06-15 08:33:08 +02:00
parent 705e0971d7
commit 3177752c3b
2 changed files with 41 additions and 21 deletions

View File

@@ -4,6 +4,7 @@
#include "BleScanner.h"
#include "BleInterfaces.h"
#include <memory>
#include <mutex>
struct PdDevice
{
@@ -29,6 +30,8 @@ public:
private:
void buildCsv(const std::shared_ptr<PdDevice>& device);
std::mutex mtx;
Preferences* _preferences;
BleScanner::Scanner* _bleScanner;
char* _csv = {0};