diff options
author | AMIT KUMAR YADAV | 2016-06-21 11:43:19 +0530 |
---|---|---|
committer | AMIT KUMAR YADAV | 2016-06-21 11:43:19 +0530 |
commit | 0a3788d46553caffc5240d6010e5a8e1703c5aaf (patch) | |
tree | 5dd13856ea95554c13f701a528f7b871d1060fd6 /data_structures/Diode.js | |
parent | fa438a1d06e474d9fb03a8749457707529551a80 (diff) | |
download | xcos-on-web-0a3788d46553caffc5240d6010e5a8e1703c5aaf.tar.gz xcos-on-web-0a3788d46553caffc5240d6010e5a8e1703c5aaf.tar.bz2 xcos-on-web-0a3788d46553caffc5240d6010e5a8e1703c5aaf.zip |
Fixed some edge cases
Diffstat (limited to 'data_structures/Diode.js')
-rw-r--r-- | data_structures/Diode.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/data_structures/Diode.js b/data_structures/Diode.js index 8806591..3c2d979 100644 --- a/data_structures/Diode.js +++ b/data_structures/Diode.js @@ -11,7 +11,7 @@ function Diode () { var model = scicos_model(); model.rpar = new ScilabDouble([Ids],[Vt],[Maxexp],[R]); - model.in = new ScilabDouble([1]); + model.in1 = new ScilabDouble([1]); model.out = new ScilabDouble([1]); model.sim = new ScilabString(["Diode"]); model.blocktype = new ScilabString(["c"]); @@ -21,13 +21,14 @@ function Diode () { mo.model = new ScilabString(["Diode"]); mo.inputs = new ScilabString(["p"]); mo.outputs = new ScilabString(["n"]); - mo.parameters=list(["Ids","Vt","Maxexp","R"],list(Ids,Vt,Maxexp,R)); + mo.parameters=list(new ScilabString(["Ids"),new ScilabString(["Vt"]),new ScilabString(["Maxexp"]),new ScilabString(["R"]]),list(Ids,Vt,Maxexp,R)); model.equations=mo; - var exprs = [[Ids],[Vt],[Maxexp],[R].toString()]; + var exprs = string([Ids],[Vt],[Maxexp],[R]); var gr_i = []; - this.x=new standard_define(new ScilabDouble([2,1]),model,exprs,list(gr_i,0)); + this.x=standard_define([2,1],model,exprs,list(gr_i,0)); this.x.graphics.in_implicit = new ScilabString(["I"]); this.x.graphics.out_implicit = new ScilabString(["I"]); + return new BasicBlock(this.x) } |