diff options
author | Sunil Shetye | 2018-07-09 11:43:39 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-09 12:16:25 +0530 |
commit | 62b1d7dd9183ed75733b44104890586b03818214 (patch) | |
tree | 9859e9ca295df98df945bd5fcccc3a264e8bede1 /js/Events/M_freq.js | |
parent | 5c011853630a1b466ef4789d5b600dd530d0a3ec (diff) | |
download | sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.gz sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.bz2 sci2js-62b1d7dd9183ed75733b44104890586b03818214.zip |
support ScilabBoolean, ScilabDouble, ScilabString
Diffstat (limited to 'js/Events/M_freq.js')
-rw-r--r-- | js/Events/M_freq.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/js/Events/M_freq.js b/js/Events/M_freq.js index 9d9d7da7..56413dab 100644 --- a/js/Events/M_freq.js +++ b/js/Events/M_freq.js @@ -1,18 +1,18 @@ /* autogenerated from "macros/Events/M_freq.sci" */ function M_freq() { M_freq.prototype.define = function M_freq() { - model = scicos_model(); - model.sim = list("m_frequ",4); - model.evtout = [[1],[1],[1]]; - model.evtin = 1; - model.rpar = []; - model.opar = list([[1,1,0],[1,1,1],[1,3,2]],1,0,0); - model.blocktype = "d"; - model.firing = [0,-1,-1]; - model.dep_ut = [false,false]; + this.model = scicos_model(); + this.model.sim = list("m_frequ",4); + this.model.evtout = [[1],[1],[1]]; + this.model.evtin = new ScilabDouble(1); + this.model.rpar = []; + this.model.opar = list([[1,1,0],[1,1,1],[1,3,2]],1,0,0); + this.model.blocktype = new ScilabString("d"); + this.model.firing = [0,-1,-1]; + this.model.dep_ut = [false,false]; exprs = [[sci2exp([[1],[2]])],[sci2exp([[0],[0]])]]; gr_i = []; - this.x = standard_define([3,2],model,exprs,gr_i); + this.x = standard_define([3,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } M_freq.prototype.details = function M_freq() { @@ -30,7 +30,7 @@ function M_freq() { this.offset = inverse(arguments[0]["offset"]) this.x = arg1; graphics = arg1.graphics; - model = arg1.model; + this.model = arg1.model; exprs = graphics.exprs; while (true) { [ok,this.frequ,this.offset,exprs] = scicos_getvalue("Set block parameters",["Sample time","Offset"],list("vec",-1,"vec",-1),exprs); @@ -53,18 +53,18 @@ function M_freq() { [m,den,off,count,m1,fir,this.frequ,this.offset,ok] = mfrequ_clk(this.frequ,this.offset); } if (ok) { - model.opar = list(m,double(den),off,count); + this.model.opar = list(m,double(den),off,count); mn = (2^size(m1,"*"))-1; - [model,graphics,ok] = set_io(model,graphics,list(),list(),1,ones(mn,1)); + [model,graphics,ok] = set_io(this.model,graphics,list(),list(),1,ones(mn,1)); if (mn>3) { graphics.sz = [40+(mn-3)*10,40]; } else { graphics.sz = [50,40]; } - model.firing = fir; + this.model.firing = new ScilabDouble(fir); graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } |