File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1341,12 +1341,20 @@ fmi3Status fmi3DoStep(fmi3Instance instance,
13411341
13421342 while (true) {
13431343
1344- nextCommunicationPointReached = S -> time + FIXED_SOLVER_STEP > nextCommunicationPoint ;
1344+ const fmi3Float64 nextSolverStepTime = S -> time + FIXED_SOLVER_STEP ;
1345+ nextCommunicationPointReached = nextSolverStepTime > nextCommunicationPoint ;
13451346
1346- if (nextCommunicationPointReached ) {
1347+ if (nextCommunicationPointReached || ( * eventHandlingNeeded && S -> earlyReturnAllowed ) ) {
13471348 break ;
13481349 }
13491350
1351+ #ifdef EVENT_UPDATE
1352+ if (* eventHandlingNeeded ) {
1353+ eventUpdate (S );
1354+ * eventHandlingNeeded = fmi3False ;
1355+ }
1356+ #endif
1357+
13501358 bool stateEvent , timeEvent ;
13511359
13521360 CALL (doFixedStep (S , & stateEvent , & timeEvent ));
You can’t perform that action at this time.
0 commit comments