Обновление
This commit is contained in:
parent
ab72ce1271
commit
d54df6f85a
14
CanUds.c
14
CanUds.c
|
|
@ -79,8 +79,8 @@ char *sendLogCanUdsHex(tCanUds *env, uint8_t *data, size_t size) {
|
|||
PrintfDebug(&data[i * 8], 8);
|
||||
|
||||
if ((len + strlen(strPrintfDebug_UDS)) < LEN_DEBUG_TP_BUFF) {
|
||||
memcpy(&env->hexString[len], strPrintfDebug_UDS, strlen(strPrintfDebug_UDS));
|
||||
len += strlen(strPrintfDebug_UDS);
|
||||
memcpy(env->hexString, strPrintfDebug_UDS, strlen(strPrintfDebug_UDS));
|
||||
} else {
|
||||
return env->hexString;
|
||||
}
|
||||
|
|
@ -91,8 +91,8 @@ char *sendLogCanUdsHex(tCanUds *env, uint8_t *data, size_t size) {
|
|||
PrintfDebug(&data[full * 8], tail);
|
||||
|
||||
if ((len + strlen(strPrintfDebug_UDS)) < LEN_DEBUG_TP_BUFF) {
|
||||
memcpy(&env->hexString[len], strPrintfDebug_UDS, strlen(strPrintfDebug_UDS));
|
||||
len += strlen(strPrintfDebug_UDS);
|
||||
memcpy(env->hexString, strPrintfDebug_UDS, strlen(strPrintfDebug_UDS));
|
||||
} else {
|
||||
return env->hexString;
|
||||
}
|
||||
|
|
@ -147,9 +147,9 @@ static uint16_t TesterPresent_3E(tCanUds *env) {
|
|||
return setResponseError(env, UDS_TesterPresent, UDS_error_incorrectMessageLengthOrInvalidFormat);
|
||||
}
|
||||
|
||||
tTesterPresent testerPresent;
|
||||
testerPresent.ServiceId = UDS_TesterPresent | 0b1000000;
|
||||
testerPresent.zeroSubFunction = 0;
|
||||
tTesterPresent *testerPresent = (tTesterPresent *) env->dataResponse;
|
||||
testerPresent->ServiceId = UDS_TesterPresent | 0b1000000;
|
||||
testerPresent->zeroSubFunction = 0;
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
|
@ -726,8 +726,8 @@ const eUds_com uds_com[256] = {
|
|||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{ReadDataByIdentifier_22, "ReadDataByIdentifier_22"},
|
||||
{NULL, ""},
|
||||
{ReadDataByIdentifier_22, "ReadDataByIdentifier_22"},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
{NULL, ""},
|
||||
|
|
@ -970,7 +970,7 @@ void CanUds(tCanUds *env) {
|
|||
|
||||
if (response_size) {
|
||||
|
||||
sendLogCanUdsHex(env,env->dataResponse, response_size);
|
||||
sendLogCanUdsHex(env, env->dataResponse, response_size);
|
||||
LoggerFormatInfo(LOGGER, LOG_SIGN, "< %s [%d] %s", uds_com[com].desc, response_size, env->hexString)
|
||||
|
||||
CanSerialPortFrameTpTransmit(&env->canSerialPortFrameTp, env->dataResponse,
|
||||
|
|
|
|||
Loading…
Reference in New Issue