ESPHome  2022.11.4
Public Member Functions | Protected Attributes
esphome::sensor::CalibrateLinearFilter Class Reference

#include <filter.h>

Inheritance diagram for esphome::sensor::CalibrateLinearFilter:
esphome::sensor::Filter

Public Member Functions

 CalibrateLinearFilter (float slope, float bias)
 
optional< float > new_value (float value) override
 
- Public Member Functions inherited from esphome::sensor::Filter
virtual void initialize (Sensor *parent, Filter *next)
 Initialize this filter, please note this can be called more than once. More...
 
void input (float value)
 
void output (float value)
 

Protected Attributes

float slope_
 
float bias_
 
- Protected Attributes inherited from esphome::sensor::Filter
friend Sensor
 
Filternext_ {nullptr}
 
Sensorparent_ {nullptr}
 

Detailed Description

Definition at line 358 of file filter.h.

Constructor & Destructor Documentation

◆ CalibrateLinearFilter()

esphome::sensor::CalibrateLinearFilter::CalibrateLinearFilter ( float  slope,
float  bias 
)

Definition at line 392 of file filter.cpp.

Member Function Documentation

◆ new_value()

optional< float > esphome::sensor::CalibrateLinearFilter::new_value ( float  value)
overridevirtual

Implements esphome::sensor::Filter.

Definition at line 391 of file filter.cpp.

Field Documentation

◆ bias_

float esphome::sensor::CalibrateLinearFilter::bias_
protected

Definition at line 365 of file filter.h.

◆ slope_

float esphome::sensor::CalibrateLinearFilter::slope_
protected

Definition at line 364 of file filter.h.


The documentation for this class was generated from the following files: