summaryrefslogtreecommitdiff
path: root/js/Misc/HYSTHERESIS.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Misc/HYSTHERESIS.js')
-rw-r--r--js/Misc/HYSTHERESIS.js41
1 files changed, 21 insertions, 20 deletions
diff --git a/js/Misc/HYSTHERESIS.js b/js/Misc/HYSTHERESIS.js
index cb53ebca..143022ac 100644
--- a/js/Misc/HYSTHERESIS.js
+++ b/js/Misc/HYSTHERESIS.js
@@ -16,35 +16,36 @@ function HYSTHERESIS() {
model.dep_ut = [true,false];
exprs = [[string(rpar)],[string(sign(nzz))]];
gr_i = [];
- x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],model,exprs,gr_i);
}
HYSTHERESIS.prototype.details = function HYSTHERESIS() {
+ return this.x;
}
HYSTHERESIS.prototype.get = function HYSTHERESIS() {
}
HYSTHERESIS.prototype.set = function HYSTHERESIS() {
- x = arg1;
+ this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,high_lim,low_lim,out_high,out_low,nzz,exprs] = scicos_getvalue("Set parameters",[["switch on at"],["switch off at"],["output when on"],["output when off"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
- if (!ok) {
-break;
-}
- if (low_lim>high_lim) {
-message("switch on value must be larger than switch off value");
- } else {
- graphics.exprs = exprs;
- model.rpar = transpose([high_lim,low_lim,out_high,out_low]);
- if (nzz>0) {
- nzz = 2;
-}
- model.nzcross = nzz;
- x.graphics = graphics;
- x.model = model;
-break;
-}
-}
+ [ok,high_lim,low_lim,out_high,out_low,nzz,exprs] = scicos_getvalue("Set parameters",[["switch on at"],["switch off at"],["output when on"],["output when off"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ if (!ok) {
+ break;
+ }
+ if (low_lim>high_lim) {
+ message("switch on value must be larger than switch off value");
+ } else {
+ graphics.exprs = exprs;
+ model.rpar = transpose([high_lim,low_lim,out_high,out_low]);
+ if (nzz>0) {
+ nzz = 2;
+ }
+ model.nzcross = nzz;
+ this.x.graphics = graphics;
+ this.x.model = model;
+ break;
+ }
+ }
}
}