mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 02:34:29 +05:00
refactor: allow up to 100x correction of sensor values (#137)
This commit is contained in:
@@ -1791,7 +1791,7 @@ bool jsonToSensorSettings(const uint8_t sensorId, const JsonVariantConst src, Se
|
||||
if (!src[FPSTR(S_FACTOR)].isNull()) {
|
||||
float value = src[FPSTR(S_FACTOR)].as<float>();
|
||||
|
||||
if (value > 0.09f && value <= 10.0f && fabsf(value - dst.factor) > 0.0001f) {
|
||||
if (value > 0.09f && value <= 100.0f && fabsf(value - dst.factor) > 0.0001f) {
|
||||
dst.factor = roundf(value, 3);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
<label>
|
||||
<span data-i18n>sensors.correction.factor</span>
|
||||
<input type="number" inputmode="decimal" name="factor" min="0.01" max="10" step="0.01" required>
|
||||
<input type="number" inputmode="decimal" name="factor" min="0.01" max="100" step="0.01" required>
|
||||
</label>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
Reference in New Issue
Block a user