|
|
@@ -26,10 +26,10 @@ class DeviceBean(
|
|
|
when (it) {
|
|
|
0x00.toByte() -> {
|
|
|
// TODO 未验证
|
|
|
- val leftHasKey = (byteArray[3].toInt() shr 0) and 0x1 == 1
|
|
|
- val isLeftCharging = (byteArray[3].toInt() shr 1) and 0x1 == 1
|
|
|
- val rightHasKey = (byteArray[4].toInt() shr 0) and 0x1 == 1
|
|
|
- val isRightCharging = (byteArray[4].toInt() shr 1) and 0x1 == 1
|
|
|
+ val leftHasKey = (byteArray[4].toInt() shr 0) and 0x1 == 1
|
|
|
+ val isLeftCharging = (byteArray[4].toInt() shr 1) and 0x1 == 1
|
|
|
+ val rightHasKey = (byteArray[3].toInt() shr 0) and 0x1 == 1
|
|
|
+ val isRightCharging = (byteArray[3].toInt() shr 1) and 0x1 == 1
|
|
|
LogUtil.i("钥匙刷新状态 : $leftHasKey - $isLeftCharging - $rightHasKey - $isRightCharging")
|
|
|
if (keyList.isEmpty()) {
|
|
|
keyList.add(KeyBean(true, leftHasKey, isLeftCharging))
|