Commit 69bb0ea8 authored by 李冠华's avatar 李冠华

feat:单次工作时长增加限制

parent 1e7e789c
......@@ -39,6 +39,10 @@ void Data_Time_Single_Working_Hours(void)
#else
if (Get_CAN_Power_State() == KEY_ACC)
{
if(Time.KeepTimeCount >= SINGLE_MAX_TIME_SECOND)
{
Time.KeepTimeCount = SINGLE_MAX_TIME_SECOND;
}
Time.SingleHour = (uint8_t)(Time.KeepTimeCount / 3600U);
Time.SingleMin = (uint8_t)((Time.KeepTimeCount % 3600U) / 60U);
Time.SingleValid = 1;
......
......@@ -4,6 +4,7 @@
#include "Application.h"
#include "Components.h"
#define SINGLE_MAX_TIME_SECOND 91800U /*单次计时最大显示时长,单位s*/
typedef struct //__attribute__((aligned(4)))
{
......
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