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

feat:修改雷达弹窗报警

parent 701ba6bb
...@@ -551,77 +551,57 @@ void Popups_Polling(void) ...@@ -551,77 +551,57 @@ void Popups_Polling(void)
{ {
if(IGstPopup1 == IGN_ON) if(IGstPopup1 == IGN_ON)
{ {
switch (Radra_Get_Warning( )) 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)
{ {
case 1://2hz
PopupAndSound_Delete(POPUP_Radar_4HZ); PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK); PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE); PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
PopupAndSound_Delete(POPUP_Radar_Changming); PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_Radar_2HZ); Popup_Request(POPUP_Radar_2HZ);
} break;
else if ( RADAR_SOUND == RADAR_SND_4Hz ) case 2://4hz
{
PopupAndSound_Delete(POPUP_Radar_2HZ); PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_Changming); PopupAndSound_Delete(POPUP_Radar_Changming);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK); PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE); PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_Radar_4HZ); Popup_Request(POPUP_Radar_4HZ);
} break;
else if ( RADAR_SOUND == RADAR_SND_CONTINUOUS ) case 3://长鸣
{
PopupAndSound_Delete(POPUP_Radar_2HZ); PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ); PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK); PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE); PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_Radar_Changming); Popup_Request(POPUP_Radar_Changming);
} break;
else if ( RADAR_SOUND == RADAR_SND_OK500MS ) case 4://长鸣0.5s
{
PopupAndSound_Delete(POPUP_Radar_2HZ); PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ); PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_Radar_Changming); PopupAndSound_Delete(POPUP_Radar_Changming);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE); PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_RADAR_CHECK_OK); Popup_Request(POPUP_RADAR_CHECK_OK);
} break;
else if ( RADAR_SOUND == RADAR_SND_2S ) case 5://雷达故障 长鸣2s
{
PopupAndSound_Delete(POPUP_Radar_2HZ); PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ); PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK); PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_Radar_Changming); PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_RADAR_SENSOR_FAILURE); Popup_Request(POPUP_RADAR_SENSOR_FAILURE);
} break;
else 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_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ); PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK); PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_Radar_Changming); PopupAndSound_Delete(POPUP_Radar_Changming);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE); PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
break;
} }
} }
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