초기 rpm ramp값 idle speed 캡쳐 기능
This commit is contained in:
10
Oper.c
10
Oper.c
@@ -157,6 +157,7 @@ static void CProcessApuStateGenerating(void)
|
||||
CSetEngineActualRpm(GeneralOperValue.uiDynamicRPM); // RPM 가변 제어 시작
|
||||
#else
|
||||
Uint32 ulElapsed;
|
||||
Uint16 uiRampRange;
|
||||
Uint16 uiRampRpm;
|
||||
|
||||
CSetGcuCommand((Uint16)IDX_GCU_CMD_GENERATING);
|
||||
@@ -170,16 +171,19 @@ static void CProcessApuStateGenerating(void)
|
||||
{
|
||||
if (GeneralOperValue.ulRampStartClock == 0UL)
|
||||
{
|
||||
Uint16 uiActual = CGetEngineActualRpm();
|
||||
GeneralOperValue.uiRampStartRpm = (uiActual < RPM_RAMP_END) ? uiActual : RPM_RAMP_END;
|
||||
GeneralOperValue.ulRampStartClock = CGetSoftClock();
|
||||
CSetEngineActualRpm(RPM_RAMP_START);
|
||||
CSetEngineActualRpm(GeneralOperValue.uiRampStartRpm);
|
||||
}
|
||||
else
|
||||
{
|
||||
ulElapsed = (CGetSoftClock() + SYSTEM_10MIN_TIME - GeneralOperValue.ulRampStartClock) % SYSTEM_10MIN_TIME;
|
||||
uiRampRange = RPM_RAMP_END - GeneralOperValue.uiRampStartRpm; // 동적 범위
|
||||
|
||||
if (ulElapsed < TIME_RAMP_UP)
|
||||
{
|
||||
uiRampRpm = (Uint16)(RPM_RAMP_START + (Uint16)(((Uint32)RPM_RAMP_RANGE * ulElapsed) / TIME_RAMP_UP));
|
||||
uiRampRpm = (Uint16)(GeneralOperValue.uiRampStartRpm + (Uint16)(((Uint32)uiRampRange * ulElapsed) / TIME_RAMP_UP));
|
||||
CSetEngineActualRpm(uiRampRpm);
|
||||
}
|
||||
else
|
||||
@@ -472,7 +476,7 @@ void CSetEcuCommand(Uint16 Command)
|
||||
CSetEngineActualRpm(Rx400.SetRPM.PCAN_RPM);
|
||||
#else
|
||||
//CSetEngineActualRpm(2400U);
|
||||
CSetEngineActualRpm(1500U); // Target Idle
|
||||
CSetEngineActualRpm(1200U); // IDLE_SEQ_MOD (Idle speed 1200[최저] ~ 2000[최고])
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
2
main.c
2
main.c
@@ -147,7 +147,7 @@ static void CSoftTimerWorkProcess(void)
|
||||
|
||||
if (GeneralOperValue.uiApuState > (Uint16)IDX_APU_OPER_POST) // ADC 오프셋 보정 완료 후 감지
|
||||
{
|
||||
CAlarmProcedure();
|
||||
//CAlarmProcedure();
|
||||
CDisplayAlarmPopup();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user