mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 13:43:00 +00:00
[core] Add TemplatableFn for 4-byte function-pointer templatable storage (#15545)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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