This commit is contained in:
2026-06-21 10:41:28 +08:00
parent e00f8ad7a1
commit 60ec0e2883
38 changed files with 23987 additions and 614 deletions
@@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile ByteFlags.kt
* LastUpdate 2026-01-07 09:37:09
* LastUpdate 2026-06-21 10:40:58
* UpdateUser MingLiPro
*/
@@ -47,7 +47,7 @@ data class ByteFlags(
/** 第 6 位(0x40) */
var b6: Boolean = false,
/** 第 7 位(最高位,0x80) */
var b7: Boolean = false
var b7: Boolean = false,
) {
/**
@@ -410,7 +410,7 @@ data class ByteFlags(
* @return 全 1 的 ByteFlags(值为 0xFF)
*/
fun allTrue(): ByteFlags {
return ByteFlags(true, true, true, true, true, true, true, true)
return ByteFlags(b0 = true, b1 = true, b2 = true, b3 = true, b4 = true, b5 = true, b6 = true, b7 = true)
}
/**
@@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile ByteUtils.kt
* LastUpdate 2026-03-12 10:09:05
* LastUpdate 2026-05-22 13:26:55
* UpdateUser MingLiPro
*/
@file:JvmName("ByteUtils")
@@ -88,7 +88,7 @@ const val ESC_RESERVED: Byte = 0x06
*/
fun ByteArray.getByteArrayString(): MutableList<String> {
return this.toList().stream().map { a -> String.format("0X%02X", a!!.toInt() and 0xFF) }
.collect(SuperStream.toList()) as MutableList<String>
.collect(SuperStream.toListCollector()) as MutableList<String>
}