# HG changeset patch # User Edouard Tisserant # Date 1665568564 -7200 # Node ID 82882a9f91ce704ca1b9460edc31367c18328734 # Parent ecf43c7ac1fb1d9383982917514592dfdef42a1a SVGHMI: cosmetic fixes diff -r ecf43c7ac1fb -r 82882a9f91ce svghmi/svghmi.js --- a/svghmi/svghmi.js Wed Oct 12 11:09:33 2022 +0200 +++ b/svghmi/svghmi.js Wed Oct 12 11:56:04 2022 +0200 @@ -23,7 +23,7 @@ // Open WebSocket to relative "/ws" address var has_watchdog = window.location.hash == "#watchdog"; -var ws_url = +var ws_url = window.location.href.replace(/^http(s?:\/\/[^\/]*)\/.*$/, 'ws$1/ws') + '?mode=' + (has_watchdog ? "watchdog" : "multiclient"); @@ -148,8 +148,8 @@ const typedarray_types = { INT: (number) => new Int16Array([number]), - BOOL: (truth) => new Int16Array([truth]), - NODE: (truth) => new Int16Array([truth]), + BOOL: (truth) => new Int8Array([truth]), + NODE: (truth) => new Int8Array([truth]), REAL: (number) => new Float32Array([number]), STRING: (str) => { // beremiz default string max size is 128