#pragma once // For Filter #include #include "esp_timer.h" #include "SoftFilters.h" // #define ONE_EURO_FCMIN 1e-5f // #define ONE_EURO_BETA 1e-7f // #define ONE_EURO_DCUTOFF 1e-5f // From https://github.com/rpatel3001/BleDistance/blob/master/ble_dist.h #define ONE_EURO_FCMIN 0.0001 #define ONE_EURO_BETA 0.05 #define ONE_EURO_DCUTOFF 1.0 #define NO_RSSI (-128) #define DEFAULT_TX (-6) // For NimbleDistanceSensor #include "esphome/core/component.h" #include "esphome/components/sensor/sensor.h" #include "esphome.h" namespace esphome { namespace nimble_distance { class NimbleDistanceSensor : public sensor::Sensor, public nimble_tracker::NimbleDistanceCustomComponent {} } // namespace esphome