|
@ -240,17 +240,23 @@ const timerFunc = () => { |
|
|
const changeAirStatus = flag => { |
|
|
const changeAirStatus = flag => { |
|
|
if (flag == 1) { |
|
|
if (flag == 1) { |
|
|
if (testStore.airCompressor) { |
|
|
if (testStore.airCompressor) { |
|
|
|
|
|
// 空压机通道打开 空压机关闭 比例阀关闭 |
|
|
|
|
|
websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([1])) |
|
|
websocketStore.sendCommandMsg(airCompressor_setStateJSON([0])) |
|
|
websocketStore.sendCommandMsg(airCompressor_setStateJSON([0])) |
|
|
|
|
|
websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0])) |
|
|
|
|
|
websocketStore.sendCommandMsg( |
|
|
|
|
|
AirOutletProportionalValve_setStateJSON([0]), |
|
|
|
|
|
) |
|
|
testStore.updateAirCompressor(false) |
|
|
testStore.updateAirCompressor(false) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
if (!testStore.airCompressor) { |
|
|
if (!testStore.airCompressor) { |
|
|
// 开始充气时关闭两个阀门 |
|
|
|
|
|
|
|
|
// 空压机通道关闭 空压机打开 比例阀关闭 |
|
|
websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0])) |
|
|
websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0])) |
|
|
websocketStore.sendCommandMsg( |
|
|
websocketStore.sendCommandMsg( |
|
|
AirOutletProportionalValve_setStateJSON([0]), |
|
|
AirOutletProportionalValve_setStateJSON([0]), |
|
|
) |
|
|
) |
|
|
websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([1])) |
|
|
|
|
|
|
|
|
websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([0])) |
|
|
websocketStore.sendCommandMsg(airCompressor_setStateJSON([1])) |
|
|
websocketStore.sendCommandMsg(airCompressor_setStateJSON([1])) |
|
|
testStore.updateAirCompressor(true) |
|
|
testStore.updateAirCompressor(true) |
|
|
} |
|
|
} |
|
@ -263,11 +269,10 @@ const handleStartTest = flag => { |
|
|
// 也就是将getState中获取的当前值currentAirPressure赋予 |
|
|
// 也就是将getState中获取的当前值currentAirPressure赋予 |
|
|
// 开始测试需要记录时间 |
|
|
// 开始测试需要记录时间 |
|
|
timerFunc() |
|
|
timerFunc() |
|
|
// 关闭空压机通道 |
|
|
|
|
|
websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([0])) |
|
|
|
|
|
|
|
|
// 空压机通道打开 空压机关闭 比例阀关闭 记录当前气压 |
|
|
|
|
|
websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([1])) |
|
|
websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0])) |
|
|
websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0])) |
|
|
websocketStore.sendCommandMsg(AirOutletProportionalValve_setStateJSON([0])) |
|
|
websocketStore.sendCommandMsg(AirOutletProportionalValve_setStateJSON([0])) |
|
|
// 停止冲入空气,即关闭空压机 |
|
|
|
|
|
websocketStore.sendCommandMsg(airCompressor_setStateJSON([0])) |
|
|
websocketStore.sendCommandMsg(airCompressor_setStateJSON([0])) |
|
|
testStore.updateAirCompressor(false) |
|
|
testStore.updateAirCompressor(false) |
|
|
sealStore.updateOldAirPressure(sealStore.currentAirPressure) |
|
|
sealStore.updateOldAirPressure(sealStore.currentAirPressure) |
|
|