Skip to content

Commit

Permalink
Don't set Clocks in Initialization Mode
Browse files Browse the repository at this point in the history
fixes #629
  • Loading branch information
t-sommer committed Dec 3, 2024
1 parent 1412c77 commit af92424
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions fmusim/FMIStaticInput.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,16 @@ FMIStatus FMIApplyInput(FMIInstance* instance, const FMIStaticInput* input, doub
continue;
}

if (variable->type == FMIClockType && !*((bool*)values)) {
continue; // don't set inactive clocks
if (variable->type == FMIClockType) {

if (instance->state == FMIInitializationModeState) {
continue; // don't set clocks in Initialization Mode
}

if (!*((bool*)values)) {
continue; // don't set inactive clocks
}

}

CALL(FMISetValues(instance, type, &vr, 1, NULL, values, nValues));
Expand Down

0 comments on commit af92424

Please sign in to comment.