equal
deleted
inserted
replaced
28 } |
28 } |
29 }); |
29 }); |
30 }; |
30 }; |
31 |
31 |
32 // Open WebSocket to relative "/ws" address |
32 // Open WebSocket to relative "/ws" address |
33 var ws = new WebSocket(window.location.href.replace(/^http(s?:\/\/[^\/]*)\/.*$/, 'ws$1/ws')); |
33 |
|
34 var ws_url = |
|
35 window.location.href.replace(/^http(s?:\/\/[^\/]*)\/.*$/, 'ws$1/ws') |
|
36 + '?mode=' + (window.location.hash == "#watchdog" |
|
37 ? "watchdog" |
|
38 : "multiclient"); |
|
39 var ws = new WebSocket(ws_url); |
34 ws.binaryType = 'arraybuffer'; |
40 ws.binaryType = 'arraybuffer'; |
35 |
41 |
36 const dvgetters = { |
42 const dvgetters = { |
37 INT: (dv,offset) => [dv.getInt16(offset, true), 2], |
43 INT: (dv,offset) => [dv.getInt16(offset, true), 2], |
38 BOOL: (dv,offset) => [dv.getInt8(offset, true), 1], |
44 BOOL: (dv,offset) => [dv.getInt8(offset, true), 1], |