Remove console spam

This commit is contained in:
Matthew Stratford 2021-03-21 13:20:01 +00:00
parent 2642d2d3fb
commit 6f33fb7667

View file

@ -23,7 +23,6 @@ export const bapsicleMiddleware: Middleware<{}, RootState, Dispatch<any>> = (
if (BAPSicleWS) { if (BAPSicleWS) {
BAPSicleWS!.onmessage = (event) => { BAPSicleWS!.onmessage = (event) => {
var message = JSON.parse(event.data); var message = JSON.parse(event.data);
console.log(message);
if ("channel" in message) { if ("channel" in message) {
switch (message.command) { switch (message.command) {
case "POS": case "POS":
@ -36,9 +35,8 @@ export const bapsicleMiddleware: Middleware<{}, RootState, Dispatch<any>> = (
break; break;
case "STATUS": case "STATUS":
// Bapsicle is telling us it's full state on this channel. Let's update the UI. // Bapsicle is telling us it's full state on this channel. Let's update the UI.
console.log("STATUS");
console.log(message.data);
// TODO: This hangs the state of timers etc for a second or two, maybe do stuff more selectively
const channel = message.channel; const channel = message.channel;
// Update the player state // Update the player state
const bapsicle_state = message.data; const bapsicle_state = message.data;
@ -133,6 +131,8 @@ export const bapsicleMiddleware: Middleware<{}, RootState, Dispatch<any>> = (
// connection.actions.setServerState(message.serverName) // connection.actions.setServerState(message.serverName)
//); //);
} }
} else {
console.log("Unhandled: ", message);
} }
}; };
} }