From db9b40f2fc72ebafe63589b64f4b8f4091331c8c Mon Sep 17 00:00:00 2001 From: bragaz_rexita Date: Fri, 28 Nov 2025 12:28:17 +0700 Subject: [PATCH 1/3] Repair compresso --- src/assets/svg/compressorB_rev.svg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/assets/svg/compressorB_rev.svg b/src/assets/svg/compressorB_rev.svg index cf3bfe0..8346838 100644 --- a/src/assets/svg/compressorB_rev.svg +++ b/src/assets/svg/compressorB_rev.svg @@ -1971,12 +1971,12 @@ MPa #### #### - #### + #### #### - #### + #### #### - #### - #### + #### + #### #### #### Plant Air Reciever -- 2.49.1 From 94e011e5c751ac8f1787e0f15fddb7e17ae95ce0 Mon Sep 17 00:00:00 2001 From: bragaz_rexita Date: Fri, 28 Nov 2025 12:49:56 +0700 Subject: [PATCH 2/3] Repair topic mqtt --- src/components/Global/MqttConnection.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Global/MqttConnection.jsx b/src/components/Global/MqttConnection.jsx index ab8287c..829f598 100644 --- a/src/components/Global/MqttConnection.jsx +++ b/src/components/Global/MqttConnection.jsx @@ -2,7 +2,7 @@ import mqtt from 'mqtt'; const mqttUrl = `${import.meta.env.VITE_MQTT_SERVER ?? 'ws://localhost:1884'}`; -const topics = ['PIU_GGCP/Devices/PB']; +const topics = ['cod/air_dryer/air_dryer1']; const options = { keepalive: 30, clientId: 'react_mqtt_' + Math.random().toString(16).substr(2, 8), @@ -66,7 +66,8 @@ const listenMessage = (callback) => { const setValSvg = (listenTopic, svg) => { client.on('message', (topic, message) => { - if (topic == listenTopic) { + // console.log(topic ,' = ', listenTopic); + if (topic === listenTopic) { const objChanel = JSON.parse(message); Object.entries(objChanel).forEach(([key, value]) => { @@ -78,7 +79,7 @@ const setValSvg = (listenTopic, svg) => { } else if (value === false) { el.style.display = 'none'; } else if (!isNaN(value)) { - el.textContent = Number(value ?? 0.0); + el.textContent = Number(value ?? 0.0).toFixed(2); } else { el.textContent = value; } -- 2.49.1 From 55a47c3a25581f84180e89a14d264846bdf97a42 Mon Sep 17 00:00:00 2001 From: bragaz_rexita Date: Fri, 28 Nov 2025 12:50:09 +0700 Subject: [PATCH 3/3] Repair svg compressor B --- src/pages/home/SvgCompressorB.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/home/SvgCompressorB.jsx b/src/pages/home/SvgCompressorB.jsx index 32e1370..418a39c 100644 --- a/src/pages/home/SvgCompressorB.jsx +++ b/src/pages/home/SvgCompressorB.jsx @@ -6,9 +6,7 @@ import SvgViewer from './SvgViewer'; import filePathSvg from '../../assets/svg/compressorB_rev.svg'; const { Text } = Typography; - -// const filePathSvg = '/src/assets/svg/test-new.svg'; -const topicMqtt = 'PIU_GGCP/Devices/PB'; +const topicMqtt = 'cod/air_dryer/air_dryer1'; const SvgCompressorB = () => { return ( -- 2.49.1