|
@ -96,6 +96,7 @@ import { |
|
|
airCompressorChannelSelectJSON, |
|
|
airCompressorChannelSelectJSON, |
|
|
AirOutletProportionalValve_getStateJSON, |
|
|
AirOutletProportionalValve_getStateJSON, |
|
|
airInletProportionalValve_getStateJSON, |
|
|
airInletProportionalValve_getStateJSON, |
|
|
|
|
|
airProportionalValveIsBusyJSON, |
|
|
} from '@/mock/command' |
|
|
} from '@/mock/command' |
|
|
import { useSealStore, useTestStore, useWebSocketStore } from '@/store' |
|
|
import { useSealStore, useTestStore, useWebSocketStore } from '@/store' |
|
|
import { storeToRefs } from 'pinia' |
|
|
import { storeToRefs } from 'pinia' |
|
@ -239,6 +240,20 @@ const wait = async ms => { |
|
|
await new Promise(resolve => setTimeout(resolve, ms)) |
|
|
await new Promise(resolve => setTimeout(resolve, ms)) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const waitAirFinish = async () => { |
|
|
|
|
|
await new Promise(async resolve => { |
|
|
|
|
|
let flag = true |
|
|
|
|
|
while (flag) { |
|
|
|
|
|
await wait(500) |
|
|
|
|
|
websocketStore.sendCommandMsg(airProportionalValveIsBusyJSON) |
|
|
|
|
|
if (sealStore.AirProportionalValveIsBusy == 0) { |
|
|
|
|
|
flag = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
resolve() |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const sleepVal1 = ref(1) |
|
|
const sleepVal1 = ref(1) |
|
|
const sleepVal2 = ref(15) |
|
|
const sleepVal2 = ref(15) |
|
|
|
|
|
|
|
@ -256,6 +271,9 @@ const newStartTest = async flag => { |
|
|
// 风机入口比例阀闭合 风机出口比例阀闭合 |
|
|
// 风机入口比例阀闭合 风机出口比例阀闭合 |
|
|
websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0])) |
|
|
websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0])) |
|
|
websocketStore.sendCommandMsg(AirOutletProportionalValve_setStateJSON([0])) |
|
|
websocketStore.sendCommandMsg(AirOutletProportionalValve_setStateJSON([0])) |
|
|
|
|
|
// 等待风机入口比例阀闭合 风机出口比例阀闭合完毕后再打开空压机 |
|
|
|
|
|
websocketStore.sendCommandMsg(airProportionalValveIsBusyJSON) |
|
|
|
|
|
await waitAirFinish() |
|
|
// 空压机打开 |
|
|
// 空压机打开 |
|
|
websocketStore.sendCommandMsg(airCompressor_setStateJSON([1])) |
|
|
websocketStore.sendCommandMsg(airCompressor_setStateJSON([1])) |
|
|
// 等待1s |
|
|
// 等待1s |
|
|