summaryrefslogtreecommitdiff
path: root/details.js
diff options
context:
space:
mode:
authorASP12342016-07-09 11:01:32 +0000
committerASP12342016-07-09 11:01:32 +0000
commit09300fe8478b47dc6d5a47085f1ef26204788246 (patch)
tree2642049d3b5da7a6a8cfd90714b9111fddf7258f /details.js
parentcfc8fd0436799d49c0eac50f85e00ad45214d233 (diff)
downloadxcos-on-web-09300fe8478b47dc6d5a47085f1ef26204788246.tar.gz
xcos-on-web-09300fe8478b47dc6d5a47085f1ef26204788246.tar.bz2
xcos-on-web-09300fe8478b47dc6d5a47085f1ef26204788246.zip
Implement STEP_FUNCTION Block
Diffstat (limited to 'details.js')
-rw-r--r--details.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/details.js b/details.js
index e9e34a1..fa4211e 100644
--- a/details.js
+++ b/details.js
@@ -461,7 +461,30 @@ function CLKSPLIT_f() {
}
}
+function STEP() {
+ STEP.prototype.internal = function STEP() {
+ this.rpar=[[0],[1]];
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["step_func"]),new ScilabDouble([4]));
+ model.evtin = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.out2 = new ScilabDouble([1]);
+ model.outtyp = new ScilabDouble([1]);
+ model.firing = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble(...this.rpar);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([1],...this.rpar);
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"STEP\",sz(1),sz(2));"]);
+
+ var block = new standard_define(new ScilabDouble([80, 80]), model,exprs, gr_i); // 1 -> 80
+ block.graphics.style = new ScilabString(["STEP"]);
+ return block;
+ }
+}
function BasicBlock() {