diff --git a/Sources/BUSMASTER/UDS_Protocol/UDSMainWnd.cpp b/Sources/BUSMASTER/UDS_Protocol/UDSMainWnd.cpp index 8b80c0574..5edd4224a 100644 --- a/Sources/BUSMASTER/UDS_Protocol/UDSMainWnd.cpp +++ b/Sources/BUSMASTER/UDS_Protocol/UDSMainWnd.cpp @@ -586,6 +586,7 @@ void CUDSMainWnd::OnBnClickedSendUD() KillTimer(ID_TIMER_TP); //Added to kill the timer everyTime I've pressed the SEND button FSending = TRUE; // This flag is used to know if a message has been sent from the UDSMainWnd Bytes_to_Show= ("\r\n 1 -> "); + StringToShow.Empty(); BytesShown_Line = 1; m_abDatas = " "; CurrentService = m_omMsgDataEdit.Left(NO_OF_CHAR_IN_BYTE); //Baiasu @@ -640,7 +641,7 @@ Modifications : void CUDSMainWnd::OnTimer(UINT_PTR nIDEvent) { - //Envía TesterPresent + //Env�a TesterPresent if(nIDEvent ==ID_TIMER_TP && psTxCanMsgUds->m_psTxMsg != NULL) //Prepare the message { diff --git a/Sources/BUSMASTER/UDS_Protocol/UDSMainWnd.h b/Sources/BUSMASTER/UDS_Protocol/UDSMainWnd.h index ebd36db25..5c750ebd6 100644 --- a/Sources/BUSMASTER/UDS_Protocol/UDSMainWnd.h +++ b/Sources/BUSMASTER/UDS_Protocol/UDSMainWnd.h @@ -31,6 +31,7 @@ extern int SizeFC; extern int P2_Time; extern int P2_Time_Extended; extern CString Bytes_to_Show; +extern CString StringToShow; /** This variable is used to know if a message has been sent from the UDSMainWnd */ extern bool FSending; @@ -107,7 +108,7 @@ class CUDSMainWnd : public CDialog CFont m_Font; - // Declaración de funciones + // Declaraci�n de funciones (void)vInitializeUDSfFields(); /** diff --git a/Sources/BUSMASTER/UDS_Protocol/UDS_Protocol.cpp b/Sources/BUSMASTER/UDS_Protocol/UDS_Protocol.cpp index 5e19a747c..4610621c8 100644 --- a/Sources/BUSMASTER/UDS_Protocol/UDS_Protocol.cpp +++ b/Sources/BUSMASTER/UDS_Protocol/UDS_Protocol.cpp @@ -55,6 +55,7 @@ int Current_Channel; bool FSending = FALSE; CString Bytes_to_Show= ("\r\n 1-> "); +CString StringToShow; /** This variable is used to determinate how many continuos frames will be received */ float TotalFrames; @@ -194,6 +195,17 @@ void CUDS_Protocol::Show_ResponseData(unsigned char psMsg[], unsigned char Datal for (int ByteCounter = posFirstByte+1; ByteCounter= 0x20) && (TempByte <= 0x7E) ) + { + StringToShow += TempByte; + } + else + { + StringToShow += '?'; + } + int Temp_char2Int = TempByte; intResp = sprintf (hex,"%02X ",Temp_char2Int); Bytes_to_Show = Bytes_to_Show + hex; @@ -216,8 +228,7 @@ void CUDS_Protocol::Show_ResponseData(unsigned char psMsg[], unsigned char Datal } } - omMainWnd->m_abDatas = Bytes_to_Show + '\0'; - + omMainWnd->m_abDatas = Bytes_to_Show + "\r\n\r\n" + StringToShow; omMainWnd->UpdateData(false); } }