summaryrefslogtreecommitdiff
path: root/js/Misc/BPLATFORM.js
diff options
context:
space:
mode:
authorSunil Shetye2018-06-26 14:59:47 +0530
committerSunil Shetye2018-06-26 14:59:47 +0530
commiteb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00 (patch)
tree6378935263fe5cafd389b6893ac3b37a1dd4b1a7 /js/Misc/BPLATFORM.js
parentafed64f1a0eab0b2d742088186d7bc340a2c895b (diff)
downloadsci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.gz
sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.bz2
sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.zip
add return value from scicos_getvalue to global vars
Diffstat (limited to 'js/Misc/BPLATFORM.js')
-rw-r--r--js/Misc/BPLATFORM.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/js/Misc/BPLATFORM.js b/js/Misc/BPLATFORM.js
index ec1ad3a7..ed9aa786 100644
--- a/js/Misc/BPLATFORM.js
+++ b/js/Misc/BPLATFORM.js
@@ -1,19 +1,19 @@
/* autogenerated from "macros/Misc/BPLATFORM.sci" */
function BPLATFORM() {
BPLATFORM.prototype.define = function BPLATFORM() {
- plen = 2;
- csiz = 2;
- phi = 0;
- xmin = -5;
- xmax = 5;
- ymin = 0;
- ymax = 15;
+ this.plen = 2;
+ this.csiz = 2;
+ this.phi = 0;
+ this.xmin = -5;
+ 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 = [[plen],[csiz],[phi],[xmin],[xmax],[ymin],[ymax]];
+ 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);
@@ -33,27 +33,27 @@ function BPLATFORM() {
model = arg1.model;
dstate = model.dstate;
while (true) {
- [ok,plen,csiz,phi,xmin,xmax,ymin,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);
+ [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) {
break;
}
mess = [];
- if (plen<=0||csiz<=0) {
+ if (this.plen<=0||this.csiz<=0) {
mess = [[mess],["Pendulum length and cart size must be positive."],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (xmin>=xmax) {
+ if (this.xmin>=this.xmax) {
mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- rpar = [[plen],[csiz],[phi],[xmin],[xmax],[ymin],[ymax]];
+ rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
model.rpar = rpar;
graphics.exprs = exprs;
this.x.graphics = graphics;