summaryrefslogtreecommitdiff
path: root/js/Misc/BACKLASH.js
diff options
context:
space:
mode:
authorSunil Shetye2018-06-25 12:08:56 +0530
committerSunil Shetye2018-06-25 12:45:27 +0530
commit7c70459c10aed0d74ee03896abaf47fefdbf7c8f (patch)
tree6f6acc6a5087295c6e59f0f94bfda5025049d5fa /js/Misc/BACKLASH.js
parent870479a2e4b932426a904b2ebae7e4ee72037326 (diff)
downloadsci2js-7c70459c10aed0d74ee03896abaf47fefdbf7c8f.tar.gz
sci2js-7c70459c10aed0d74ee03896abaf47fefdbf7c8f.tar.bz2
sci2js-7c70459c10aed0d74ee03896abaf47fefdbf7c8f.zip
separate out code for getvalue
Diffstat (limited to 'js/Misc/BACKLASH.js')
-rw-r--r--js/Misc/BACKLASH.js60
1 files changed, 30 insertions, 30 deletions
diff --git a/js/Misc/BACKLASH.js b/js/Misc/BACKLASH.js
index a8f07cf1..bea4e1af 100644
--- a/js/Misc/BACKLASH.js
+++ b/js/Misc/BACKLASH.js
@@ -1,45 +1,45 @@
/* autogenerated from "macros/Misc/BACKLASH.sci" */
function BACKLASH() {
BACKLASH.prototype.define = function BACKLASH() {
-exprs=[["0"],["1"],["1"]];
-model=scicos_model();
-model.sim=list("backlash",4);
-model.in1=1;
-model.out=1;
-model.rpar=[[0],[1]];
-model.nzcross=2;
-model.blocktype="c";
-model.dep_ut=[true,false];
-gr_i=[];
-x=standard_define([3,2],model,exprs,gr_i);
+ exprs = [["0"],["1"],["1"]];
+ model = scicos_model();
+ model.sim = list("backlash",4);
+ model.in1 = 1;
+ model.out = 1;
+ model.rpar = [[0],[1]];
+ model.nzcross = 2;
+ model.blocktype = "c";
+ model.dep_ut = [true,false];
+ gr_i = [];
+ x = standard_define([3,2],model,exprs,gr_i);
}
BACKLASH.prototype.details = function BACKLASH() {
}
BACKLASH.prototype.get = function BACKLASH() {
}
BACKLASH.prototype.set = function BACKLASH() {
-x=arg1;
-graphics=arg1.graphics;
-exprs=graphics.exprs;
-model=arg1.model;
-rpar=model.rpar;
-while (true) {
-[ok,ini,gap,zcr,exprs]=scicos_getvalue("Set backlash parameters",[["initial output"],["gap"],["use zero-crossing (0:no, 1:yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
-if (!ok) {
+ x = arg1;
+ graphics = arg1.graphics;
+ exprs = graphics.exprs;
+ model = arg1.model;
+ rpar = model.rpar;
+ while (true) {
+ [ok,ini,gap,zcr,exprs] = scicos_getvalue("Set backlash parameters",[["initial output"],["gap"],["use zero-crossing (0:no, 1:yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ if (!ok) {
break;
}
-if (ok) {
-graphics.exprs=exprs;
-rpar[1-1]=ini;
-rpar[2-1]=gap;
-if (zcr!=0) {
-model.nzcross=2;
-} else {
-model.nzcross=0;
+ if (ok) {
+ graphics.exprs = exprs;
+ rpar[1-1] = ini;
+ rpar[2-1] = gap;
+ if (zcr!=0) {
+ model.nzcross = 2;
+ } else {
+ model.nzcross = 0;
}
-model.rpar=rpar;
-x.graphics=graphics;
-x.model=model;
+ model.rpar = rpar;
+ x.graphics = graphics;
+ x.model = model;
break;
}
}