80,349
社区成员
发帖
与我相关
我的任务
分享
protected void updateReceivedData(byte[] data) {
// String message = HexDump.dumpHexString(data);
String message = HexDump.dumpHexString(data);
String temp1 = message.substring(21, 23);//截取一段16进制字符,下同
String temp2 = message.substring(24, 27);
String temperature = temp1 +temp2;
temperature =Long.valueOf(temperature , 16).toString();;
mDumpTextView.append(message + "\n");
mScrollView.smoothScrollTo(0, mDumpTextView.getBottom());
}