summaryrefslogtreecommitdiff
path: root/js/IntegerOp/JKFLIPFLOP.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/IntegerOp/JKFLIPFLOP.js')
-rw-r--r--js/IntegerOp/JKFLIPFLOP.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js
index 5f5e59ef..b855e347 100644
--- a/js/IntegerOp/JKFLIPFLOP.js
+++ b/js/IntegerOp/JKFLIPFLOP.js
@@ -32,20 +32,20 @@ function JKFLIPFLOP() {
scs_m.objs[20-1] = scicos_link(xx=[[368.82793],[388.82793]],yy=[[243.45067],[243.45067]],id="drawlink",thick=[0,0],ct=[1,1],from=[6,2,0],to=[19,1,1]);
scs_m.objs[21-1] = scicos_block(gui="OUT_f",graphics=scicos_graphics(orig=[466.2036,169.25363],sz=[20,20],flip=true,theta=0,exprs="2",pin=22,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=2,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[22-1] = scicos_link(xx=[[446.2036],[466.2036]],yy=[[179.25363],[179.25363]],id="drawlink",thick=[0,0],ct=[1,1],from=[9,1,0],to=[21,1,1]);
- model = scicos_model();
- model.sim = "csuper";
- model.in1 = [[1],[1],[1]];
- model.in2 = [[1],[1],[1]];
- model.out = [[1],[1]];
- model.out2 = [[1],[1]];
- model.intyp = [5,1,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],[1]];
+ this.model.in2 = [[1],[1],[1]];
+ this.model.out = [[1],[1]];
+ this.model.out2 = [[1],[1]];
+ this.model.intyp = [5,1,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);
}
JKFLIPFLOP.prototype.details = function JKFLIPFLOP() {
@@ -69,8 +69,8 @@ function JKFLIPFLOP() {
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","JKFLIPFLOP")],[" "],["JK 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) {
@@ -83,8 +83,8 @@ function JKFLIPFLOP() {
}
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;
}