Обновление

This commit is contained in:
cfif 2026-01-28 16:13:43 +03:00
parent ab72ce1271
commit d54df6f85a
1 changed files with 9 additions and 9 deletions

View File

@ -79,8 +79,8 @@ char *sendLogCanUdsHex(tCanUds *env, uint8_t *data, size_t size) {
PrintfDebug(&data[i * 8], 8); PrintfDebug(&data[i * 8], 8);
if ((len + strlen(strPrintfDebug_UDS)) < LEN_DEBUG_TP_BUFF) { if ((len + strlen(strPrintfDebug_UDS)) < LEN_DEBUG_TP_BUFF) {
memcpy(&env->hexString[len], strPrintfDebug_UDS, strlen(strPrintfDebug_UDS));
len += strlen(strPrintfDebug_UDS); len += strlen(strPrintfDebug_UDS);
memcpy(env->hexString, strPrintfDebug_UDS, strlen(strPrintfDebug_UDS));
} else { } else {
return env->hexString; return env->hexString;
} }
@ -91,8 +91,8 @@ char *sendLogCanUdsHex(tCanUds *env, uint8_t *data, size_t size) {
PrintfDebug(&data[full * 8], tail); PrintfDebug(&data[full * 8], tail);
if ((len + strlen(strPrintfDebug_UDS)) < LEN_DEBUG_TP_BUFF) { if ((len + strlen(strPrintfDebug_UDS)) < LEN_DEBUG_TP_BUFF) {
memcpy(&env->hexString[len], strPrintfDebug_UDS, strlen(strPrintfDebug_UDS));
len += strlen(strPrintfDebug_UDS); len += strlen(strPrintfDebug_UDS);
memcpy(env->hexString, strPrintfDebug_UDS, strlen(strPrintfDebug_UDS));
} else { } else {
return env->hexString; return env->hexString;
} }
@ -147,9 +147,9 @@ static uint16_t TesterPresent_3E(tCanUds *env) {
return setResponseError(env, UDS_TesterPresent, UDS_error_incorrectMessageLengthOrInvalidFormat); return setResponseError(env, UDS_TesterPresent, UDS_error_incorrectMessageLengthOrInvalidFormat);
} }
tTesterPresent testerPresent; tTesterPresent *testerPresent = (tTesterPresent *) env->dataResponse;
testerPresent.ServiceId = UDS_TesterPresent | 0b1000000; testerPresent->ServiceId = UDS_TesterPresent | 0b1000000;
testerPresent.zeroSubFunction = 0; testerPresent->zeroSubFunction = 0;
return 2; return 2;
} }
@ -726,8 +726,8 @@ const eUds_com uds_com[256] = {
{NULL, ""}, {NULL, ""},
{NULL, ""}, {NULL, ""},
{NULL, ""}, {NULL, ""},
{ReadDataByIdentifier_22, "ReadDataByIdentifier_22"},
{NULL, ""}, {NULL, ""},
{ReadDataByIdentifier_22, "ReadDataByIdentifier_22"},
{NULL, ""}, {NULL, ""},
{NULL, ""}, {NULL, ""},
{NULL, ""}, {NULL, ""},
@ -970,7 +970,7 @@ void CanUds(tCanUds *env) {
if (response_size) { 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) LoggerFormatInfo(LOGGER, LOG_SIGN, "< %s [%d] %s", uds_com[com].desc, response_size, env->hexString)
CanSerialPortFrameTpTransmit(&env->canSerialPortFrameTp, env->dataResponse, CanSerialPortFrameTpTransmit(&env->canSerialPortFrameTp, env->dataResponse,