diff options
Diffstat (limited to 'js/Electrical/Switch.js')
-rw-r--r-- | js/Electrical/Switch.js | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/js/Electrical/Switch.js b/js/Electrical/Switch.js index 221c795f..250033f5 100644 --- a/js/Electrical/Switch.js +++ b/js/Electrical/Switch.js @@ -1,24 +1,5 @@ /* autogenerated from "macros/Electrical/Switch.sci" */ function Switch() { -Switch.prototype.get = function Switch() { -} -Switch.prototype.set = function Switch() { -x=arg1; -graphics=arg1.graphics; -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); -if (!ok) { -break -} -model.equations.parameters[2-1]=list(Ron,Roff); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} Switch.prototype.define = function Switch() { model=scicos_model(); Ron=0.01; @@ -45,4 +26,23 @@ x.graphics.out_implicit=["I"]; } Switch.prototype.details = function Switch() { } +Switch.prototype.get = function Switch() { +} +Switch.prototype.set = function Switch() { +x=arg1; +graphics=arg1.graphics; +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); +if (!ok) { +break +} +model.equations.parameters[2-1]=list(Ron,Roff); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } |