Skip to content

Commit fcad2c9

Browse files
committed
fix: accept binary WebSocket subprotocol in rotator simulator
1 parent de7d656 commit fcad2c9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/rotator-sim.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ function posStr() {
115115
return `az=${az.toFixed(1)}° el=${el.toFixed(1)}°`;
116116
}
117117

118-
const wss = new WebSocketServer({ port: PORT });
118+
const wss = new WebSocketServer({
119+
port: PORT,
120+
handleProtocols: (protocols) => protocols.has('binary') ? 'binary' : false,
121+
});
119122

120123
console.log(`\n Rotator simulator listening on ws://localhost:${PORT}`);
121124
console.log(` Az max: ${AZ_MAX_SPEED}°/s El max: ${EL_MAX_SPEED}°/s Accel: ${ACCEL}°/s²`);

0 commit comments

Comments
 (0)