Skip to content

Commit

Permalink
Use sample time from dialog in Model Exchange (#368)
Browse files Browse the repository at this point in the history
to allow use in triggered subsystems
  • Loading branch information
t-sommer committed Jul 11, 2022
1 parent 1bac7d1 commit 900c7de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/fmu_import.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The folder where the FMU is extracted. The path can be absolute or relative to t

### Sample Time

The sample time for the FMU block (use `-1` for inherited)
The sample time for the FMU block (use `0` for continuous and `-1` for inherited).

### Relative Tolerance

Expand Down
10 changes: 2 additions & 8 deletions src/sfun_fmurun.c
Original file line number Diff line number Diff line change
Expand Up @@ -1535,14 +1535,8 @@ static void mdlInitializeSampleTimes(SimStruct *S) {

logDebug(S, "mdlInitializeSampleTimes()");

if (isCS(S)) {
ssSetSampleTime(S, 0, sampleTime(S));
ssSetOffsetTime(S, 0, offsetTime(S));
} else {
ssSetSampleTime(S, 0, CONTINUOUS_SAMPLE_TIME);
ssSetOffsetTime(S, 0, offsetTime(S));
}

ssSetSampleTime(S, 0, sampleTime(S));
ssSetOffsetTime(S, 0, offsetTime(S));
}


Expand Down

0 comments on commit 900c7de

Please sign in to comment.