use shared_ptr for presence detection device objects

This commit is contained in:
technyon
2024-06-15 06:30:22 +02:00
parent 85ffabe95d
commit 85dc545153
3 changed files with 23 additions and 22 deletions

View File

@@ -25,14 +25,14 @@ public:
void onResult(NimBLEAdvertisedDevice* advertisedDevice) override;
private:
void buildCsv(const PdDevice& device);
void buildCsv(const std::shared_ptr<PdDevice>& device);
Preferences* _preferences;
BleScanner::Scanner* _bleScanner;
Network* _network;
char* _csv = {0};
size_t _bufferSize = 0;
std::map<long long, PdDevice> _devices;
std::map<long long, std::shared_ptr<PdDevice>> _devices;
int _timeout = 20000;
int _csvIndex = 0;
};