adds api support for enabling/disabling controls and rules

This commit is contained in:
Sam Hatchett
2023-09-12 14:51:44 -04:00
parent 630eed4369
commit 06a43cdb4e
9 changed files with 161 additions and 1 deletions

View File

@@ -557,6 +557,10 @@ int controls(Project *pr)
{
// Make sure that link is defined
control = &net->Control[i];
if (control->isEnabled == DISABLED)
{
continue;
}
reset = 0;
if ( (k = control->Link) <= 0) continue;
link = &net->Link[k];
@@ -729,7 +733,10 @@ int controltimestep(Project *pr, long *tstep)
{
t = 0;
control = &net->Control[i];
if (control->isEnabled == DISABLED)
{
continue;
}
// Control depends on a tank level
if ( (n = control->Node) > 0)
{