Commit d461b871 authored by 郑萍's avatar 郑萍

feat:累计时间显示以及掉线时间修改

parent 3e0c01f8
...@@ -18,7 +18,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -18,7 +18,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 3000ul,
0x393ul, 0x393ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -28,7 +28,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -28,7 +28,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 3000ul,
0x398ul, 0x398ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -38,7 +38,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -38,7 +38,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 3000ul,
0x39Dul, 0x39Dul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -48,7 +48,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -48,7 +48,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 2000ul,
0x3A2ul, 0x3A2ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -58,7 +58,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -58,7 +58,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 2000ul,
0x3A7ul, 0x3A7ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -68,7 +68,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -68,7 +68,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 200ul,
0x157ul, 0x157ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -78,7 +78,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -78,7 +78,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 2000ul,
0x38Eul, 0x38Eul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -88,7 +88,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -88,7 +88,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 2500ul,
0x18200A20ul, 0x18200A20ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -98,7 +98,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -98,7 +98,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 1000ul,
0x18202922ul, 0x18202922ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -108,7 +108,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -108,7 +108,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 2500ul,
0x18203020ul, 0x18203020ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -118,7 +118,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -118,7 +118,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 2500ul,
0x18203220ul, 0x18203220ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -128,7 +128,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -128,7 +128,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
2000ul, 200ul,
0x125ul, 0x125ul,
(( void * )0), (( void * )0),
(System_Indicator_ON_callback), (System_Indicator_ON_callback),
...@@ -138,7 +138,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -138,7 +138,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 20000ul,
0x339ul, 0x339ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -148,7 +148,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -148,7 +148,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 2500ul,
0x18200A21ul, 0x18200A21ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
...@@ -158,7 +158,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] = ...@@ -158,7 +158,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u}, {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul, 200ul,
0x134ul, 0x134ul,
(( void * )0), (( void * )0),
(( void * )0), (( void * )0),
......
...@@ -80,6 +80,15 @@ void Can_RX_Apply_Buff(void) ...@@ -80,6 +80,15 @@ void Can_RX_Apply_Buff(void)
CAN_MessageCache_DeInit(CAN0MSG08); CAN_MessageCache_DeInit(CAN0MSG08);
CAN_MessageCache_Init(CAN0MSG08, &CAN_RecvMsg); CAN_MessageCache_Init(CAN0MSG08, &CAN_RecvMsg);
CAN_MessageCache_OverWriteConfig(CAN0MSG08, ENABLE); CAN_MessageCache_OverWriteConfig(CAN0MSG08, ENABLE);
CAN_RecvMsg.Id = 0x339;
CAN_RecvMsg.IDE = CAN_Id_Standard;
CAN_RecvMsg.CacheType = CAN_CacheType_Rx_NoMask;
CAN_RecvMsg.RTR = CAN_RTR_Data;
CAN_RecvMsg.Interrupt = ENABLE;
CAN_MessageCache_DeInit(CAN0MSG11);
CAN_MessageCache_Init(CAN0MSG11, &CAN_RecvMsg);
CAN_MessageCache_OverWriteConfig(CAN0MSG11, ENABLE);
CAN_RecvMsg.Id = 0x18202922; CAN_RecvMsg.Id = 0x18202922;
CAN_RecvMsg.IDE = CAN_Id_Extended; CAN_RecvMsg.IDE = CAN_Id_Extended;
...@@ -140,7 +149,7 @@ void Can_Tx_Apply_Buff(void) ...@@ -140,7 +149,7 @@ void Can_Tx_Apply_Buff(void)
CAN_MessageCache_DeInit(CAN0MSG08); CAN_MessageCache_DeInit(CAN0MSG08);
CAN_MessageCache_Init(CAN0MSG08, &CAN_SendMsg); CAN_MessageCache_Init(CAN0MSG08, &CAN_SendMsg);
CAN_SendMsg.Id = 0x3A2; CAN_SendMsg.Id = 0x3A7;
CAN_SendMsg.IDE = CAN_Id_Standard; CAN_SendMsg.IDE = CAN_Id_Standard;
CAN_SendMsg.CacheType = CAN_CacheType_Tx; CAN_SendMsg.CacheType = CAN_CacheType_Tx;
CAN_SendMsg.RTR = CAN_RTR_Data; CAN_SendMsg.RTR = CAN_RTR_Data;
......
...@@ -97,59 +97,66 @@ void Gauge_EleDial_AllSOC_Display(void) ...@@ -97,59 +97,66 @@ void Gauge_EleDial_AllSOC_Display(void)
void Gauge_Clock_Display(void) void Gauge_Clock_Display(void)
{ {
uint8_t PageType_DIS = 0; uint32_t Clock_all = 0;
// if (Common_Get_IG_Sts( ) == COMMON_POWER_ON) static uint8_t Clock_seconds = 0;
// { static uint8_t Clock_hours = 0;
// // PageType_DIS = Get_Current_PageType(); if (Common_Get_IG_Sts() == COMMON_POWER_ON)
{
// if ( PageType_DIS == 1 ) if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x339_Msg)) == CAN_ERR_OK)
// { {
// if(FLASH_SYNC_1Hz) Clock_all = Get_CAN_CH0_ID_339_Sig_MMCU_SingleWorkingHours();
// { Clock_hours = Clock_all / 60;
// SEG_SET_Clock(Get_Dis_Hour_Time(), Get_Dis_Minute_Time(), 1, 1, 1); Clock_seconds = Clock_all % 60;
// } SEG_SET_Clock(Clock_hours, Clock_seconds, FLASH_SYNC_1Hz, 1, 1);
// else }
// { else
// SEG_SET_Clock(Get_Dis_Hour_Time(), Get_Dis_Minute_Time(), 1, 0, 1); {
// } SEG_SET_Clock(Clock_hours, Clock_seconds, 1, 1, 1);
}
// } }
// else if ( PageType_DIS == 2 ) else
// { {
// if(FLASH_SYNC_1Hz) SEG_SET_Clock(0, 0, 0, 0, 0);
// { }
// SEG_SET_Clock(Get_Dis_Hour_Time(), Get_Dis_Minute_Time(), 1, 1, 1);
// }
// else
// {
// SEG_SET_Clock(Get_Dis_Hour_Time(), Get_Dis_Minute_Time(), 1, 1, 0);
// }
// }
// else
// {
// SEG_SET_Clock(Get_Dis_Hour_Time(), Get_Dis_Minute_Time(), FLASH_SYNC_1Hz, 1, 1);
// }
// }
// else
// {
// SEG_SET_Clock(0, 0, 0, 0, 0);
// }
} }
uint32_t AccumulatedWorkHours; static uint16_t EEPROM_Write_Time = 0;
void Gauge_Clock_All_Display(void) void Data_CumulativeWorkHours_EEPROM_Write(void)
{ {
uint32_t u32Data[1] = {0};
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x339_Msg))) uint32_t eeprom_back[1] = {0};
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x339_Msg)) == CAN_ERR_OK)
{ {
AccumulatedWorkHours = Get_CAN_CH0_ID_339_Sig_MMCU_AccumulatedWorkHours() * 10; u32Data[0] = Get_CAN_CH0_ID_339_Sig_MMCU_AccumulatedWorkHours();
if (Common_Get_IG_Sts() == COMMON_POWER_ON) eeprom_ReadRecord(EEPROM_BLOCK_00, (uint8_t *)eeprom_back, 4);
if (EEPROM_Write_Time == 0)
{
if (u32Data[0] >= eeprom_back[0])
{
eeprom_WriteRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data, 4);
}
}
if (++EEPROM_Write_Time > 6000) // 一分钟存一次
{ {
SEG_SET_Clock_ALL(0, AccumulatedWorkHours); EEPROM_Write_Time = 0;
} }
} }
else else
{ {
EEPROM_Write_Time = 0;
}
}
void Gauge_Clock_All_Display(void)
{
uint32_t u32Data[1] = {0};
eeprom_ReadRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data, 4);
if (Common_Get_IG_Sts() == COMMON_POWER_ON)
{
SEG_SET_Clock_ALL(1, u32Data[0]);
}
else
{
SEG_SET_Clock_ALL(0, 0);
} }
} }
...@@ -198,19 +205,27 @@ void Gauge_Service(void) ...@@ -198,19 +205,27 @@ void Gauge_Service(void)
{ {
if (Common_GetIgnOnTime() >= 3000) if (Common_GetIgnOnTime() >= 3000)
{ {
// Gauge_Power_1_SOC_Display();
// Gauge_Power_2_SOC_Display();
Checkself_Init(); Checkself_Init();
Gauge_Clock_Display(); Gauge_Clock_Display();
SEG_SET_Clock(22, 22, 1, 1, 1); Gauge_Clock_All_Display();
SEG_SET_Fault_Code(0, 2222);
// SEG_SET_EleDial_1SOC(1, 10, 22);
// SEG_SET_FuelDial(0, 8);
Gauge_EleDial_AllSOC_Display(); Gauge_EleDial_AllSOC_Display();
SEG_SET_GEAR(1, 1); SEG_SET_GEAR(1, 1);
SEG_SET_Cutterhead(1, 2); SEG_SET_Cutterhead(1, 2);
SEG_SET_Frame(1); Gauge_Frame_Display();
interact_PWM_Low_Duty = 0; if (Get_CAN_Power_State() == KEY_ACC)
{
interact_PWM_Low_Duty = 0;
}
else if (Get_CAN_Power_State() == READY)
{
interact_PWM_Low_Duty = 30;
}
else
{
}
// Gauge_Power_1_SOC_Display();
// Gauge_Power_2_SOC_Display();
} }
else else
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "Components.h" #include "Components.h"
#define EEPROM_BLOCK_00 0
typedef struct typedef struct
{ {
...@@ -52,7 +52,7 @@ void Gauge_Frame_Display(void); ...@@ -52,7 +52,7 @@ void Gauge_Frame_Display(void);
void Gauge_MaintenanceMileage_Display(void); void Gauge_MaintenanceMileage_Display(void);
void Gauge_EnergyRecoveryLevel_Display(void); void Gauge_EnergyRecoveryLevel_Display(void);
void Gauge_EleDial_AllSOC_Display(void); void Gauge_EleDial_AllSOC_Display(void);
void Data_CumulativeWorkHours_EEPROM_Write(void);
void Gauge_KL30_Init(void); void Gauge_KL30_Init(void);
void Gauge_KL15_Init(void); void Gauge_KL15_Init(void);
void Gauge_Service(void); void Gauge_Service(void);
......
...@@ -255,7 +255,6 @@ _Fun_Res SEG_SET_GEAR(uint8_t m_Gear_Flag, uint8_t m_Gear) ...@@ -255,7 +255,6 @@ _Fun_Res SEG_SET_GEAR(uint8_t m_Gear_Flag, uint8_t m_Gear)
IC2_SEG100 = IC_SEG_OFF; IC2_SEG100 = IC_SEG_OFF;
IC2_SEG142 = IC_SEG_OFF; IC2_SEG142 = IC_SEG_OFF;
IC2_SEG143 = IC_SEG_OFF; IC2_SEG143 = IC_SEG_OFF;
IC2_SEG032 = IC_SEG_OFF;
IC2_SEG094 = IC_SEG_ON; // 圈 IC2_SEG094 = IC_SEG_ON; // 圈
IC2_SEG095 = IC_SEG_ON; IC2_SEG095 = IC_SEG_ON;
...@@ -2208,16 +2207,8 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag , uint32_t m_NUM) ...@@ -2208,16 +2207,8 @@ _Fun_Res SEG_SET_Clock_ALL(uint8_t m_Flag , uint32_t m_NUM)
} }
/*十位*/ /*十位*/
Num = (m_NUM / 10u) % 10u; Num = (m_NUM / 10u) % 10u;
if(m_NUM > 10) m8 = SEG_DISPLAY_NUMBER0[Num];
{ IC2_SEG069 = IC_SEG_ON;
m8 = SEG_DISPLAY_NUMBER0[Num];
IC2_SEG069 = IC_SEG_ON;
}
else
{
m8 = SEG_UNDISPLAY_NUMBER0[Num];
IC2_SEG069 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 0)) if (Bit_Is_Set(m8, 0))
{ {
......
...@@ -284,7 +284,6 @@ static Tellib_uint16_t LED_READY_Judgement(void) ...@@ -284,7 +284,6 @@ static Tellib_uint16_t LED_READY_Judgement(void)
if (Signal1 == READY) if (Signal1 == READY)
{ {
LED_STATE = 1; LED_STATE = 1;
interact_PWM_Low_Duty = 30;
} }
else else
{ {
...@@ -418,6 +417,7 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status ...@@ -418,6 +417,7 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, SEG_LED_Recharge, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, SEG_LED_Recharge, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Recharge,0);
} }
} }
// static Tellib_uint16_t LED_Battery_Charging_POWEROFF_Judgement(void) // static Tellib_uint16_t LED_Battery_Charging_POWEROFF_Judgement(void)
......
...@@ -33,6 +33,7 @@ void Sys_10ms_Tasks(void) ...@@ -33,6 +33,7 @@ void Sys_10ms_Tasks(void)
{ {
Line_In_Debounce_Service(10u); Line_In_Debounce_Service(10u);
Can_BusOff_Recover(10u); Can_BusOff_Recover(10u);
Data_CumulativeWorkHours_EEPROM_Write();
TYW_Check_Count(); TYW_Check_Count();
} }
......
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