improved sanity-check of config-values
This commit is contained in:
parent
cc93236b8e
commit
e85eef271b
@ -295,6 +295,8 @@ uint32_t ConfigSanityCheck(bool autocorrect)
|
||||
LubeConfig.TankRemindAtPercentage = LubeConfig_defaults.TankRemindAtPercentage;
|
||||
}
|
||||
|
||||
if (LubeConfig.SpeedSource == SOURCE_IMPULSE)
|
||||
{
|
||||
if (!(LubeConfig.PulsePerRevolution > 0) || !(LubeConfig.PulsePerRevolution < 1000))
|
||||
{
|
||||
SET_BIT(setting_reset_bits, 5);
|
||||
@ -329,6 +331,7 @@ uint32_t ConfigSanityCheck(bool autocorrect)
|
||||
if (autocorrect)
|
||||
LubeConfig.DistancePerRevolution_mm = LubeConfig_defaults.DistancePerRevolution_mm;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(LubeConfig.BleedingPulses > 0) || !(LubeConfig.BleedingPulses < 1001))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user