Merge pull request #617 from OpenWaterAnalytics/dev-fix-valve-settings

Allow negative EN_SETTING value in EN_setlinkvalue
This commit is contained in:
Lew Rossman
2020-11-08 09:44:10 -05:00
committed by GitHub

View File

@@ -3886,7 +3886,6 @@ int DLLEXPORT EN_setlinkvalue(EN_Project p, int index, int property, double valu
case EN_INITSETTING: case EN_INITSETTING:
case EN_SETTING: case EN_SETTING:
if (value < 0.0) return 211;
if (Link[index].Type == PIPE || Link[index].Type == CVPIPE) if (Link[index].Type == PIPE || Link[index].Type == CVPIPE)
{ {
return EN_setlinkvalue(p, index, EN_ROUGHNESS, value); return EN_setlinkvalue(p, index, EN_ROUGHNESS, value);
@@ -3896,6 +3895,7 @@ int DLLEXPORT EN_setlinkvalue(EN_Project p, int index, int property, double valu
switch (Link[index].Type) switch (Link[index].Type)
{ {
case PUMP: case PUMP:
if (value < 0.0) return 211;
break; break;
case PRV: case PRV:
case PSV: case PSV: