1
0
forked from me/IronOS

Fixed incorrect Voltage Reading of the TS80 because of Calibration Value (#375)

Capping
This commit is contained in:
Lennart Wilde
2018-10-16 22:27:04 +02:00
committed by Ben V. Brown
parent 2e210da7a6
commit 3fc9e5e4c2

View File

@@ -874,11 +874,19 @@ static void settings_setCalibrateVIN(void) {
osDelay(40);
// Cap to sensible values
#ifdef MODEL_TS80
if (systemSettings.voltageDiv < 500) {
systemSettings.voltageDiv = 500;
} else if (systemSettings.voltageDiv > 900) {
systemSettings.voltageDiv = 900;
}
#else
if (systemSettings.voltageDiv < 360) {
systemSettings.voltageDiv = 360;
} else if (systemSettings.voltageDiv > 520) {
systemSettings.voltageDiv = 520;
}
#endif
}
}