2 const liba
= require("../liba");
3 function assert(expr
) {
8 function do_leak_check() {
9 for (const arg
of arguments
) {
12 if (liba
.do_leak_check
) {
16 var ctx
= new liba
.pid_neuro();
17 ctx
.set_wpid(1, 0, 0).set_kpid(10, 1, 0.1, 1);
18 console
.log(ctx
.zero().run(10, 0));
19 console
.log(ctx
.zero().inc(10, 0));
20 assert("ctx.k != undefined");
21 assert("ctx.kp != undefined");
22 assert("ctx.ki != undefined");
23 assert("ctx.kd != undefined");
24 assert("ctx.wp != undefined");
25 assert("ctx.wi != undefined");
26 assert("ctx.wd != undefined");
27 assert("ctx.outmax != undefined");
28 assert("ctx.outmin != undefined");
29 assert("ctx.out != undefined");
30 assert("ctx.fdb != undefined");
31 assert("ctx.err != undefined");
32 assert("ctx.ec != undefined");