summaryrefslogtreecommitdiff
path: root/js/Misc/BPLATFORM.js
diff options
context:
space:
mode:
authorSunil Shetye2018-07-09 11:43:39 +0530
committerSunil Shetye2018-07-09 12:16:25 +0530
commit62b1d7dd9183ed75733b44104890586b03818214 (patch)
tree9859e9ca295df98df945bd5fcccc3a264e8bede1 /js/Misc/BPLATFORM.js
parent5c011853630a1b466ef4789d5b600dd530d0a3ec (diff)
downloadsci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.gz
sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.bz2
sci2js-62b1d7dd9183ed75733b44104890586b03818214.zip
support ScilabBoolean, ScilabDouble, ScilabString
Diffstat (limited to 'js/Misc/BPLATFORM.js')
-rw-r--r--js/Misc/BPLATFORM.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/js/Misc/BPLATFORM.js b/js/Misc/BPLATFORM.js
index 8314c565..8c7f2bb0 100644
--- a/js/Misc/BPLATFORM.js
+++ b/js/Misc/BPLATFORM.js
@@ -8,17 +8,17 @@ function BPLATFORM() {
this.xmax = 5;
this.ymin = 0;
this.ymax = 15;
- model = scicos_model();
- model.sim = list("bplatform2",5);
- model.in1 = [[1],[1]];
- model.evtin = 1;
- model.dstate = 0;
- model.rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
- model.blocktype = "d";
- model.dep_ut = [false,false];
- exprs = string(model.rpar);
+ this.model = scicos_model();
+ this.model.sim = list("bplatform2",5);
+ this.model.in1 = [[1],[1]];
+ this.model.evtin = new ScilabDouble(1);
+ this.model.dstate = new ScilabDouble(0);
+ this.model.rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
+ exprs = string(this.model.rpar);
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
BPLATFORM.prototype.details = function BPLATFORM() {
@@ -47,8 +47,8 @@ function BPLATFORM() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
- dstate = model.dstate;
+ this.model = arg1.model;
+ dstate = this.model.dstate;
while (true) {
[ok,this.plen,this.csiz,this.phi,this.xmin,this.xmax,this.ymin,this.ymax,exprs] = scicos_getvalue("Set Scope parameters",["pendulum length","cart size (square side)","slope","Xmin","Xmax","Ymin","Ymax"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -71,10 +71,10 @@ function BPLATFORM() {
message(mess);
} else {
rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
- model.rpar = rpar;
+ this.model.rpar = rpar;
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}