diff --git a/package.json b/package.json index 16b4fd57..20e5a9dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "0.27.2", + "version": "0.27.3", "private": true, "scripts": { "dev": "react-scripts start", diff --git a/src/contexts/RobotContext.tsx b/src/contexts/RobotContext.tsx index 532a8d37..4d920993 100644 --- a/src/contexts/RobotContext.tsx +++ b/src/contexts/RobotContext.tsx @@ -246,14 +246,17 @@ export default ({ children }: any) => { setRos(rosClient); rosClient?.on("connection", function () { + console.log("Connected to websocket server."); connectionsReducer?.ros === null && dispatcher({ type: "ros", payload: true }); }); rosClient?.on("error", function (error) { + console.log("Error connecting to websocket server: ", error); connectionsReducer?.ros === null && dispatcher({ type: "ros", payload: false }); }); rosClient?.on("close", function () { + console.log("Connection to websocket server closed."); connectionsReducer?.ros === null && dispatcher({ type: "ros", payload: false }); });