Skip to content

Commit

Permalink
Calculate counter only for FMI 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer committed Oct 10, 2024
1 parent 5d53f87 commit b60f298
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Stair/model.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ Status getInt32(ModelInstance* comp, ValueReference vr, int32_t values[], size_t

switch (vr) {
case vr_counter:
#if FMI_VERSION == 3
if (comp->state == EventMode) {
calculateCounter(comp);
}
#endif
values[(*index)++] = M(counter);
return OK;
default:
Expand Down

0 comments on commit b60f298

Please sign in to comment.