|
|
@@ -127,7 +127,8 @@ object BleBusinessManager {
|
|
|
1 -> {
|
|
|
if (res == 1) {
|
|
|
// 只能在这里断开,不能全部断开
|
|
|
- BleSendDispatcher.scheduleDisconnect(bleBean.bleDevice.mac)
|
|
|
+ BleCmdManager.shutdownOrRebootReq(mac = bleBean.bleDevice.mac)
|
|
|
+ BleSendDispatcher.scheduleDisconnect(bleBean.bleDevice.mac, 1000)
|
|
|
logger.info("断开连接发钥匙:${bleBean.bleDevice.mac}")
|
|
|
// 打开钥匙卡扣
|
|
|
val keyBean =
|
|
|
@@ -392,6 +393,7 @@ object BleBusinessManager {
|
|
|
updateBo?.let { itBO ->
|
|
|
if (BleReturnDispatcher.isConnected(currentModeEvent.bleBean.bleDevice.mac)) {
|
|
|
logger.info("当前钥匙在归还队列,断开连接")
|
|
|
+ BleCmdManager.shutdownOrRebootReq(currentModeEvent.bleBean.bleDevice.mac)
|
|
|
BleReturnDispatcher.scheduleDisconnect(currentModeEvent.bleBean.bleDevice.mac)
|
|
|
}
|
|
|
if (BleSendDispatcher.isConnected(currentModeEvent.bleBean.bleDevice.mac)) {
|
|
|
@@ -411,6 +413,7 @@ object BleBusinessManager {
|
|
|
.controlKeyBuckle(false, currentModeEvent.bleBean.bleDevice.mac)
|
|
|
LoadingEvent.sendLoadingEvent()
|
|
|
ThreadUtils.runOnIO {
|
|
|
+ BleCmdManager.shutdownOrRebootReq(mac = currentModeEvent.bleBean.bleDevice.mac)
|
|
|
BleReturnDispatcher.scheduleDisconnect(currentModeEvent.bleBean.bleDevice.mac)
|
|
|
DataBusiness.checkMyTodoForHandleKey(currentModeEvent.bleBean.bleDevice.mac)
|
|
|
}
|
|
|
@@ -635,7 +638,8 @@ object BleBusinessManager {
|
|
|
},
|
|
|
onCancelClick = {
|
|
|
PopTip.build().tip(CommonUtils.getStr("continue_the_ticket"))
|
|
|
- BleReturnDispatcher.scheduleDisconnect(bleDevice.mac)
|
|
|
+ BleCmdManager.shutdownOrRebootReq(mac = bleDevice.mac)
|
|
|
+ BleReturnDispatcher.scheduleDisconnect(bleDevice.mac, 1000)
|
|
|
logger.info("断开连接归还取消:${bleDevice.mac}")
|
|
|
// 打开卡扣,防止初始化的时候选择不处理钥匙导致无法使用
|
|
|
HardwareMode.getCurrentHardwareMode()
|