This commit is contained in:
2026-06-14 11:39:50 +08:00
parent 8a2a68fe90
commit f6e6c7743b
+5 -9
View File
@@ -193,7 +193,7 @@ const clearQueue = () => {
const getQueueSize = () => {
return queue.length
}
// ========== RS485 优先级消息队列 END ==========
// ========== 统一消息队列 END ==========
export default {
// 开左门指令 (通过RS485站号03) - 高优先级
@@ -237,32 +237,28 @@ export default {
let op = status ? '01' : '00'
let cmd = '5AA5EE02' + op
store.state.relay.wind = status
let RS232 = getApp().globalData.RS232
await RS232.sendDataString(cmd);
return enqueue('RS232', cmd, PRIORITY.HIGH)
},
// 开灯指令 03 (通过RS232) - 高优先级
Light: async (status) => {
let op = status ? '01' : '00'
let cmd = '5AA5EE03' + op
store.state.relay.light = status
let RS232 = getApp().globalData.RS232
await RS232.sendDataString(cmd);
return enqueue('RS232', cmd, PRIORITY.HIGH)
},
// 开真空指令 04 (通过RS232) - 高优先级
Vacuum: async (status) => {
let op = status ? '01' : '00'
let cmd = '5AA5EE04' + op
store.state.relay.vacuum = status
let RS232 = getApp().globalData.RS232
await RS232.sendDataString(cmd);
return enqueue('RS232', cmd, PRIORITY.HIGH)
},
// 开关消毒指令 05 (通过RS232) - 高优先级
Disinfect: async (status) => {
let op = status ? '01' : '00'
let cmd = '5AA5EE05' + op
store.state.relay.disinfect = status
let RS232 = getApp().globalData.RS232
await RS232.sendDataString(cmd);
return enqueue('RS232', cmd, PRIORITY.HIGH)
},
// 获取温湿度(通过RS485站号02)- 低优先级
getTemp: () => {