1#ifndef SENSP_TRANSFORMS_MOVING_AVERAGE_H_
2#define SENSP_TRANSFORMS_MOVING_AVERAGE_H_
37 const String& config_path =
"");
38 virtual void set(
const float& input)
override;
39 virtual bool to_json(JsonObject& root)
override;
40 virtual bool from_json(
const JsonObject& config)
override;
43 std::vector<float> buf_{};
Outputs the moving average of the last sample_size inputs.
virtual void set(const float &input) override
virtual bool to_json(JsonObject &root) override
virtual bool from_json(const JsonObject &config) override
MovingAverage(int sample_size, float multiplier=1.0, const String &config_path="")
const String ConfigSchema(const SmartSwitchController &obj)
bool ConfigRequiresRestart(const HTTPServer &obj)