SensESP 3.0.0-beta.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
frequency.h
Go to the documentation of this file.
1#ifndef _frequency_H_
2#define _frequency_H_
3
4#include "transform.h"
5
6namespace sensesp {
7
21class Frequency : public Transform<int, float> {
22 public:
23 Frequency(float multiplier = 1, String config_path = "");
24 virtual void set(const int& input) override;
25 virtual void get_configuration(JsonObject& doc) override;
26 virtual bool set_configuration(const JsonObject& config) override;
27 virtual String get_config_schema() override;
28
29 private:
30 float multiplier_;
31 int ticks_ = 0;
32 unsigned int last_update_ = 0;
33};
34
35} // namespace sensesp
36#endif
On/off switch for signals: input is emitted as-is if the enable flag is set in the web UI.
Definition enable.h:25
Transforms its input into frequency (Hz: cycles per second)
Definition frequency.h:21
virtual void set(const int &input) override
Definition frequency.cpp:14
virtual String get_config_schema() override
Definition frequency.cpp:32
Frequency(float multiplier=1, String config_path="")
Definition frequency.cpp:7
virtual bool set_configuration(const JsonObject &config) override
Definition frequency.cpp:34
virtual void get_configuration(JsonObject &doc) override
Definition frequency.cpp:21
The main Transform class. A transform is identified primarily by the type of value that is produces (...
Definition transform.h:53