Commit 7b131bd3 authored by hu's avatar hu

调整报警调度

parent 41651a28
No preview for this file type
This diff is collapsed.
project .intvect 1536 project .intvect 1536
project .text 320108 project .text 320172
project .rodata 411103 project .rodata 411103
project .secinfo 120 project .secinfo 120
project .syscall 6 project .syscall 6
......
...@@ -86,7 +86,11 @@ void Tacho_Processing_Service(void) ...@@ -86,7 +86,11 @@ void Tacho_Processing_Service(void)
u32Result += 500u; u32Result += 500u;
u32Result /= 1000u; u32Result /= 1000u;
if (u32Result > 3000u) if (u32Result < 330u)
{
u32Result = 0u;
}
else if (u32Result > 3000u)
{ {
u32Result = 3000u; u32Result = 3000u;
} }
......
...@@ -209,10 +209,21 @@ void Popup_Scheduling_Service ( void ) ...@@ -209,10 +209,21 @@ void Popup_Scheduling_Service ( void )
break; break;
case POPUP_CUT_NOT: case POPUP_CUT_NOT:
//第四组报警0.8秒交互
if (PopupAttributeTable[s_PopupScheduling.CurPopupID].Priority == 2)
{
if (s_PopupScheduling.Timer < POPUP_DISP_TIME_NORMAL_FLAG)
{
IsReturn = 1u;
}
}
else
{
if ( s_PopupScheduling.Timer < POPUP_DISP_TIME_NORMAL ) if ( s_PopupScheduling.Timer < POPUP_DISP_TIME_NORMAL )
{ {
IsReturn = 1u; IsReturn = 1u;
} }
}
break; break;
default: default:
...@@ -782,6 +793,7 @@ static void Popup_Update_Status ( uint16_t PopupID ) ...@@ -782,6 +793,7 @@ static void Popup_Update_Status ( uint16_t PopupID )
*@Return: none. *@Return: none.
*@Note: none. *@Note: none.
**********************************************************************************************************/ **********************************************************************************************************/
uint8_t hyq_1, hyq_2;
static struct PopupList *Popup_Polling_Next ( struct PopupList *CurPopup ) static struct PopupList *Popup_Polling_Next ( struct PopupList *CurPopup )
{ {
struct PopupList *NextPopup = POPUPLIB_NULL; struct PopupList *NextPopup = POPUPLIB_NULL;
...@@ -802,12 +814,46 @@ static struct PopupList *Popup_Polling_Next ( struct PopupList *CurPopup ) ...@@ -802,12 +814,46 @@ static struct PopupList *Popup_Polling_Next ( struct PopupList *CurPopup )
#endif #endif
while ( NextPopup != POPUPLIB_NULL ) while ( NextPopup != POPUPLIB_NULL )
{ {
/*原始部分*/
/*
if ( ( NextPopup->Status == POPUP_STATUS_LOOP ) || ( NextPopup->Status == POPUP_STATUS_FIRST ) ) if ( ( NextPopup->Status == POPUP_STATUS_LOOP ) || ( NextPopup->Status == POPUP_STATUS_FIRST ) )
{ {
break; break;
} }
NextPopup = NextPopup->next;
*/
/*----test----*/
if (PopupAttributeTable[NextPopup->PopupID].Type != POPUP_TYPE_WARNING)
{
if ((NextPopup->Status == POPUP_STATUS_LOOP) || (NextPopup->Status == POPUP_STATUS_FIRST))
{
break;
}
}
else
{
if (NextPopup->Status == POPUP_STATUS_FIRST)
break;
else if (NextPopup->Status == POPUP_STATUS_LOOP)
{
/*----test----*/
hyq_1 = CurPopup->PopupID ;
hyq_2 = NextPopup->PopupID;
/*----test----*/
if (PopupAttributeTable[NextPopup->PopupID].Priority == PopupAttributeTable[CurPopup->PopupID].Priority)
break;
else
{
NextPopup = WarningListHead;
return NextPopup;
}
}
}
NextPopup = NextPopup->next; NextPopup = NextPopup->next;
/*----test----*/
} }
} }
...@@ -816,9 +862,6 @@ static struct PopupList *Popup_Polling_Next ( struct PopupList *CurPopup ) ...@@ -816,9 +862,6 @@ static struct PopupList *Popup_Polling_Next ( struct PopupList *CurPopup )
if ( FatalListHead != POPUPLIB_NULL ) if ( FatalListHead != POPUPLIB_NULL )
{ {
NextPopup = FatalListHead; NextPopup = FatalListHead;
while ( NextPopup != POPUPLIB_NULL ) while ( NextPopup != POPUPLIB_NULL )
{ {
if ( ( NextPopup->Status == POPUP_STATUS_FIRST ) || ( NextPopup->Status == POPUP_STATUS_LOOP ) ) if ( ( NextPopup->Status == POPUP_STATUS_FIRST ) || ( NextPopup->Status == POPUP_STATUS_LOOP ) )
...@@ -895,22 +938,8 @@ static void Popup_Fatal_Request ( uint16_t PopupID ) ...@@ -895,22 +938,8 @@ static void Popup_Fatal_Request ( uint16_t PopupID )
{ {
struct PopupList *p1 = POPUPLIB_NULL; struct PopupList *p1 = POPUPLIB_NULL;
p1 = PopupList_Select ( FatalListHead, &PopupID ); p1 = PopupList_Select ( FatalListHead, &PopupID );
#if 1 //VC66 组1 组内插入 上位优先. if ( p1 == POPUPLIB_NULL )
struct PopupList *pwby = FatalListHead ;
while(pwby != POPUPLIB_NULL)
{
if(pwby->PopupID < PopupID)
{
Popup_Delete(PopupID);
return ;
}
pwby = pwby->next ;
}
#endif
if ( p1 == POPUPLIB_NULL)
{ {
p1 = HintListHead; p1 = HintListHead;
while ( p1 != POPUPLIB_NULL ) while ( p1 != POPUPLIB_NULL )
...@@ -929,7 +958,6 @@ static void Popup_Fatal_Request ( uint16_t PopupID ) ...@@ -929,7 +958,6 @@ static void Popup_Fatal_Request ( uint16_t PopupID )
p1->Status = POPUP_STATUS_FIRST; p1->Status = POPUP_STATUS_FIRST;
p1->next = POPUPLIB_NULL; p1->next = POPUPLIB_NULL;
FatalListHead = PopupList_Insert ( FatalListHead, p1 ); FatalListHead = PopupList_Insert ( FatalListHead, p1 );
Popup_Cal_CutGrade ( PopupID ); Popup_Cal_CutGrade ( PopupID );
} }
} }
...@@ -964,8 +992,8 @@ static void Popup_Hint_Request ( uint16_t PopupID ) ...@@ -964,8 +992,8 @@ static void Popup_Hint_Request ( uint16_t PopupID )
if ( p1 != POPUPLIB_NULL ) if ( p1 != POPUPLIB_NULL )
{ {
p1->PopupID = PopupID; p1->PopupID = PopupID;
if ( FatalListHead == POPUPLIB_NULL ) //if ( FatalListHead == POPUPLIB_NULL )
{ //{
p1->Status = POPUP_STATUS_FIRST; p1->Status = POPUP_STATUS_FIRST;
s_PopupScheduling.NewPopupID = PopupID; s_PopupScheduling.NewPopupID = PopupID;
#if POPUP_HINT_CUT_HINT_IMMEDIATELY #if POPUP_HINT_CUT_HINT_IMMEDIATELY
...@@ -975,11 +1003,11 @@ static void Popup_Hint_Request ( uint16_t PopupID ) ...@@ -975,11 +1003,11 @@ static void Popup_Hint_Request ( uint16_t PopupID )
#endif #endif
s_PopupScheduling.PollPopupID = s_PopupScheduling.CurPopupID; s_PopupScheduling.PollPopupID = s_PopupScheduling.CurPopupID;
} //}
else //else
{ //{
p1->Status = POPUP_STATUS_OFF; // p1->Status = POPUP_STATUS_OFF;
} //}
p1->next = POPUPLIB_NULL; p1->next = POPUPLIB_NULL;
HintListHead = PopupList_Insert ( HintListHead, p1 ); HintListHead = PopupList_Insert ( HintListHead, p1 );
} }
...@@ -1221,12 +1249,9 @@ static void Popup_Cal_CutGrade_loc ( uint16_t NewPopupID ) ...@@ -1221,12 +1249,9 @@ static void Popup_Cal_CutGrade_loc ( uint16_t NewPopupID )
#endif #endif
} }
else else
{ if(PopupAttributeTable[NewPopupID].Type != POPUP_TYPE_FATAL) {
{ //wangboyu -add -begin -2021年8月20日09:27:10
//针对VC66 组1 - 上位优先
s_PopupScheduling.CutGrade = POPUP_CUT_WAIT_TIME_NORMAL; s_PopupScheduling.CutGrade = POPUP_CUT_WAIT_TIME_NORMAL;
} }
}
break; break;
#if POPUP_HIGH_CUT_LOW_TYPE_IMMEDIATELY #if POPUP_HIGH_CUT_LOW_TYPE_IMMEDIATELY
...@@ -1269,10 +1294,6 @@ static uint8_t Popup_Compare_Priority ( uint16_t PopupID1, uint16_t PopupID2 ) ...@@ -1269,10 +1294,6 @@ static uint8_t Popup_Compare_Priority ( uint16_t PopupID1, uint16_t PopupID2 )
{ {
uint8_t ret = 0u; uint8_t ret = 0u;
/*比较类型*/ /*比较类型*/
if ( PopupAttributeTable[PopupID1].Type < PopupAttributeTable[PopupID2].Type ) if ( PopupAttributeTable[PopupID1].Type < PopupAttributeTable[PopupID2].Type )
{ {
...@@ -1280,10 +1301,6 @@ static uint8_t Popup_Compare_Priority ( uint16_t PopupID1, uint16_t PopupID2 ) ...@@ -1280,10 +1301,6 @@ static uint8_t Popup_Compare_Priority ( uint16_t PopupID1, uint16_t PopupID2 )
} }
else if ( PopupAttributeTable[PopupID1].Type == PopupAttributeTable[PopupID2].Type ) else if ( PopupAttributeTable[PopupID1].Type == PopupAttributeTable[PopupID2].Type )
{ {
/*类型相同,比较主优先级*/ /*类型相同,比较主优先级*/
if ( PopupAttributeTable[PopupID1].Priority < PopupAttributeTable[PopupID2].Priority ) if ( PopupAttributeTable[PopupID1].Priority < PopupAttributeTable[PopupID2].Priority )
{ {
......
This diff is collapsed.
...@@ -205,6 +205,7 @@ void GUI_DisplayServices(void) ...@@ -205,6 +205,7 @@ void GUI_DisplayServices(void)
if (BG_display_flag == 0) if (BG_display_flag == 0)
{ {
BG_display_flag = 1; BG_display_flag = 1;
MenuInit(); MenuInit();
} }
else else
...@@ -225,6 +226,7 @@ void GUI_DisplayServices(void) ...@@ -225,6 +226,7 @@ void GUI_DisplayServices(void)
JCUA_Enable_window(); JCUA_Enable_window();
} }
} }
MenuManage(); MenuManage();
//BG_display_flag = 0; //BG_display_flag = 0;
} }
......
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