/// <summary> /// 串口發過來的消息 /// </summary> /// <param name="sendData"></param> private void SerialCom_SerialPortMessageEvent(byte[] sendData) { //Debug.Log("____________shoudaole _____________"); reciveStr = RunSerial.byteToHexStr(sendData); //Debug.Log("Message Coming From Serial.. Message => " + reciveStr.ToString());//打印一條數據信息 Data_ResponseContentProcess(sendData); //if (!reciveStr.Contains("D") || !reciveStr.Contains("m")) //{ // return; //} ////Debug.Log("收到的數據:" + reciveStr.ToString()); //if (reciveStr == oldStr) //{ // return; //} ////AllUiManger._Instance.DealReceiveString(reciveStr.ToString()); //oldStr = reciveStr; }
/// <summary> /// 監聽給串口發的消息 /// </summary> /// <param name="sendData"></param> private void SerialCom_SerialPortSendMessageReportEvent(byte[] sendData) { string text = RunSerial.byteToHexStr(sendData); Debug.Log("Message Send From Serial.. Message => " + text.ToString()); }