Heartbeat

This commit is contained in:
chk
2026-06-12 17:03:38 +02:00
parent 4db6c472b7
commit 6fc6605080
11 changed files with 342 additions and 32 deletions

View File

@@ -92,7 +92,16 @@ function createApp(options = {}) {
const senders = [];
for (const [key, ctrl] of Object.entries(cfg.controllers)) {
const name = key.charAt(0).toUpperCase() + key.slice(1);
const instance = new TelnetSenderClass(ctrl.ip, ctrl.port, ...ctrl.axes);
// Konstruktor erwartet 7 Achsen-Slots (x y z a b c e) vor dem Options-Objekt.
// Auf genau 7 auffüllen, damit heartbeatInterval nicht als Achsen-Arg landet.
const axes7 = [...(ctrl.axes ?? [])];
while (axes7.length < 7) axes7.push(null);
const instance = new TelnetSenderClass(ctrl.ip, ctrl.port, ...axes7, {
heartbeatInterval: ctrl.heartbeatInterval,
deadTimeout: 2 * ctrl.heartbeatInterval,
});
senders.push({ name, instance });
}