Обновление командировка 05.06.2026

This commit is contained in:
Дарья Бараева 2026-06-05 09:38:47 +03:00
parent e4a6c18c82
commit 88fbc89f18
2 changed files with 14 additions and 3 deletions

View File

@ -22,7 +22,7 @@
#define LEN_DEBUG_TP_BUFF 128 #define LEN_DEBUG_TP_BUFF 128
#define timeout_StMin 20 // Сепаратор между многокадровыми сообщениями #define timeout_StMin 25 // Сепаратор между многокадровыми сообщениями
#define timeout_Br 10 // Перед отправкой FlowControl (для получения остальных данных) #define timeout_Br 10 // Перед отправкой FlowControl (для получения остальных данных)
typedef enum { typedef enum {
@ -45,7 +45,8 @@ typedef enum {
TP_ERROR_CF_ERROR_SIZE = 9, TP_ERROR_CF_ERROR_SIZE = 9,
TP_ERROR_CF_ERROR_SN = 10, TP_ERROR_CF_ERROR_SN = 10,
TP_ERROR_WRONG_ADDRESS= 11, TP_ERROR_WRONG_ADDRESS= 11,
TP_STANDBY = 12 TP_STANDBY = 12,
TP_ERROR_SF_ERROR = 13
} eTpResult; } eTpResult;

View File

@ -105,7 +105,7 @@ uint16_t sendFlowFrame(tCanSerialPortFrameTp *env, uint32_t id, uint32_t timeout
frame->blockSize = 0; frame->blockSize = 0;
frame->timeST = 0; frame->timeST = 0;
SystemDelayMs(timeout_Br); // SystemDelayMs(timeout_Br);
uint16_t sent = env->ioCanFrame->transmit(env->ioCanFrame->env, (uint8_t *) frame, 8, id, uint16_t sent = env->ioCanFrame->transmit(env->ioCanFrame->env, (uint8_t *) frame, 8, id,
PROTOCOL_CAN_TYPE_UDS, timeout); PROTOCOL_CAN_TYPE_UDS, timeout);
@ -209,6 +209,11 @@ eTpResult vCanSerialPortFrameTpReceive(tCanSerialPortFrameTp *env, uint32_t time
// Single Frame SF Однократный фрейм // Single Frame SF Однократный фрейм
if ((canFrame.data[0] >> 4) == TP_TYPE_FRAME_SF) { if ((canFrame.data[0] >> 4) == TP_TYPE_FRAME_SF) {
if (env->dataReceivedConsecutiveFrameLen) {
return TP_ERROR_SF_ERROR;
}
eTpFrameSF *frame = (eTpFrameSF *) canFrame.data; eTpFrameSF *frame = (eTpFrameSF *) canFrame.data;
if (frame->dl < env->dataBufMaxSize) { if (frame->dl < env->dataBufMaxSize) {
@ -457,6 +462,11 @@ _Noreturn void CanTpProcessing_ListenerTask(tCanSerialPortFrameTp *env) {
if (result == TP_ERROR_FF_ERROR_TIMEOUT) { if (result == TP_ERROR_FF_ERROR_TIMEOUT) {
LoggerErrorStatic(LOGGER, LOG_SIGN, "Error: The Consecutive Frame timed out"); LoggerErrorStatic(LOGGER, LOG_SIGN, "Error: The Consecutive Frame timed out");
} }
if (result == TP_ERROR_SF_ERROR) {
// LoggerErrorStatic(LOGGER, LOG_SIGN, "Error: Single Frame SF received, but Consecutive Frame reception is not yet complete");
}
} }
} }