From 65b38a516841f34e2f8a2f777ce414ab5221ac80 Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Fri, 10 Nov 2023 15:33:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=BC=80=E5=A7=8B=E5=85=85?= =?UTF-8?q?=E6=B0=94=E7=AD=89=E9=80=BB=E8=BE=91=20seal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 8 ++++---- src/components/SealTest.vue | 15 ++++++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.env b/.env index fe3f0dd..c4ae906 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ -VITE_BASE_WS1_URL=ws://192.168.8.10:19001/ -VITE_BASE_WS2_URL=ws://192.168.8.10:19002/ +# VITE_BASE_WS1_URL=ws://192.168.8.10:19001/ +# VITE_BASE_WS2_URL=ws://192.168.8.10:19002/ -# VITE_BASE_WS1_URL=ws://127.0.0.1:19001/ -# VITE_BASE_WS2_URL=ws://127.0.0.1:19002/ \ No newline at end of file +VITE_BASE_WS1_URL=ws://127.0.0.1:19001/ +VITE_BASE_WS2_URL=ws://127.0.0.1:19002/ \ No newline at end of file diff --git a/src/components/SealTest.vue b/src/components/SealTest.vue index a56c85d..5234d38 100644 --- a/src/components/SealTest.vue +++ b/src/components/SealTest.vue @@ -240,17 +240,23 @@ const timerFunc = () => { const changeAirStatus = flag => { if (flag == 1) { if (testStore.airCompressor) { + // 空压机通道打开 空压机关闭 比例阀关闭 + websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([1])) websocketStore.sendCommandMsg(airCompressor_setStateJSON([0])) + websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0])) + websocketStore.sendCommandMsg( + AirOutletProportionalValve_setStateJSON([0]), + ) testStore.updateAirCompressor(false) } } else { if (!testStore.airCompressor) { - // 开始充气时关闭两个阀门 + // 空压机通道关闭 空压机打开 比例阀关闭 websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0])) websocketStore.sendCommandMsg( AirOutletProportionalValve_setStateJSON([0]), ) - websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([1])) + websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([0])) websocketStore.sendCommandMsg(airCompressor_setStateJSON([1])) testStore.updateAirCompressor(true) } @@ -263,11 +269,10 @@ const handleStartTest = flag => { // 也就是将getState中获取的当前值currentAirPressure赋予 // 开始测试需要记录时间 timerFunc() - // 关闭空压机通道 - websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([0])) + // 空压机通道打开 空压机关闭 比例阀关闭 记录当前气压 + websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([1])) websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0])) websocketStore.sendCommandMsg(AirOutletProportionalValve_setStateJSON([0])) - // 停止冲入空气,即关闭空压机 websocketStore.sendCommandMsg(airCompressor_setStateJSON([0])) testStore.updateAirCompressor(false) sealStore.updateOldAirPressure(sealStore.currentAirPressure)