diff options
author | Sunil Shetye | 2018-06-25 12:08:56 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-06-25 12:45:27 +0530 |
commit | 7c70459c10aed0d74ee03896abaf47fefdbf7c8f (patch) | |
tree | 6f6acc6a5087295c6e59f0f94bfda5025049d5fa /js/Misc/EDGETRIGGER.js | |
parent | 870479a2e4b932426a904b2ebae7e4ee72037326 (diff) | |
download | sci2js-7c70459c10aed0d74ee03896abaf47fefdbf7c8f.tar.gz sci2js-7c70459c10aed0d74ee03896abaf47fefdbf7c8f.tar.bz2 sci2js-7c70459c10aed0d74ee03896abaf47fefdbf7c8f.zip |
separate out code for getvalue
Diffstat (limited to 'js/Misc/EDGETRIGGER.js')
-rw-r--r-- | js/Misc/EDGETRIGGER.js | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/js/Misc/EDGETRIGGER.js b/js/Misc/EDGETRIGGER.js index e8cbd733..fc4f063f 100644 --- a/js/Misc/EDGETRIGGER.js +++ b/js/Misc/EDGETRIGGER.js @@ -1,38 +1,38 @@ /* autogenerated from "macros/Misc/EDGETRIGGER.sci" */ function EDGETRIGGER() { EDGETRIGGER.prototype.define = function EDGETRIGGER() { -edge=1; -model=scicos_model(); -model.sim=list("edgetrig",4); -model.in1=1; -model.out=1; -model.dstate=0; -model.nzcross=1; -model.ipar=sign(edge); -model.blocktype="c"; -model.dep_ut=[true,false]; -exprs=[string(edge)]; -gr_i=[]; -x=standard_define([3,2],model,exprs,gr_i); + edge = 1; + model = scicos_model(); + model.sim = list("edgetrig",4); + model.in1 = 1; + model.out = 1; + model.dstate = 0; + model.nzcross = 1; + model.ipar = sign(edge); + model.blocktype = "c"; + model.dep_ut = [true,false]; + exprs = [string(edge)]; + gr_i = []; + x = standard_define([3,2],model,exprs,gr_i); } EDGETRIGGER.prototype.details = function EDGETRIGGER() { } EDGETRIGGER.prototype.get = function EDGETRIGGER() { } EDGETRIGGER.prototype.set = function EDGETRIGGER() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,edge,exprs]=scicos_getvalue("Set edge trigger block parameters",["rising (1), falling (-1), both (0)"],list("vec",1),exprs); -if (!ok) { + x = arg1; + graphics = arg1.graphics; + exprs = graphics.exprs; + model = arg1.model; + while (true) { + [ok,edge,exprs] = scicos_getvalue("Set edge trigger block parameters",["rising (1), falling (-1), both (0)"],list("vec",1),exprs); + if (!ok) { break; } -model.ipar=sign(edge); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; + model.ipar = sign(edge); + graphics.exprs = exprs; + x.graphics = graphics; + x.model = model; break; } } |