|
@@ -133,7 +133,7 @@ object ModBusController {
|
|
|
}
|
|
}
|
|
|
LogUtil.i("initDevicesStatus 设备(${bytes[0].toInt()})类型:$type")
|
|
LogUtil.i("initDevicesStatus 设备(${bytes[0].toInt()})类型:$type")
|
|
|
// TODO 待完善
|
|
// TODO 待完善
|
|
|
- Executor.delayOnMain(REPEAT_FREQUENCY * 2) {
|
|
|
|
|
|
|
+ Executor.delayOnMain(REPEAT_FREQUENCY * 3) {
|
|
|
initLock() // 打开所有无锁的卡扣、关闭所有有锁的卡扣、读取所有锁的RFID
|
|
initLock() // 打开所有无锁的卡扣、关闭所有有锁的卡扣、读取所有锁的RFID
|
|
|
initKey() // 打开所有无钥匙的卡扣、关闭所有有钥匙的卡扣、关闭所有钥匙灯光、读取所有钥匙的RFID
|
|
initKey() // 打开所有无钥匙的卡扣、关闭所有有钥匙的卡扣、关闭所有钥匙灯光、读取所有钥匙的RFID
|
|
|
}
|
|
}
|
|
@@ -183,9 +183,11 @@ object ModBusController {
|
|
|
val mac = PresentationManager.mConfigKeyList.find { it.rfid == rfid }?.keyMac
|
|
val mac = PresentationManager.mConfigKeyList.find { it.rfid == rfid }?.keyMac
|
|
|
updateKeyMac(dockBean.addr.toInt(), key.isLeft, mac!!)
|
|
updateKeyMac(dockBean.addr.toInt(), key.isLeft, mac!!)
|
|
|
// TODO 蓝牙准备操作
|
|
// TODO 蓝牙准备操作
|
|
|
-// BusinessManager.prepareBle(mac, ActivityUtils.currentActivity() as BaseActivity<*>, { _,_,_ -> }) { _,_ ->
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+ BusinessManager.prepareBle(mac, ActivityUtils.currentActivity() as BaseActivity<*>, { b,s,_ ->
|
|
|
|
|
+ (ActivityUtils.currentActivity() as BaseActivity<*>).handleLoading(b, s)
|
|
|
|
|
+ }) { _,_ ->
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
controlKeyBuckle(false, key.isLeft, dockBean.addr.toInt() - 1)
|
|
controlKeyBuckle(false, key.isLeft, dockBean.addr.toInt() - 1)
|