diff options
Diffstat (limited to 'js/IntegerOp/SRFLIPFLOP.js')
-rw-r--r-- | js/IntegerOp/SRFLIPFLOP.js | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/js/IntegerOp/SRFLIPFLOP.js b/js/IntegerOp/SRFLIPFLOP.js index 9a05ad70..354f75f6 100644 --- a/js/IntegerOp/SRFLIPFLOP.js +++ b/js/IntegerOp/SRFLIPFLOP.js @@ -16,20 +16,20 @@ function SRFLIPFLOP() { scs_m.objs[12-1] = scicos_link(xx=[[269.93257],[289.93257]],yy=[[211.45067],[211.45067]],id="drawlink",thick=[0,0],ct=[1,1],from=[11,1,0],to=[1,3,1]); scs_m.objs[13-1] = scicos_block(gui="OUT_f",graphics=scicos_graphics(orig=[383.03733,238.584],sz=[20,20],flip=true,theta=0,exprs="1",pin=14,pout=[],pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim="output",in1=-1,in2=[],intyp=-1,out=[],out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list()); scs_m.objs[14-1] = scicos_link(xx=[[363.03733],[383.03733]],yy=[[248.584],[248.584]],id="drawlink",thick=[0,0],ct=[1,1],from=[5,2,0],to=[13,1,1]); - model = scicos_model(); - model.sim = "csuper"; - model.in1 = [[1],[1]]; - model.in2 = [[1],[1]]; - model.out = [[1],[1]]; - model.out2 = [[1],[1]]; - model.intyp = [5,5]; - model.outtyp = [5,5]; - model.blocktype = "h"; - model.firing = false; - model.dep_ut = [true,false]; - model.rpar = scs_m; + this.model = scicos_model(); + this.model.sim = new ScilabString("csuper"); + this.model.in1 = [[1],[1]]; + this.model.in2 = [[1],[1]]; + this.model.out = [[1],[1]]; + this.model.out2 = [[1],[1]]; + this.model.intyp = [5,5]; + this.model.outtyp = [5,5]; + this.model.blocktype = new ScilabString("h"); + this.model.firing = new ScilabBoolean(false); + this.model.dep_ut = [true,false]; + this.model.rpar = new ScilabDouble(scs_m); gr_i = []; - this.x = standard_define([2,3],model,[],gr_i); + this.x = standard_define([2,3],this.model,[],gr_i); return new BasicBlock(this.x); } SRFLIPFLOP.prototype.details = function SRFLIPFLOP() { @@ -53,8 +53,8 @@ function SRFLIPFLOP() { newpar = list(); xx = arg1.model.rpar.objs[path-1]; exprs = xx.graphics.exprs[1-1]; - model = xx.model; - init_old = model.odstate[1-1]; + this.model = xx.model; + init_old = this.model.odstate[1-1]; while (true) { [ok,this.init,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","SRFLIPFLOP")],[" "],["SR flip-flop"],[" "],["The \'Initial Value\' must be 0 or 1 of type int8"],[" - Negative values are considered as int8(0)"],[" - Positive values are considered as int8(1)"],[" "]],"Initial Value",list("vec",1),exprs); if (!ok) { @@ -67,8 +67,8 @@ function SRFLIPFLOP() { } if (ok) { xx.graphics.exprs[1-1] = this.exprs0; - model.odstate[1-1] = this.init; - xx.model = model; + this.model.odstate[('1', 'double')] = new ScilabDouble(this.init); + xx.model = this.model; arg1.model.rpar.objs[path-1] = xx; break; } |