Commit 7bd87f4c authored by 时昊's avatar 时昊

🌈 style:41173修改时间显示

parent 53e52851
......@@ -429,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)
{
......@@ -446,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