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