Skip to content

Commit

Permalink
- update of C# templates: removed Sample zero-crossing generation
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9078 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
pavolpr committed May 23, 2011
1 parent 7bfbc41 commit 99b95da
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Compiler/susan_codegen/SimCode/SimCodeCSharp.tpl
Expand Up @@ -677,13 +677,17 @@ template zeroCrossing(Exp it, Integer index, SimCode simCode) ::=
%>) : 1.0; }
>>
case CALL(path=IDENT(name="sample"), expLst={start, interval}) then
let &preExp = buffer ""
let &preExp = buffer "" //is ignored
let eStart = daeExp(start, contextOther, &preExp, simCode)
let eInterval = daeExp(interval, contextOther, &preExp, simCode)
<<
{<%preExp%>var _zen = zeroCrossingEnabled[<%index%>]; //ZEROCROSSING(<%index%>, Sample(*t, <%eStart%>, <%eInterval%>));
gout[<%index%>] = (_zen != 0) ? _zen * Sample(time, <%eStart%>, <%eInterval%>) : 1.0; }
>>
//ZEROCROSSING(<%index%>, Sample(*t, <%eStart%>, <%eInterval%>));
>>
//the old sample, to be deleted in the next iteration
//<<
//{<%preExp%>var _zen = zeroCrossingEnabled[<%index%>]; //ZEROCROSSING(<%index%>, Sample(*t, <%eStart%>, <%eInterval%>));
//gout[<%index%>] = (_zen != 0) ? _zen * Sample(time, <%eStart%>, <%eInterval%>) : 1.0; }
//>>
case _ then
<<
ZERO_CROSSING_ERROR
Expand Down

0 comments on commit 99b95da

Please sign in to comment.