refactor: allow up to 100x correction of sensor values (#137)

This commit is contained in:
Roman Andriadi
2025-02-03 01:56:00 +00:00
committed by GitHub
parent 1903ee2bc7
commit 25b70e4db5
2 changed files with 2 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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>