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

feat:修改雷达弹窗报警

parent 701ba6bb
......@@ -551,77 +551,57 @@ void Popups_Polling(void)
{
if(IGstPopup1 == IGN_ON)
{
switch (Radra_Get_Warning( ))
{
case 1:
RADAR_SOUND = RADAR_SND_2Hz;
break;
case 2:
RADAR_SOUND = RADAR_SND_4Hz;
break;
case 3:
RADAR_SOUND = RADAR_SND_CONTINUOUS;
break;
case 4://长鸣0.5s
RADAR_SOUND = RADAR_SND_OK500MS;
break;
case 5://雷达故障 长鸣2s
RADAR_SOUND = RADAR_SND_2S;
break;
case 6://雷达数据超时 长鸣2s
RADAR_SOUND = RADAR_SND_2S;
break;
default:
RADAR_SOUND = RADAR_SND_MUTE;
break;
}
if (RADAR_SOUND == RADAR_SND_2Hz)
switch (Radra_Get_Warning())
{
case 1://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 )
{
break;
case 2://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 )
{
break;
case 3://长鸣
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 )
{
break;
case 4://长鸣0.5s
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 )
{
break;
case 5://雷达故障 长鸣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
{
break;
case 6://雷达数据超时 长鸣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;
default://0 不报警
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;
}
}
else
......@@ -745,39 +725,39 @@ void Popups_Sound_Playing(uint8_t PopupSnd)
ReqCode = Popup_Get_Current_Sound_Req_Code( );
// PopupSnd =SND_RADAR;
// RADAR_SOUND=RADAR_SND_CONTINUOUS;
switch ( PopupSnd )
{
case SND_RADAR:
if ( RADAR_SOUND == RADAR_SND_CONTINUOUS )
{
Sound_Delete(SND_RADAR_1HZ);
Sound_Delete(SND_RADAR_2HZ);
Sound_Delete(SND_RADAR_4HZ);
Sound_Request(SND_RADAR_Changming, ReqCode);
}
else if ( RADAR_SOUND == RADAR_SND_2Hz )
{
Sound_Delete(SND_RADAR_1HZ);
Sound_Delete(SND_RADAR_4HZ);
Sound_Delete(SND_RADAR_Changming);
Sound_Request(SND_RADAR_2HZ, ReqCode);
}
else if ( RADAR_SOUND == RADAR_SND_4Hz )
{
Sound_Delete(SND_RADAR_1HZ);
Sound_Delete(SND_RADAR_2HZ);
Sound_Delete(SND_RADAR_Changming);
Sound_Request(SND_RADAR_4HZ, ReqCode);
}
else
{
Sound_Delete(SND_RADAR_1HZ);
Sound_Delete(SND_RADAR_2HZ);
Sound_Delete(SND_RADAR_4HZ);
Sound_Delete(SND_RADAR_Changming);
}
break;
default:
// switch ( PopupSnd )
// {
// case SND_RADAR:
// if ( RADAR_SOUND == RADAR_SND_CONTINUOUS )
// {
// Sound_Delete(SND_RADAR_1HZ);
// Sound_Delete(SND_RADAR_2HZ);
// Sound_Delete(SND_RADAR_4HZ);
// Sound_Request(SND_RADAR_Changming, ReqCode);
// }
// else if ( RADAR_SOUND == RADAR_SND_2Hz )
// {
// Sound_Delete(SND_RADAR_1HZ);
// Sound_Delete(SND_RADAR_4HZ);
// Sound_Delete(SND_RADAR_Changming);
// Sound_Request(SND_RADAR_2HZ, ReqCode);
// }
// else if ( RADAR_SOUND == RADAR_SND_4Hz )
// {
// Sound_Delete(SND_RADAR_1HZ);
// Sound_Delete(SND_RADAR_2HZ);
// Sound_Delete(SND_RADAR_Changming);
// Sound_Request(SND_RADAR_4HZ, ReqCode);
// }
// else
// {
// Sound_Delete(SND_RADAR_1HZ);
// Sound_Delete(SND_RADAR_2HZ);
// Sound_Delete(SND_RADAR_4HZ);
// Sound_Delete(SND_RADAR_Changming);
// }
// break;
// default:
if ( ReqCode )
{
Sound_Request(PopupSnd, ReqCode);
......@@ -786,8 +766,8 @@ void Popups_Sound_Playing(uint8_t PopupSnd)
{
Sound_Delete(PopupSnd);
}
break;
}
// break;
//}
}
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