diff options
Diffstat (limited to 'js/Electrical/Switch.js')
-rw-r--r-- | js/Electrical/Switch.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/Electrical/Switch.js b/js/Electrical/Switch.js index d3c8d95b..e45d1b5c 100644 --- a/js/Electrical/Switch.js +++ b/js/Electrical/Switch.js @@ -2,8 +2,8 @@ function Switch() { Switch.prototype.define = function Switch() { model = scicos_model(); - Ron = 0.01; - Roff = 1e5; + this.Ron = 0.01; + this.Roff = 1e5; S = [["Ron"],["Roff"]]; Z = eval(S); model.sim = "Switch"; @@ -36,11 +36,11 @@ function Switch() { exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,Ron,Roff,exprs] = scicos_getvalue("Set non-ideal electrical switch parameters",[["Resistance in On state (Ohm)"],["Resistance in Off state (Ohm)"]],list("vec",1,"vec",1),exprs); + [ok,this.Ron,this.Roff,exprs] = scicos_getvalue("Set non-ideal electrical switch parameters",[["Resistance in On state (Ohm)"],["Resistance in Off state (Ohm)"]],list("vec",1,"vec",1),exprs); if (!ok) { break; } - model.equations.parameters[2-1] = list(Ron,Roff); + model.equations.parameters[2-1] = list(this.Ron,this.Roff); graphics.exprs = exprs; this.x.graphics = graphics; this.x.model = model; |