@@ -78,14 +78,14 @@ class MainActivity : ComponentActivity() {
// SDK初始化
CommManager.init(CommConfig().setCommType(CommType.CAN).setPort("can0").setBitrate(1000000))
// 蓝牙钥匙功能测试
- repeat(10) {
- ISCSLog.i("xiaoming", "------------ start ------------")
- bleKeyTest("CC:BA:97:21:71:E6")
- bleKeyTest("CC:BA:97:21:72:0A")
- bleKeyTest("CC:BA:97:21:71:CA")
- ISCSLog.i("xiaoming", "------------- end -----------")
- delay(10000)
- }
+// repeat(10) {
+// ISCSLog.i("xiaoming", "------------ start ------------")
+// bleKeyTest("CC:BA:97:21:71:E6")
+// bleKeyTest("CC:BA:97:21:72:0A")
+// bleKeyTest("CC:BA:97:21:71:CA")
+// ISCSLog.i("xiaoming", "------------- end -----------")
+// delay(10000)
+// }
}
DisposableEffect("") {
// 移除页面监听
@@ -106,7 +106,7 @@ class MainActivity : ComponentActivity() {
.aspectRatio(1.2f)
.fillMaxWidth()
) {
- Text(device.frame.cmd.toString(16))
+ Text(device.frame.cmd.toString(16).uppercase())
Text("${device.deviceType}", fontSize = 12.sp)
@@ -14,7 +14,7 @@ import com.iscs.comm.utils.ISCSLog
*/
fun Frame.buildReadDeviceInfo(): List<Frame> {
val list = arrayListOf<Frame>()
- for (i in 1..8) {
+ for (i in 1..16) {
list += this.newFrame().apply {
cmd = CAN_ID_BASE + i
data = byteArrayOf(CAN_READ_CMD.toByte(), 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00)