parent
c08eb5da5f
commit
34c1b51865
|
|
@ -104,6 +104,9 @@ void CanSpamReceiver_Init(tCanSpamReceiver *env,
|
|||
env->ccu_candb_rx_EMS_HVC_Req_Msg = osMessageQueueNew(1, sizeof(rtDW.CCUCAN_EMS_HVC_REQ_MSG_MODEL), NULL);
|
||||
env->ccu_candb_rx_HVC_Err_Status_Msg = osMessageQueueNew(1, sizeof(rtDW.HVC_ERR_STATUS_MSG_MODEL), NULL);
|
||||
|
||||
//cfif env->ccu_candb_rx_BCM_EEM = osMessageQueueNew(1, sizeof(rtDW.), NULL);
|
||||
//cfif env->ccu_candb_rx_EMS_Veh_02 = osMessageQueueNew(1, sizeof(rtDW.), NULL);
|
||||
|
||||
env->thread.stack = tCanSpamReceiver_stack;
|
||||
InitThreadAtr(&env->thread.attr, "CanSpamRec", &env->thread.controlBlock, sizeof(env->thread.controlBlock),
|
||||
env->thread.stack, tCanSpamReceiver_stack_size, osPriorityNormal);
|
||||
|
|
@ -150,6 +153,18 @@ static void set_CanSpamReceiver(tCanSpamReceiver *env, uint32_t recid) {
|
|||
}
|
||||
|
||||
|
||||
//cfif countQueue_ccu_candb_rx = osMessageQueueGetSpace(env->ccu_candb_rx_BCM_EEM);
|
||||
if ((countQueue_ccu_candb_rx) && (recid == BCM_EEM_CANID)) {
|
||||
//cfif status = osMessageQueuePut(env->ccu_candb_rx_BCM_EEM, &ccu_candb_rx.BCM_EEM, 0, 0U);
|
||||
return;
|
||||
}
|
||||
|
||||
//cfif countQueue_ccu_candb_rx = osMessageQueueGetSpace(env->ccu_candb_rx_EMS_Veh_02);
|
||||
if ((countQueue_ccu_candb_rx) && (recid == EMS_Veh_02_CANID)) {
|
||||
//cfif status = osMessageQueuePut(env->ccu_candb_rx_EMS_Veh_02, &ccu_candb_rx.EMS_Veh_02, 0, 0U);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
countQueue_ccu_candb_rx = osMessageQueueGetSpace(env->ccu_candb_rx_TM_CP);
|
||||
if ((countQueue_ccu_candb_rx) && (recid == TM_CP_CANID)) {
|
||||
|
|
@ -359,6 +374,17 @@ void get_CanSpamReceiver(tCanSpamReceiver *env, char *VIN, ccu_candb_error_missi
|
|||
memset(&rtDW.FIU_CCU1_MODEL, 0, sizeof(rtDW.FIU_CCU1_MODEL));
|
||||
memset(&rtDW.FIU_CCU2_MODEL, 0, sizeof(rtDW.FIU_CCU2_MODEL));
|
||||
|
||||
|
||||
countQueue_ccu_candb_rx = osMessageQueueGetSpace(env->ccu_candb_rx_BCM_EEM);
|
||||
if (countQueue_ccu_candb_rx == 0) {
|
||||
//cfif status = osMessageQueueGet(env->ccu_candb_rx_BCM_EEM, &rtDW., 0, 0U);
|
||||
}
|
||||
|
||||
countQueue_ccu_candb_rx = osMessageQueueGetSpace(env->ccu_candb_rx_EMS_Veh_02);
|
||||
if (countQueue_ccu_candb_rx == 0) {
|
||||
//cfif status = osMessageQueueGet(env->ccu_candb_rx_EMS_Veh_02, &rtDW., 0, 0U);
|
||||
}
|
||||
|
||||
countQueue_ccu_candb_rx = osMessageQueueGetSpace(env->ccu_candb_rx_FIU_CCU1);
|
||||
if (countQueue_ccu_candb_rx == 0) {
|
||||
status = osMessageQueueGet(env->ccu_candb_rx_FIU_CCU1, &rtDW.FIU_CCU1_MODEL, 0, 0U);
|
||||
|
|
|
|||
|
|
@ -76,6 +76,9 @@ typedef struct {
|
|||
osMessageQueueId_t ccu_candb_rx_EMS_HVC_Req_Msg;
|
||||
osMessageQueueId_t ccu_candb_rx_HVC_Err_Status_Msg;
|
||||
|
||||
osMessageQueueId_t ccu_candb_rx_BCM_EEM;
|
||||
osMessageQueueId_t ccu_candb_rx_EMS_Veh_02;
|
||||
|
||||
tLoggerInterface *logger;
|
||||
|
||||
struct {
|
||||
|
|
|
|||
|
|
@ -165,14 +165,14 @@ const FilterTo_FLEXCAN_RxMbFilterType IdCanHardSoftFilterCan0[countIdCanHardSoft
|
|||
*/
|
||||
|
||||
|
||||
#define countIdCanHardSoftFilterCan0 (14 + 6)
|
||||
#define countIdCanHardSoftFilterCan0 (14 + 8)
|
||||
const FilterTo_FLEXCAN_RxMbFilterType IdCanHardSoftFilterCan0[countIdCanHardSoftFilterCan0] = {
|
||||
{FLEXCAN_ID_STD, Diag_To_CCU_CANID, 0x7FF, PROTOCOL_CAN_UDS},
|
||||
{FLEXCAN_ID_STD, Diag_Functional_CANID, 0x7FF, PROTOCOL_CAN_UDS},
|
||||
{FLEXCAN_ID_STD, EMS_Veh_CANID, 0x7FF, PROTOCOL_CAN_RAW},
|
||||
{FLEXCAN_ID_STD, BCM_Powertrain_CANID, 0x7FF, PROTOCOL_CAN_RAW},
|
||||
// {FLEXCAN_ID_STD, EMS_Veh_02_CANID, 0x7FF, PROTOCOL_CAN_RAW},
|
||||
// {FLEXCAN_ID_STD, BCM_EEM_CANID, 0x7FF, PROTOCOL_CAN_RAW},
|
||||
{FLEXCAN_ID_STD, EMS_Veh_02_CANID, 0x7FF, PROTOCOL_CAN_RAW},
|
||||
{FLEXCAN_ID_STD, BCM_EEM_CANID, 0x7FF, PROTOCOL_CAN_RAW},
|
||||
{FLEXCAN_ID_STD, DMFR_Msg1_CANID, 0x7FF, PROTOCOL_CAN_RAW}, //!
|
||||
{FLEXCAN_ID_STD, DMFL_Msg1_CANID, 0x7FF, PROTOCOL_CAN_RAW}, //!
|
||||
// {FLEXCAN_ID_STD, TM_Stat_CANID, 0x7FF, PROTOCOL_CAN_RAW},
|
||||
|
|
|
|||
|
|
@ -900,6 +900,10 @@ static _Noreturn void ModelTask_Thread(tModelTask *env) {
|
|||
//начало--------------------------------------------------ВЫХОД МОДЕЛИ ДЛЯ DTC------------------------------------------
|
||||
memcpy(env->dtc_state_error, rtY.dtc_state_error_model, sizeof(env->dtc_state_error));
|
||||
|
||||
//==============================================DTC=========================================================
|
||||
//==============================================DTC=========================================================
|
||||
//==============================================DTC=========================================================
|
||||
|
||||
if (SystemGetMs() > timeDTC) {
|
||||
set_Dtc_state(env->diagnostic, &env->ccu_candb_tx.CCU_Errors, env->dtc_state_error,
|
||||
env->GET_HVAC_VIN, &env->CAN_ERROR_MISSING, &env->CAN_TIME_MISSING, env->LIN1_ERROR_MISSING,
|
||||
|
|
@ -991,62 +995,18 @@ static _Noreturn void ModelTask_Thread(tModelTask *env) {
|
|||
env->ccu_candb_dbg_tx.dbg_Logic_Blower.Logic_Blower_Pwm_Rear * 10;
|
||||
|
||||
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Sen_Amb, &rtY.dbgCAN_dbg_Sen_Amb_model,
|
||||
sizeof(env->ccu_candb_dbg_tx.dbg_Sen_Amb));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Sen_Incar, &rtY.dbgCAN_dbg_Sen_Incar_model,
|
||||
sizeof(env->ccu_candb_dbg_tx.dbg_Sen_Incar));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Sen_0, &rtY.dbgCAN_dbg_Sen_0_model,
|
||||
sizeof(env->ccu_candb_dbg_tx.dbg_Sen_0));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Logic_Ac, &rtY.dbg_Logic_Ac_model,
|
||||
sizeof(env->ccu_candb_dbg_tx.dbg_Logic_Ac));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_CCU_IO, &rtY.dbgCAN_CCU_IO_model,
|
||||
sizeof(env->ccu_candb_dbg_tx.dbg_CCU_IO));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Logic_Rec, &rtY.dbgCAN_Logic_Rec_model,
|
||||
sizeof(env->ccu_candb_dbg_tx.dbg_Logic_Rec));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Logic_State, &rtY.dbgCAN_Logic_State_model,
|
||||
sizeof(env->ccu_candb_dbg_tx.dbg_Logic_State));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Auto_AF, &rtY.dbgCAN_Auto_AF_model,
|
||||
sizeof(env->ccu_candb_dbg_tx.dbg_Auto_AF));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Auto_Duct, &rtY.dbgCAN_Auto_Duct_model,
|
||||
sizeof(env->ccu_candb_dbg_tx.dbg_Auto_Duct));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Logic_Valve, &rtY.dbg_Logic_Valve_model,
|
||||
sizeof(env->ccu_candb_dbg_tx.dbg_Logic_Valve));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Sen_Amb, &rtY.dbgCAN_dbg_Sen_Amb_model, sizeof(env->ccu_candb_dbg_tx.dbg_Sen_Amb));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Sen_Incar, &rtY.dbgCAN_dbg_Sen_Incar_model, sizeof(env->ccu_candb_dbg_tx.dbg_Sen_Incar));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Sen_0, &rtY.dbgCAN_dbg_Sen_0_model, sizeof(env->ccu_candb_dbg_tx.dbg_Sen_0));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Logic_Ac, &rtY.dbg_Logic_Ac_model, sizeof(env->ccu_candb_dbg_tx.dbg_Logic_Ac));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_CCU_IO, &rtY.dbgCAN_CCU_IO_model, sizeof(env->ccu_candb_dbg_tx.dbg_CCU_IO));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Logic_Rec, &rtY.dbgCAN_Logic_Rec_model, sizeof(env->ccu_candb_dbg_tx.dbg_Logic_Rec));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Logic_State, &rtY.dbgCAN_Logic_State_model, sizeof(env->ccu_candb_dbg_tx.dbg_Logic_State));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Auto_AF, &rtY.dbgCAN_Auto_AF_model, sizeof(env->ccu_candb_dbg_tx.dbg_Auto_AF));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Auto_Duct, &rtY.dbgCAN_Auto_Duct_model, sizeof(env->ccu_candb_dbg_tx.dbg_Auto_Duct));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Logic_Valve, &rtY.dbg_Logic_Valve_model, sizeof(env->ccu_candb_dbg_tx.dbg_Logic_Valve));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_Drs, &rtY.dbg_Drs_t_model, sizeof(env->ccu_candb_dbg_tx.dbg_Drs));
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_LIN_AirQS_Stat, &rtY.dbg_LIN_AirQS_Stat_t_model,
|
||||
sizeof(env->ccu_candb_dbg_tx.dbg_Logic_Valve));
|
||||
/*
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.P_FUL = 501 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.I_FUL = 502 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.D_FUL = 503 + 2048;
|
||||
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.P_FUR = 504 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.I_FUR = 505 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.D_FUR = 506 + 2048;
|
||||
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.P_FLL = 507 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.I_FLL = 508 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.D_FLL = 509 + 2048;
|
||||
|
||||
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.P_FRL = -501 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.I_FRL = -502 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.D_FRL = -503 + 2048;
|
||||
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.P_RL = -504 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.I_RL = -505 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.D_RL = -506 + 2048;
|
||||
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.P_RR = -507 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.I_RR = -508 + 2048;
|
||||
env->ccu_candb_dbg_tx.dbg_stat_PID.D_RR = -509 + 2048;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// memcpy(&env->ccu_candb_dbg_tx.dbg_stat_PID, &rtY.dbg_stat_PID_model,
|
||||
// sizeof(env->ccu_candb_dbg_tx.dbg_stat_PID));
|
||||
|
||||
|
||||
memcpy(&env->ccu_candb_dbg_tx.dbg_LIN_AirQS_Stat, &rtY.dbg_LIN_AirQS_Stat_t_model, sizeof(env->ccu_candb_dbg_tx.dbg_Logic_Valve));
|
||||
|
||||
//конец--------------------------------------------------ВЫХОД МОДЕЛИ ДЛЯ CAN-------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -440,8 +440,8 @@ setErrorDTC_CAN(tDiagnostic *env, uint8_t *dtc_state_error_model, ccu_candb_erro
|
|||
}
|
||||
|
||||
static void
|
||||
setErrorDTC_LIN(uint8_t *dtc_state_error_model, uint8_t *LIN1_ERROR_MISSING, uint8_t *LIN2_ERROR_MISSING, uint8_t
|
||||
*LIN3_ERROR_MISSING, uint8_t *LIN4_ERROR_MISSING, uint8_t *LIN5_ERROR_MISSING) {
|
||||
setErrorDTC_LIN(uint8_t *dtc_state_error_model, const uint8_t *LIN1_ERROR_MISSING, const uint8_t *LIN2_ERROR_MISSING, const uint8_t
|
||||
*LIN3_ERROR_MISSING, const uint8_t *LIN4_ERROR_MISSING, const uint8_t *LIN5_ERROR_MISSING) {
|
||||
|
||||
for (uint8_t i = 0; i < 9; ++i) {
|
||||
if (LIN1_ERROR_MISSING[i]) {
|
||||
|
|
@ -516,12 +516,16 @@ void set_Dtc_state(tDiagnostic *env, CCU_Errors_t *CCU_Errors,
|
|||
}
|
||||
}
|
||||
|
||||
setErrorDTC_LIN(dtc_state_error_model, LIN1_ERROR_MISSING, LIN2_ERROR_MISSING, LIN3_ERROR_MISSING,
|
||||
LIN4_ERROR_MISSING,
|
||||
LIN5_ERROR_MISSING);
|
||||
setErrorDTC_LIN(dtc_state_error_model, LIN1_ERROR_MISSING, LIN2_ERROR_MISSING, LIN3_ERROR_MISSING, LIN4_ERROR_MISSING, LIN5_ERROR_MISSING);
|
||||
setErrorDTC_CAN_VIN(dtc_state_error_model, CAN_ERROR_MISSING, VIN, CCU_Errors);
|
||||
setErrorDTC_CAN(env, dtc_state_error_model, CAN_ERROR_MISSING);
|
||||
|
||||
// if () {
|
||||
// dtc_state_error_model[DTC_REAR_HVAC_AROMA_CONFIG_INVALID] = DTC_TEST_FAILED_CONFIRMED;
|
||||
// } else {
|
||||
// dtc_state_error_model[DTC_REAR_HVAC_AROMA_CONFIG_INVALID] = dtc_state_error[DTC_REAR_HVAC_AROMA_CONFIG_INVALID] & (~(DTC_TEST_FAILED));
|
||||
// }
|
||||
|
||||
if (memcmp(dtc_state_error, dtc_state_error_model, sizeof(dtc_state_error)) != 0) {
|
||||
|
||||
bool isDTC_FileWrite = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue