function startAcq(){
- console.log("start");
- $("button").text("stop");
+ $("button").text("stop");
ws = new WebSocket("ws://localhost:3000");
// メッセージ受信時の処理
}else{
ws.send("acq");
draw(JSON.parse(event.data));
- console.log(event.data);
- console.log(i);
+ console.log(i);
i = i + 1;
}
};
}
function stopAcq(){
+ $("button").text("start");
console.log("stop");
- $("button").text("start");
ws.close(1000, "close");
}
// CanvasのコンテキストにImageDataを設定
ctx.putImageData(imgData, 0, 0);
}
+