allow sensor type selection per plant, changed calculations to use PCT values, due to different raw value meaning

This commit is contained in:
c3ma
2022-02-12 05:26:54 +01:00
parent 7a54065a5f
commit d0320beaa7
9 changed files with 217 additions and 108 deletions

View File

@@ -4,4 +4,9 @@
bool equalish(double x, double y)
{
return (abs(x - y) < 0.5);
}
}
double mapf(double x, double in_min, double in_max, double out_min, double out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}