diff options
Diffstat (limited to 'js/Misc/BPLATFORM.js')
-rw-r--r-- | js/Misc/BPLATFORM.js | 26 |
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; |