diff --git a/GW/src/KATECK_Logic.c b/GW/src/KATECK_Logic.c index 75ce6dda..9e092486 100644 --- a/GW/src/KATECK_Logic.c +++ b/GW/src/KATECK_Logic.c @@ -20,7 +20,7 @@ void ECU3_KATECH_Logic_init(void) void ECU3_KATECH_Logic_2ms(void) { - CheckSystem(); + CheckIgnition(); /* Input_Data_Set_Logic(); ADM_Integrated_Logic_step(); Output_Data_Set_Logic();*/ diff --git a/GW/src/Safety_Layer/System_Check/System_Check.c b/GW/src/Safety_Layer/System_Check/System_Check.c index aa7aa581..b3508d52 100644 --- a/GW/src/Safety_Layer/System_Check/System_Check.c +++ b/GW/src/Safety_Layer/System_Check/System_Check.c @@ -181,12 +181,6 @@ void ECU_check(void) } -void RcRequestCheck(void) -{ - -} - - void No_signal_RC(void){ // GV_RC_VCU_counter1_CHECK = 260 ���� �ʱ⿡ GV_RC_VCU_counter1�� ���� ���� ȸ�� diff --git a/GW/src/Safety_Layer/System_Check/System_Check.h b/GW/src/Safety_Layer/System_Check/System_Check.h index aeb25b6c..36a6825c 100644 --- a/GW/src/Safety_Layer/System_Check/System_Check.h +++ b/GW/src/Safety_Layer/System_Check/System_Check.h @@ -15,8 +15,6 @@ extern void RWA1_Arc_check(void); extern void RWA2_Arc_check(void); extern void ECU_check(void); -extern void RcRequestCheck(void); - extern void No_signal_RC(void); #endif diff --git a/GW/src/System_Layer/Drive_Mode.c b/GW/src/System_Layer/Drive_Mode.c index 90d4167a..bf394416 100644 --- a/GW/src/System_Layer/Drive_Mode.c +++ b/GW/src/System_Layer/Drive_Mode.c @@ -5,11 +5,13 @@ static inline bool IsStopCondition(void){return (GV_VCU_Vx_Fbk < 1.);} static inline RcModeReq_e GetRcReq(void){return (RcModeReq_e)GV_RC_ModeReq;} static inline bool GetAcuReq(void){return (GV_ACU_Drive_mode == 1);} +static inline void SetRcReq(RcModeReq_e req){GV_RC_ModeReq = (uint8_t)req;} static inline void SetHandoverPhase(HandoverPhase_e phase){GV_VCU_HandoverPhase = (uint8_t)phase;} static inline void setEmergencyCause(EmergencyCause_e cause){GV_VCU_EmergencyCause = (uint8_t)cause;} +static bool s_rcAutoReqTimeout = false; -void CheckSystem(void) +void CheckIgnition(void) { CheckSystemFault(); @@ -124,6 +126,7 @@ void CheckDriveMode(void) bool acuWaitOn = false; + RcRequestCheck(); if(isEmergency) { @@ -153,6 +156,8 @@ void CheckDriveMode(void) } else { + RcRequestCheck(); + const DriveMode_e curMode = (DriveMode_e)GV_VCU_Drive_Mode; DriveMode_e nextMode = curMode; HandoverPhase_e nextPhase = HO_NONE; @@ -259,7 +264,10 @@ void CheckDriveMode(void) acuWaitOn = true; if (Time_GetAutoOnWaitSec() >= 30U) { + s_rcAutoReqTimeout = true; + SetRcReq(RC_REQ_NONE); nextPhase = HO_HOLD; + acuWaitOn = false; } } } @@ -312,6 +320,25 @@ void CheckDriveMode(void) } + +void RcRequestCheck(void) +{ + if (GV_RC_ACU_Drive_Mode == 1 && GV_RC_Drive_Mode == 1) + { + if (s_rcAutoReqTimeout) + { + SetRcReq(RC_REQ_NONE); + } + } + else if (GV_RC_ACU_Drive_Mode == 1) + GV_RC_ModeReq = RC_REQ_AUTO; + else if (GV_RC_Drive_Mode == 1) + GV_RC_ModeReq = RC_REQ_MANUAL; + else GV_RC_ModeReq = RC_REQ_DEFAULT; +} + + + /*============================== Fault Check ==============================*/ void CheckSystemFault(void) { diff --git a/GW/src/System_Layer/Drive_Mode.h b/GW/src/System_Layer/Drive_Mode.h index 14307071..4c282d88 100644 --- a/GW/src/System_Layer/Drive_Mode.h +++ b/GW/src/System_Layer/Drive_Mode.h @@ -82,9 +82,10 @@ typedef enum EMG_HO_ABORTED // Handover aborted (e.g. ACU fault during handover) }EmergencyCause_e; -extern void CheckSystem(void); +extern void CheckIgnition(void); extern void ExecuteDriveMode(void); extern void CheckDriveMode(void); +extern void RcRequestCheck(void); extern void CheckSystemFault(void); extern void ExecuteACUMode(void); //RidarFlux diff --git a/GW/src/System_Layer/SW_Version/SW_VER.c b/GW/src/System_Layer/SW_Version/SW_VER.c index 3dd0c426..8e9b6e43 100644 --- a/GW/src/System_Layer/SW_Version/SW_VER.c +++ b/GW/src/System_Layer/SW_Version/SW_VER.c @@ -6,8 +6,8 @@ void SET_SW_VER(void) { GV_YEAR = 26; - GV_Month = 2; - GV_Day = 26; - GV_Ver = 2; + GV_Month = 3; + GV_Day = 3; + GV_Ver = 1; GV_CAR_NUM = 240623; }