Fixed incorrect Voltage Reading of the TS80 because of Calibration Value (#375)
Capping
This commit is contained in:
committed by
Ben V. Brown
parent
2e210da7a6
commit
3fc9e5e4c2
@@ -874,11 +874,19 @@ static void settings_setCalibrateVIN(void) {
|
|||||||
osDelay(40);
|
osDelay(40);
|
||||||
|
|
||||||
// Cap to sensible values
|
// 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) {
|
if (systemSettings.voltageDiv < 360) {
|
||||||
systemSettings.voltageDiv = 360;
|
systemSettings.voltageDiv = 360;
|
||||||
} else if (systemSettings.voltageDiv > 520) {
|
} else if (systemSettings.voltageDiv > 520) {
|
||||||
systemSettings.voltageDiv = 520;
|
systemSettings.voltageDiv = 520;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user