张世豪
5 小时以前 100f4dcea20a32663a07e91525de111f7515eb79
src/chuankou/SerialDataReceiver.java
@@ -58,7 +58,7 @@
            if (startIndex == -1) {
                // 没有找到起始标记,清空无效数据
                if (debugEnabled) {
                    System.out.println("未找到起始标记,清空缓冲区");
                    //System.out.println("未找到起始标记,清空缓冲区");
                }
                staticBufferPosition = 0;
                return;
@@ -88,7 +88,7 @@
            System.arraycopy(staticDataBuffer, startIndex, packet, 0, totalPacketLength);
            
            if (debugEnabled) {
                System.out.println("解析到完整数据包: " + bytesToHex(packet));
                //System.out.println("解析到完整数据包: " + bytesToHex(packet));
            }
            
            // 添加到返回列表
@@ -132,7 +132,7 @@
     */
    private static void printRawData(String prefix, byte[] data, int maxPrintLength) {
        if (data == null || data.length == 0) {
            System.out.println(prefix + ": 空数据");
            //System.out.println(prefix + ": 空数据");
            return;
        }
        
@@ -148,7 +148,7 @@
            sb.append("... [截断,总长度: ").append(data.length).append("]");
        }
        
        System.out.println(sb.toString());
        //System.out.println(sb.toString());
    }
    
    /**