From 61f58a596312852d21dc5750cea8280f9a015297 Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Sun, 10 Dec 2023 13:07:05 +0300 Subject: [PATCH] fix --- components/esp32_presense/esp32_presense.cpp | 4 ++++ components/esp32_presense/esp32_presense.h | 1 + 2 files changed, 5 insertions(+) diff --git a/components/esp32_presense/esp32_presense.cpp b/components/esp32_presense/esp32_presense.cpp index a075378..710ad1c 100644 --- a/components/esp32_presense/esp32_presense.cpp +++ b/components/esp32_presense/esp32_presense.cpp @@ -69,6 +69,10 @@ namespace esphome _id = slugify(room); roomsTopic = std::string(CHANNEL) + std::string("/rooms/") + _id; } + + void ESP32Presense::set_max_distance(float maxDistance) { + BleFingerprintCollection::maxDistance = maxDistance; + } void ESP32Presense::setup() { diff --git a/components/esp32_presense/esp32_presense.h b/components/esp32_presense/esp32_presense.h index 59facf6..e5e86b4 100644 --- a/components/esp32_presense/esp32_presense.h +++ b/components/esp32_presense/esp32_presense.h @@ -34,6 +34,7 @@ namespace esphome void set_room(std::string room); bool reportBuffer(BleFingerprint *f); bool reportDevice(BleFingerprint *f); + void set_max_distance(float maxDistance); //void set_base_topic(std::string base_topic) { base_topic_ = base_topic; } }; } // namespace esp32_nimble_tracker