@techolution-ai/computer-vision
Advanced tools
Comparing version
@@ -14,3 +14,2 @@ // src/messages/messages-provider.tsx | ||
clientRef.current?.subscribe(topic, { qos: 0 }); | ||
console.log(`[mqtt]: subscribed to topic (index=${index}):`, topic); | ||
}; | ||
@@ -36,8 +35,3 @@ const registerListener = (topic, listener) => { | ||
} | ||
console.log( | ||
`[mqtt]: removing the listener from topic (index=${index}):`, | ||
topic | ||
); | ||
if (listenersRef.current[topic].length === 0 && clientRef.current && clientRef.current.connected) { | ||
console.log(`[mqtt]: unsubscribed to topic (index=${index}):`, topic); | ||
clientRef.current?.unsubscribe(topic); | ||
@@ -53,3 +47,2 @@ } | ||
clientRef.current.on("connect", () => { | ||
console.log("[mqtt]: connected"); | ||
Object.keys(listenersRef.current).forEach((topic) => { | ||
@@ -69,6 +62,4 @@ listenersRef.current[topic].forEach((listener, index) => { | ||
clientRef.current.on("reconnect", () => { | ||
console.log(`[mqtt]: reconnect`); | ||
}); | ||
clientRef.current.on("message", (topic, message) => { | ||
console.log(`[mqtt]: new message ->`, { topic }); | ||
for (const listener of listenersRef.current[topic] || []) { | ||
@@ -80,3 +71,2 @@ listener.callback(topic, message.toString()); | ||
} catch (error) { | ||
console.log(`[mqtt]: error: `, error); | ||
} | ||
@@ -109,3 +99,2 @@ }, []); | ||
clientRef.current = null; | ||
console.log("[mqtt]: disconnected: " + client.disconnected); | ||
} | ||
@@ -112,0 +101,0 @@ }; |
@@ -41,2 +41,5 @@ // src/scanner/status.tsx | ||
render: () => /* @__PURE__ */ jsx(ScanComplete, {}) | ||
}, | ||
camera_loading: { | ||
message: "Loading Camera ..." | ||
} | ||
@@ -57,3 +60,2 @@ }; | ||
const statusDetails = finalStatusMap[status]; | ||
console.log("status", statusDetails); | ||
if (!statusDetails) return /* @__PURE__ */ jsx(StatusItem, { message: status }); | ||
@@ -60,0 +62,0 @@ return /* @__PURE__ */ jsx( |
{ | ||
"name": "@techolution-ai/computer-vision", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
727136
-0.18%1651
-1.08%