Commit 0f572f8c authored by 时昊's avatar 时昊

feat:修改雷达弹窗报警

parent 701ba6bb
...@@ -551,78 +551,58 @@ void Popups_Polling(void) ...@@ -551,78 +551,58 @@ void Popups_Polling(void)
{ {
if(IGstPopup1 == IGN_ON) if(IGstPopup1 == IGN_ON)
{ {
switch (Radra_Get_Warning( )) switch (Radra_Get_Warning())
{ {
case 1: case 1://2hz
RADAR_SOUND = RADAR_SND_2Hz; PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_Radar_2HZ);
break; break;
case 2: case 2://4hz
RADAR_SOUND = RADAR_SND_4Hz; PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_Changming);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_Radar_4HZ);
break; break;
case 3: case 3://长鸣
RADAR_SOUND = RADAR_SND_CONTINUOUS; PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_Radar_Changming);
break; break;
case 4://长鸣0.5s case 4://长鸣0.5s
RADAR_SOUND = RADAR_SND_OK500MS; PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_Radar_Changming);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_RADAR_CHECK_OK);
break; break;
case 5://雷达故障 长鸣2s case 5://雷达故障 长鸣2s
RADAR_SOUND = RADAR_SND_2S; PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_RADAR_SENSOR_FAILURE);
break; break;
case 6://雷达数据超时 长鸣2s case 6://雷达数据超时 长鸣2s
RADAR_SOUND = RADAR_SND_2S; PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_RADAR_SENSOR_FAILURE);
break; break;
default: default://0 不报警
RADAR_SOUND = RADAR_SND_MUTE; PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_Radar_Changming);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
break; break;
} }
if (RADAR_SOUND == RADAR_SND_2Hz)
{
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_Radar_2HZ);
}
else if ( RADAR_SOUND == RADAR_SND_4Hz )
{
PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_Changming);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_Radar_4HZ);
}
else if ( RADAR_SOUND == RADAR_SND_CONTINUOUS )
{
PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_Radar_Changming);
}
else if ( RADAR_SOUND == RADAR_SND_OK500MS )
{
PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_Radar_Changming);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_RADAR_CHECK_OK);
}
else if ( RADAR_SOUND == RADAR_SND_2S )
{
PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_RADAR_SENSOR_FAILURE);
}
else
{
PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_Radar_Changming);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
}
} }
else else
{ {
...@@ -745,39 +725,39 @@ void Popups_Sound_Playing(uint8_t PopupSnd) ...@@ -745,39 +725,39 @@ void Popups_Sound_Playing(uint8_t PopupSnd)
ReqCode = Popup_Get_Current_Sound_Req_Code( ); ReqCode = Popup_Get_Current_Sound_Req_Code( );
// PopupSnd =SND_RADAR; // PopupSnd =SND_RADAR;
// RADAR_SOUND=RADAR_SND_CONTINUOUS; // RADAR_SOUND=RADAR_SND_CONTINUOUS;
switch ( PopupSnd ) // switch ( PopupSnd )
{ // {
case SND_RADAR: // case SND_RADAR:
if ( RADAR_SOUND == RADAR_SND_CONTINUOUS ) // if ( RADAR_SOUND == RADAR_SND_CONTINUOUS )
{ // {
Sound_Delete(SND_RADAR_1HZ); // Sound_Delete(SND_RADAR_1HZ);
Sound_Delete(SND_RADAR_2HZ); // Sound_Delete(SND_RADAR_2HZ);
Sound_Delete(SND_RADAR_4HZ); // Sound_Delete(SND_RADAR_4HZ);
Sound_Request(SND_RADAR_Changming, ReqCode); // Sound_Request(SND_RADAR_Changming, ReqCode);
} // }
else if ( RADAR_SOUND == RADAR_SND_2Hz ) // else if ( RADAR_SOUND == RADAR_SND_2Hz )
{ // {
Sound_Delete(SND_RADAR_1HZ); // Sound_Delete(SND_RADAR_1HZ);
Sound_Delete(SND_RADAR_4HZ); // Sound_Delete(SND_RADAR_4HZ);
Sound_Delete(SND_RADAR_Changming); // Sound_Delete(SND_RADAR_Changming);
Sound_Request(SND_RADAR_2HZ, ReqCode); // Sound_Request(SND_RADAR_2HZ, ReqCode);
} // }
else if ( RADAR_SOUND == RADAR_SND_4Hz ) // else if ( RADAR_SOUND == RADAR_SND_4Hz )
{ // {
Sound_Delete(SND_RADAR_1HZ); // Sound_Delete(SND_RADAR_1HZ);
Sound_Delete(SND_RADAR_2HZ); // Sound_Delete(SND_RADAR_2HZ);
Sound_Delete(SND_RADAR_Changming); // Sound_Delete(SND_RADAR_Changming);
Sound_Request(SND_RADAR_4HZ, ReqCode); // Sound_Request(SND_RADAR_4HZ, ReqCode);
} // }
else // else
{ // {
Sound_Delete(SND_RADAR_1HZ); // Sound_Delete(SND_RADAR_1HZ);
Sound_Delete(SND_RADAR_2HZ); // Sound_Delete(SND_RADAR_2HZ);
Sound_Delete(SND_RADAR_4HZ); // Sound_Delete(SND_RADAR_4HZ);
Sound_Delete(SND_RADAR_Changming); // Sound_Delete(SND_RADAR_Changming);
} // }
break; // break;
default: // default:
if ( ReqCode ) if ( ReqCode )
{ {
Sound_Request(PopupSnd, ReqCode); Sound_Request(PopupSnd, ReqCode);
...@@ -786,8 +766,8 @@ void Popups_Sound_Playing(uint8_t PopupSnd) ...@@ -786,8 +766,8 @@ void Popups_Sound_Playing(uint8_t PopupSnd)
{ {
Sound_Delete(PopupSnd); Sound_Delete(PopupSnd);
} }
break; // break;
} //}
} }
uint8_t Get_OIL_LOW_Sts(void) uint8_t Get_OIL_LOW_Sts(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment