diff options
Diffstat (limited to 'js/Hydraulics/Flowmeter.js')
-rw-r--r-- | js/Hydraulics/Flowmeter.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/Hydraulics/Flowmeter.js b/js/Hydraulics/Flowmeter.js index cb848037..76c64588 100644 --- a/js/Hydraulics/Flowmeter.js +++ b/js/Hydraulics/Flowmeter.js @@ -36,15 +36,15 @@ function Flowmeter() { mo.outputs = MO; this.model.rpar = new ScilabDouble([PrametersValue]); mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName)); - this.exprs = "1"; - this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Flowmeter\",sz(1),sz(2));"]); + var exprs = "1"; + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Flowmeter\",sz(1),sz(2));"]); this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = new ScilabBoolean([false,true]); mo.model = ModelName; this.model.equations = new ScilabDouble([mo]); this.model.in = new ScilabDouble([ones(size(MI,"*"),1)]); this.model.out = new ScilabDouble([ones(size(MO,"*"),1)]); - this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabString([this.exprs]),list(this.gr_i,0)); + this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabString([exprs]),list(gr_i,0)); this.x.graphics.in_implicit = Typein; this.x.graphics.out_implicit = Typeout; return new BasicBlock(this.x); @@ -59,8 +59,8 @@ function Flowmeter() { return options; } Flowmeter.prototype.set = function Flowmeter() { - this.exprs = this.graphics.exprs; - this.exprs = this.x.graphics.exprs; + var exprs = this.graphics.exprs; + var exprs = this.x.graphics.exprs; while (false) { var ok = true; this.Qini = arguments[0]["Qini"]; @@ -68,7 +68,7 @@ function Flowmeter() { break; } this.x.model.equations.parameters[2-1] = list(this.Qini); - this.x.graphics.exprs = this.exprs; + this.x.graphics.exprs = exprs; break; } return new BasicBlock(this.x); |