PDA fixes

This commit is contained in:
Lew Rossman
2019-07-22 09:50:41 -04:00
parent 3fe11b98ee
commit a89f339525
18 changed files with 814 additions and 221 deletions

View File

@@ -1924,12 +1924,20 @@ int optionvalue(Project *pr, int n)
else if (match(tok0, w_MINIMUM))
{
if (y < 0.0) return setError(parser, nvalue, 213);
// Required pressure still at default value
if (hyd->Preq == MINPDIFF)
hyd->Preq = y + MINPDIFF;
// Required pressure already entered
else if (hyd->Preq - y < MINPDIFF)
return setError(parser, nvalue, 208);
hyd->Pmin = y;
return 0;
}
else if (match(tok0, w_REQUIRED))
{
if (y < 0.0) return setError(parser, nvalue, 213);
if (y - hyd->Pmin < MINPDIFF)
return setError(parser, nvalue, 208);
hyd->Preq = y;
return 0;
}