mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
[sensor] Wrap benchmark filter constants in lambdas for TemplatableFn
This commit is contained in:
@@ -56,8 +56,8 @@ static void SensorFilter_Chain3(benchmark::State &state) {
|
||||
Sensor sensor;
|
||||
|
||||
sensor.add_filters({
|
||||
new OffsetFilter(1.0f),
|
||||
new MultiplyFilter(2.0f),
|
||||
new OffsetFilter([]() -> float { return 1.0f; }),
|
||||
new MultiplyFilter([]() -> float { return 2.0f; }),
|
||||
new SlidingWindowMovingAverageFilter(5, 1, 1),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user