Skip to content

Commit

Permalink
Support startInterval of event clocks, ticket:3272
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranke committed Jun 25, 2016
1 parent a5b5466 commit 499d340
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Compiler/FrontEnd/Expression.mo
Expand Up @@ -1534,17 +1534,19 @@ public function getClockInterval
input DAE.ClockKind inClk;
output DAE.Exp outIntvl;
protected
DAE.Exp e, er;
DAE.Exp e, e2;
Integer res;
algorithm
outIntvl := match inClk
case DAE.REAL_CLOCK(e)
then e;
case DAE.INTEGER_CLOCK(e, er)
case DAE.INTEGER_CLOCK(e, e2)
then DAE.BINARY(
DAE.CAST(DAE.T_REAL_DEFAULT, e),
DAE.DIV(DAE.T_REAL_DEFAULT),
DAE.CAST(DAE.T_REAL_DEFAULT, er));
DAE.CAST(DAE.T_REAL_DEFAULT, e2));
case DAE.BOOLEAN_CLOCK(e, e2)
then e2; // startInterval
else
then DAE.RCONST(0.0);
end match;
Expand Down

0 comments on commit 499d340

Please sign in to comment.