Commit 0168f7cd authored by 时昊's avatar 时昊

增加超速报警配置功能

parent f016ba4e
...@@ -85,6 +85,8 @@ void Gauge_VSpeed_Display(void) ...@@ -85,6 +85,8 @@ void Gauge_VSpeed_Display(void)
{ {
uint16_t VSpeedDisplayValue = 0; uint16_t VSpeedDisplayValue = 0;
// static uint16_t refresh_timer=0; // static uint16_t refresh_timer=0;
uint16_t Over_Speed_Config = 0;
Over_Speed_Config = Get_Over_Speed_Config(0);
if ( SYS_OPR_STAT_IGN_ON ) if ( SYS_OPR_STAT_IGN_ON )
{ {
if ( Common_Get_Disp_V_Speed_Valid( ) == 1u ) if ( Common_Get_Disp_V_Speed_Valid( ) == 1u )
...@@ -93,7 +95,7 @@ void Gauge_VSpeed_Display(void) ...@@ -93,7 +95,7 @@ void Gauge_VSpeed_Display(void)
VSpeedDisplayValue = Common_Get_Disp_V_Speed( ); VSpeedDisplayValue = Common_Get_Disp_V_Speed( );
if(Factory_ClearOdo_Display_Flag == 0) if(Factory_ClearOdo_Display_Flag == 0)
{ {
if(Common_Get_Disp_V_Speed( ) >= 810) if(Common_Get_Disp_V_Speed( ) > Over_Speed_Config)
{ {
SEG_SET_VSpeed_NUM(FLASH_SYNC_1Hz, VSpeedDisplayValue/10); SEG_SET_VSpeed_NUM(FLASH_SYNC_1Hz, VSpeedDisplayValue/10);
Gauge_VSpeed_Display_Flag = 1; Gauge_VSpeed_Display_Flag = 1;
...@@ -102,7 +104,7 @@ void Gauge_VSpeed_Display(void) ...@@ -102,7 +104,7 @@ void Gauge_VSpeed_Display(void)
{ {
if(Gauge_VSpeed_Display_Flag == 1) if(Gauge_VSpeed_Display_Flag == 1)
{ {
if(Common_Get_Disp_V_Speed( ) < 780) if(Common_Get_Disp_V_Speed( ) <= (Over_Speed_Config - 30))
{ {
SEG_SET_VSpeed_NUM(1u, VSpeedDisplayValue/10); SEG_SET_VSpeed_NUM(1u, VSpeedDisplayValue/10);
Gauge_VSpeed_Display_Flag = 0; Gauge_VSpeed_Display_Flag = 0;
...@@ -137,6 +139,49 @@ void Gauge_VSpeed_Display(void) ...@@ -137,6 +139,49 @@ void Gauge_VSpeed_Display(void)
} }
} }
uint16_t Get_Over_Speed_Config(uint8_t Para0)
{
uint16_t Ret = 0U;
switch ( Para0 )
{
case 0x00:
Ret = 0xffff;
break;
case 0x01:
Ret = 600;
break;
case 0x02:
Ret = 650;
break;
case 0x03:
Ret = 700;
break;
case 0x04:
Ret = 750;
break;
case 0x05:
Ret = 800;
break;
case 0x06:
Ret = 850;
break;
case 0x07:
Ret = 900;
break;
case 0x08:
Ret = 950;
break;
case 0x09:
Ret = 1000;
break;
default:
break;
}
return Ret;
}
/************************************************************************** /**************************************************************************
* \brief ���ʱ���ʾ���� * \brief ���ʱ���ʾ����
* \attention �÷��������뱻ʵʱ���� * \attention �÷��������뱻ʵʱ����
......
...@@ -52,7 +52,7 @@ void Gauge_Service(void); ...@@ -52,7 +52,7 @@ void Gauge_Service(void);
void Temp_Calc_Init(void); void Temp_Calc_Init(void);
void Temp_Calc_Send(void); void Temp_Calc_Send(void);
uint32_t Get_Temp_Calc(void); uint32_t Get_Temp_Calc(void);
uint16_t Get_Over_Speed_Config(uint8_t Para0);
#endif #endif
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