SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
analogvoltage.h
Go to the documentation of this file.
1#ifndef SENSESP_TRANSFORMS_ANALOGVOLTAGE_H_
2#define SENSESP_TRANSFORMS_ANALOGVOLTAGE_H_
3
5#include "transform.h"
6
7#define MAX_ANALOG_OUTPUT 4096
8
9namespace sensesp {
10
39 public:
40 AnalogVoltage(float max_voltage = 3.3, float multiplier = 1.0,
41 float offset = 0.0, const String& config_path = "");
42 virtual void set(const float& input) override;
43 virtual bool to_json(JsonObject& root) override;
44 virtual bool from_json(const JsonObject& config) override;
45
46 private:
47 float max_voltage_;
48 float multiplier_;
49 float offset_;
50};
51
52const String ConfigSchema(const AnalogVoltage& obj);
53
54} // namespace sensesp
55
56#endif
A transform that takes the output of an analog-to-digital converter and outputs the voltage that went...
virtual bool to_json(JsonObject &root) override
virtual void set(const float &input) override
AnalogVoltage(float max_voltage=3.3, float multiplier=1.0, float offset=0.0, const String &config_path="")
virtual bool from_json(const JsonObject &config) override
const String ConfigSchema(const SmartSwitchController &obj)