summaryrefslogtreecommitdiff
path: root/js/Events/freq_div.js
diff options
context:
space:
mode:
authorSunil Shetye2018-07-11 13:05:13 +0530
committerSunil Shetye2018-07-11 15:21:08 +0530
commit079d0b4a3ec15a4d7d2644484d116df9d1c694bb (patch)
tree785ed59b5b238203a9e91f3e323da59d1083d86e /js/Events/freq_div.js
parent0e9bc36f45fa1bb598c6ebb0febc1989439a8d98 (diff)
downloadsci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.gz
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.tar.bz2
sci2js-079d0b4a3ec15a4d7d2644484d116df9d1c694bb.zip
fix assignment to list
Diffstat (limited to 'js/Events/freq_div.js')
-rw-r--r--js/Events/freq_div.js80
1 files changed, 40 insertions, 40 deletions
diff --git a/js/Events/freq_div.js b/js/Events/freq_div.js
index b7e4817d..7c42fa2a 100644
--- a/js/Events/freq_div.js
+++ b/js/Events/freq_div.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Events/freq_div.sci" */
function freq_div() {
freq_div.prototype.define = function freq_div() {
- scs_m_1 = scicos_diagram();
+ var scs_m_1 = scicos_diagram();
scs_m_1.objs[1-1] = Modulo_Count("define");
scs_m_1.objs[2-1] = CLKINV_f("define");
scs_m_1.objs[3-1] = CLKOUTV_f("define");
@@ -12,8 +12,8 @@ function freq_div() {
scs_m_1.objs[8-1] = scicos_link();
scs_m_1.objs[9-1] = scicos_link();
scs_m_1.objs[10-1] = scicos_link();
- blk = scs_m_1.objs[1-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[1-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [0,-100];
graphics.sz = [60,40];
@@ -25,8 +25,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[1-1] = blk;
- blk = scs_m_1.objs[2-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[2-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [120,0];
graphics.sz = [20,20];
@@ -36,8 +36,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[2-1] = blk;
- blk = scs_m_1.objs[3-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[3-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [130,-160];
graphics.sz = [20,20];
@@ -47,8 +47,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[3-1] = blk;
- blk = scs_m_1.objs[4-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[4-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [100,-100];
graphics.sz = [60,40];
@@ -60,8 +60,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[4-1] = blk;
- blk = scs_m_1.objs[5-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[5-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [127,-33];
graphics.sz = [7,7];
@@ -70,26 +70,26 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[5-1] = blk;
- lnk = scs_m_1.objs[6-1];
+ var lnk = scs_m_1.objs[6-1];
lnk.ct = [5,-1];
lnk.from = [2,1,0];
lnk.to = [5,1,1];
scs_m_1.objs[6-1] = lnk;
- lnk = scs_m_1.objs[7-1];
+ var lnk = scs_m_1.objs[7-1];
lnk.from = [1,1,0];
lnk.to = [4,1,1];
scs_m_1.objs[7-1] = lnk;
- lnk = scs_m_1.objs[8-1];
+ var lnk = scs_m_1.objs[8-1];
lnk.ct = [5,-1];
lnk.from = [4,2,0];
lnk.to = [3,1,1];
scs_m_1.objs[8-1] = lnk;
- lnk = scs_m_1.objs[9-1];
+ var lnk = scs_m_1.objs[9-1];
lnk.ct = [5,-1];
lnk.from = [5,1,0];
lnk.to = [4,1,1];
scs_m_1.objs[9-1] = lnk;
- lnk = scs_m_1.objs[10-1];
+ var lnk = scs_m_1.objs[10-1];
lnk.xx = [0,30,1];
lnk.yy = [0,-30,1];
lnk.ct = [5,-1];
@@ -103,7 +103,7 @@ function freq_div() {
this.model.evtin = new ScilabDouble([1]);
this.model.evtout = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -121,23 +121,23 @@ function freq_div() {
%ph = parseFloat(arguments[0]["%ph"])
%df = parseFloat(arguments[0]["%df"])
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="Modulo_Count") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- y = 0;
- spath = list();
+ var newpar = list();
+ var y = 0;
+ var spath = list();
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path;
- xx = arg1[spath-1];
- xxn = xx;
- graphics = xx.graphics;
- exprs = graphics.exprs;
+ var xx = arg1[spath-1];
+ var xxn = xx;
+ var graphics = xx.graphics;
+ var exprs = graphics.exprs;
this.model = xx.model;
while (true) {
[ok,%ph,%df,exprs] = scicos_getvalue("Set frequency division block parameters",["Phase (0 to division factor -1)","Division factor"],list("vec",1,"vec",1),exprs);
@@ -162,47 +162,47 @@ function freq_div() {
}
if (diffobjs(xxn,xx)) {
this.model = xx.model;
- model_n = xxn.model;
+ var model_n = xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = xxn;
newpar[size(newpar)+1-1] = 1;
- y = max(y,needcompile);
+ var y = max(y,needcompile);
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}