summaryrefslogtreecommitdiff
path: root/js/Linear/TIME_DELAY.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Linear/TIME_DELAY.js')
-rw-r--r--js/Linear/TIME_DELAY.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/js/Linear/TIME_DELAY.js b/js/Linear/TIME_DELAY.js
index fc9aa70e..ce36dfc9 100644
--- a/js/Linear/TIME_DELAY.js
+++ b/js/Linear/TIME_DELAY.js
@@ -5,17 +5,17 @@ function TIME_DELAY() {
this.T = 1;
this.init = 0;
this.N = 1024;
- model = scicos_model();
- model.sim = list("time_delay",4);
- model.in1 = [nin];
- model.out = nin;
- model.rpar = [this.T,this.init];
- model.ipar = this.N;
- model.blocktype = "x";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = list("time_delay",4);
+ this.model.in1 = [nin];
+ this.model.out = new ScilabDouble(nin);
+ this.model.rpar = [this.T,this.init];
+ this.model.ipar = new ScilabDouble(this.N);
+ this.model.blocktype = new ScilabString("x");
+ this.model.dep_ut = [false,true];
exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
gr_i = [];
- this.x = standard_define([3.5,2],model,exprs,gr_i);
+ this.x = standard_define([3.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
TIME_DELAY.prototype.details = function TIME_DELAY() {
@@ -36,8 +36,8 @@ function TIME_DELAY() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
- nin = model.in1[1-1];
+ this.model = arg1.model;
+ nin = this.model.in1[1-1];
while (true) {
[ok,this.T,this.init,this.N,exprs] = scicos_getvalue("Set delay parameters",["Delay","initial input","Buffer size"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -52,15 +52,15 @@ function TIME_DELAY() {
ok = false;
}
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,[-1],-1,[],[]);
+ [model,graphics,ok] = check_io(this.model,graphics,[-1],-1,[],[]);
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[this.T],[this.init]];
- model.ipar = this.N;
- model.dep_ut = [false,true];
+ this.model.rpar = [[this.T],[this.init]];
+ this.model.ipar = new ScilabDouble(this.N);
+ this.model.dep_ut = [false,true];
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}