comment out gpio stuff
This commit is contained in:
+24
-20
@@ -19,19 +19,19 @@ export const GamePage = () => {
|
||||
url: `/api/ws/room?room=${room}`,
|
||||
// url: "wss://echo.websocket.org",
|
||||
onMessage({message}) {
|
||||
const msg = message as any;
|
||||
if (msg.type === "gpio") {
|
||||
if (picoRef.current) {
|
||||
const handle = picoRef.current.getPicoConsoleHandle();
|
||||
if (handle) {
|
||||
console.log("updating pico gpio");
|
||||
(handle.gpio as any).dontSend = true;
|
||||
handle.gpio.length = 0;
|
||||
handle.gpio.push(...msg.gpio);
|
||||
(handle.gpio as any).dontSend = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// const msg = message as any;
|
||||
// if (msg.type === "gpio") {
|
||||
// if (picoRef.current) {
|
||||
// const handle = picoRef.current.getPicoConsoleHandle();
|
||||
// if (handle) {
|
||||
// console.log("updating pico gpio");
|
||||
// (handle.gpio as any).dontSend = true;
|
||||
// handle.gpio.length = 0;
|
||||
// handle.gpio.push(...msg.gpio);
|
||||
// (handle.gpio as any).dontSend = false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
console.log('message', message);
|
||||
}
|
||||
})
|
||||
@@ -95,13 +95,17 @@ export const GamePage = () => {
|
||||
border: 2px solid limegreen;
|
||||
}
|
||||
`}>
|
||||
<Pico8Console ref={picoRef} carts={info.release.carts} onGpioChange={(gpio: number[]) => {
|
||||
console.log("sending gpio");
|
||||
socket.sendMessage({
|
||||
type: "gpio",
|
||||
gpio,
|
||||
});
|
||||
}} />
|
||||
<Pico8Console
|
||||
ref={picoRef}
|
||||
carts={info.release.carts}
|
||||
// onGpioChange={(gpio: number[]) => {
|
||||
// console.log("sending gpio");
|
||||
// socket.sendMessage({
|
||||
// type: "gpio",
|
||||
// gpio,
|
||||
// });
|
||||
// }}
|
||||
/>
|
||||
</div>
|
||||
<div className={css`
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user