Commit 425fb606 authored by 时昊's avatar 时昊

Merge branch 'shihao' into 'dev'

Shihao

See merge request !13
parents a15e7c8f 9aaa74f2
......@@ -18,10 +18,10 @@ const PopupAttributeStruct PopupAttributeTable_1[POPUP_NUMBER_TOTAL] =
/*============================================================================================================================================================================================================================
| 报警序号 |优先级 | 报警类 | 成员 | 数量| 播放模式 | 报警音 | 声音模式:持续/单周期| 保持时间*100ms |最小保持时间*100ms |
============================================================================================================================================================================================================================*/
/* 雷达长鸣 */{ 12u, POPUP_Radar_Changming, NULL, 1u, POPUP_MODE_LONG_HINT, SND_RADAR_Changming, POPUP_MODE_MULTI, 0xFFFFu, 10u, },
/* 雷达1hz */{ 12u, POPUP_Radar_1HZ, NULL, 1u, POPUP_MODE_LONG_HINT, SND_RADAR_1HZ, POPUP_MODE_MULTI, 0xFFFFu, 10u, },
/* 雷达2hz */{ 12u, POPUP_Radar_2HZ, NULL, 1u, POPUP_MODE_LONG_HINT, SND_RADAR_2HZ, POPUP_MODE_MULTI, 0xFFFFu, 10u, },
/* 雷达4hz */{ 12u, POPUP_Radar_4HZ, NULL, 1u, POPUP_MODE_LONG_HINT, SND_RADAR_4HZ, POPUP_MODE_MULTI, 0xFFFFu, 10u, },
/* 雷达长鸣 */{ 12u, POPUP_Radar_Changming, NULL, 1u, POPUP_MODE_LONG_HINT, SND_RADAR_Changming, POPUP_MODE_MULTI, 11u, 10u, },
/* 雷达1hz */{ 12u, POPUP_Radar_1HZ, NULL, 1u, POPUP_MODE_LONG_HINT, SND_RADAR_1HZ, POPUP_MODE_MULTI, 11u, 10u, },
/* 雷达2hz */{ 12u, POPUP_Radar_2HZ, NULL, 1u, POPUP_MODE_LONG_HINT, SND_RADAR_2HZ, POPUP_MODE_MULTI, 11u, 10u, },
/* 雷达4hz */{ 12u, POPUP_Radar_4HZ, NULL, 1u, POPUP_MODE_LONG_HINT, SND_RADAR_4HZ, POPUP_MODE_MULTI, 11u, 10u, },
/* 倒车雷达系统故障 */{ 12u, POPUP_RADAR_SYSTEM_FAILURE, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_RADAR_2S, POPUP_MODE_SINGLE, 30u, 10u, },
/* 倒车雷达传感器故障 */{ 12u, POPUP_RADAR_SENSOR_FAILURE, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_RADAR_2S, POPUP_MODE_SINGLE, 20u, 10u, },
/* 雷达开关故障 */{ 0u, POPUP_RADAR_SWITCH_FAILURE, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_RADAR_0S, POPUP_MODE_SINGLE, 30u, 10u, },
......@@ -38,7 +38,7 @@ const PopupAttributeStruct PopupAttributeTable_1[POPUP_NUMBER_TOTAL] =
/* 电机故障 */{ 9u, POPUP_MotorFault, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_MotorFault, POPUP_MODE_SINGLE, 11u, 10u, },
/* 动力电池报警 */{ 10u, POPUP_SOC_Fault, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_SOC_Fault, POPUP_MODE_SINGLE, 11u, 10u, },
/* 高压绝缘故障 */{ 11u, POPUP_InsulationFault, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_InsulationFault, POPUP_MODE_SINGLE, 11u, 10u, },
/* 电池热失控 */{ 1u, POPUP_SOC_HT, NULL, 1u, POPUP_MODE_LONG_HINT, SND_SOC_HT, POPUP_MODE_MULTI, 0xFFFFu, 10u, },
/* 电池热失控 */{ 1u, POPUP_SOC_HT, NULL, 1u, POPUP_MODE_LONG_HINT, SND_SOC_HT, POPUP_MODE_MULTI, 11u, 10u, },
/* 单踏板功能激活 */{ 13u, POPUP_Energy_Recovery, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_Energy_Recovery, POPUP_MODE_SINGLE, 11u, 10u, },
/* 单踏板功能激活 1HZ 3次 1.4变更新增 */{ 13u, POPUP_Energy_Recovery_1, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_Energy_Recovery_1, POPUP_MODE_MULTI, 0xFFFFu, 10u, },
/* ECO状态激活 */{ 14u, POPUP_ECO, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_ECO, POPUP_MODE_SINGLE, 11u, 10u, },
......@@ -61,7 +61,7 @@ const PopupAttributeStruct PopupAttributeTable_1[POPUP_NUMBER_TOTAL] =
/* OTA 报警4 */{ 22u, POPUP_OTA_4, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_OTA_4, POPUP_MODE_SINGLE, 11u, 10u, },
/* OTA 报警5 */{ 22u, POPUP_OTA_5, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_OTA_5, POPUP_MODE_SINGLE, 11u, 10u, },
/* OTA 报警5 */{ 22u, POPUP_ESC, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_ESC, POPUP_MODE_SINGLE, 11u, 10u, },
/* 超速报警 */{ 13u, POPUP_Over_Speed, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_Over_Speed, POPUP_MODE_SINGLE, 40u, 10u, },
/* 超速报警 */{ 13u, POPUP_Over_Speed, NULL, 1u, POPUP_MODE_SHORT_HINT, SND_Over_Speed, POPUP_MODE_SINGLE, 11u, 10u, },
/*==========================================================================================================================================================================================================================================*/
};
......
......@@ -507,6 +507,8 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_Radar_1HZ);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_4HZ);
}
else if ( RADAR_SOUND == POPUP_Radar_2HZ )
{
......@@ -516,6 +518,8 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_1HZ);
Popup_Clear(POPUP_Radar_4HZ);
}
else if ( RADAR_SOUND == POPUP_Radar_4HZ )
{
......@@ -525,6 +529,8 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_Radar_4HZ);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_1HZ);
Popup_Clear(POPUP_Radar_2HZ);
}
else if ( RADAR_SOUND == POPUP_Radar_Changming )
{
......@@ -533,15 +539,20 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_Radar_1HZ);
Popup_Request(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_1HZ);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_4HZ);
}
else
{
PopupAndSound_Delete(POPUP_Radar_2HZ);
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_Radar_1HZ);
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_1HZ);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_4HZ);
}
}
else
......@@ -550,7 +561,10 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_Radar_1HZ);
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_1HZ);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_4HZ);
}
}
else
......@@ -559,7 +573,10 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_Radar_4HZ);
PopupAndSound_Delete(POPUP_Radar_1HZ);
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_1HZ);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_4HZ);
}
}
else if(Val_EOL_F102_RadarType() == 3)
......@@ -575,6 +592,8 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_4HZ);
Popup_Clear(POPUP_RADAR_SENSOR_FAILURE);
break;
case 2://4hz
PopupAndSound_Delete(POPUP_Radar_2HZ);
......@@ -583,6 +602,8 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_Radar_4HZ);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_RADAR_SENSOR_FAILURE);
break;
case 3://长鸣
PopupAndSound_Delete(POPUP_Radar_2HZ);
......@@ -590,6 +611,9 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_RADAR_CHECK_OK);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_4HZ);
Popup_Clear(POPUP_RADAR_SENSOR_FAILURE);
break;
case 4://长鸣0.5s
PopupAndSound_Delete(POPUP_Radar_2HZ);
......@@ -598,6 +622,9 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Request(POPUP_RADAR_CHECK_OK);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_4HZ);
Popup_Clear(POPUP_RADAR_SENSOR_FAILURE);
break;
case 5://雷达故障 长鸣2s
PopupAndSound_Delete(POPUP_Radar_2HZ);
......@@ -606,6 +633,8 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_RADAR_SENSOR_FAILURE);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_4HZ);
break;
case 6://雷达数据超时 长鸣2s
PopupAndSound_Delete(POPUP_Radar_2HZ);
......@@ -614,6 +643,8 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_Radar_Changming);
Popup_Request(POPUP_RADAR_SENSOR_FAILURE);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_4HZ);
break;
default://0 不报警
PopupAndSound_Delete(POPUP_Radar_2HZ);
......@@ -622,6 +653,9 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_Radar_Changming);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_4HZ);
Popup_Clear(POPUP_RADAR_SENSOR_FAILURE);
break;
}
}
......@@ -633,6 +667,9 @@ void Popups_Polling(void)
PopupAndSound_Delete(POPUP_Radar_Changming);
PopupAndSound_Delete(POPUP_RADAR_SENSOR_FAILURE);
Popup_Clear(POPUP_Radar_Changming);
Popup_Clear(POPUP_Radar_2HZ);
Popup_Clear(POPUP_Radar_4HZ);
Popup_Clear(POPUP_RADAR_SENSOR_FAILURE);
}
}
else
......
......@@ -309,20 +309,27 @@ void Gauge_Power_Display(void)
}
else//PTModeInd = 1,且有效时
{
if(BattCurr.Value == 0)
if(BattCurr.Valid == 1)
{
SEG_SET_PowerDial(1u, 0u, 0u, 0u);
if(BattCurr.Value == 0)
{
SEG_SET_PowerDial(1u, 0u, 0u, 0u);
}
else
{
//-1格和-50%
SEG_SET_PowerDial(1u, 0x81u, 1u, 50u);
if(BattCurr.Value > 5000)
{
//-1 -2格和-100%
SEG_SET_PowerDial(1u, 0x82u, 1u, 100u);
}
}
}
else
{
//-1格和-50%
SEG_SET_PowerDial(1u, 0x81u, 1u, 50u);
if(BattCurr.Value > 5000)
{
//-1 -2格和-100%
SEG_SET_PowerDial(1u, 0x82u, 1u, 100u);
}
SEG_SET_PowerDial(1u, 0u, 0u, 255u);
}
}
}
......@@ -422,13 +429,15 @@ void Gauge_Battery_Display(void)
******************************************************************************/
extern uint8_t Can18fee69f_receive;
void Gauge_Clock_Display(void)
{
{
uint16_t Year_FLAG = 0u;
uint8_t Month_FLAG = 0u;
uint8_t Date_FLAG = 0u;
uint8_t Hour_FLAG = 0;
uint8_t Minute_FLAG = 0;
uint8_t Second_FLAG = 0;
if ( SYS_OPR_STAT_IGN_ON )
{
//��ȡʱ��
RTCTimeCurrent.Hour = Get_ID_18FEE69F_Sig_TBOX_Hour( );
RTCTimeCurrent.Minute = Get_ID_18FEE69F_Sig_TBOX_Minute( );
//ʱ����ʾ
if(Factory_ClearOdo_Display_Flag == 0)
{
......@@ -439,10 +448,25 @@ void Gauge_Clock_Display(void)
}
else
{
SEG_SET_Clock(RTCTimeCurrent.Hour, RTCTimeCurrent.Minute, FLASH_SYNC_1Hz, 1, 1);
Year_FLAG = (uint16_t)(Get_ID_18FEE69F_Sig_TBOX_Year());
Month_FLAG = (uint8_t)Get_ID_18FEE69F_Sig_TBOX_Month();
Date_FLAG = (uint8_t)Get_ID_18FEE69F_Sig_TBOX_Day() >> 2;
Hour_FLAG = (uint8_t)Get_ID_18FEE69F_Sig_TBOX_Hour();
Minute_FLAG = (uint8_t)Get_ID_18FEE69F_Sig_TBOX_Minute();
Second_FLAG = (uint8_t)Get_ID_18FEE69F_Sig_TBOX_Second() >> 2;
if ((Year_FLAG <= 0xFAu) && (Month_FLAG >= 1u) && (Month_FLAG <= 12u) && \
(Date_FLAG >= 1u) && (Date_FLAG <= 31u) && (Hour_FLAG < 24u) && \
(Minute_FLAG < 60u) && (Second_FLAG < 60u))
{
SEG_SET_Clock(Hour_FLAG, Minute_FLAG, FLASH_SYNC_1Hz, 1, 1);
}
else
{
SEG_SET_Clock(0, 0, FLASH_SYNC_1Hz, 1, 1);
}
}
}
}
else
{
......
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