SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
linear.cpp
Go to the documentation of this file.
1#include "linear.h"
2
3namespace sensesp {
4
5// Keys and descriptions of constant parameters
6
7const ParamInfo Linear::param_info_[] = {{"multiplier", "Multiplier"},
8 {"offset", "Constant offset"}};
9
10// Function implementing the linear transform
11
12float (*Linear::function_)(float, float, float) =
13 [](float input, float multiplier, float offset) {
14 return multiplier * input + offset;
15 };
16
17// Constructor definition
18
22
23} // namespace sensesp
Construct a new transform based on a single function.
Linear(float multiplier, float offset, String config_path="")
Definition linear.cpp:19