Commit ade3a199 authored by 郑萍's avatar 郑萍

🐞 fix:更改自检的bug,50982 【润通草地车】【数显自检】仪表数显自检时,显示有问题以及上传升级文档

parent 7eb49f99
......@@ -321,16 +321,16 @@ _Fun_Res SEG_SET_GEAR(uint8_t m_Gear_Flag, uint8_t m_Gear, uint8_t checkself)
if (checkself == 1)
{
m8 = SEG_DISPLAY_NUMBER0[m_Gear];
if (m_Gear == 8)
{
IC2_SEG096 = IC_SEG_ON;
IC2_SEG142 = IC_SEG_ON;
}
else
{
IC2_SEG096 = IC_SEG_OFF;
IC2_SEG142 = IC_SEG_OFF;
}
// if (m_Gear == 8)
// {
// IC2_SEG096 = IC_SEG_ON;
// IC2_SEG142 = IC_SEG_ON;
// }
// else
// {
// IC2_SEG096 = IC_SEG_OFF;
// IC2_SEG142 = IC_SEG_OFF;
// }
if (Bit_Is_Set(m8, 0))
{
IC2_SEG148 = IC_SEG_ON;
......@@ -2614,30 +2614,30 @@ void Checkself_SEG_Display(void)
uint16_t hour = 0;
uint16_t min = 0;
soc_all = (Checkself_SEG_step / 1) * 11 + 100;
uint32_t allhour = (Checkself_SEG_step / 1) * 11111;
soc_all = (Checkself_SEG_step / 5) * 11 + 100;
uint32_t allhour = (Checkself_SEG_step / 5) * 11111;
// Fuel = Checkself_SEG_step / 5u;
// SEG_SET_FuelDial(1, Fuel);
SEG_SET_EleDial_AllSOC(1, soc_all);
SEG_SET_EleDial_2SOC(1, (Checkself_SEG_step / 1) + 1);
SEG_SET_EleDial_1SOC(1, (Checkself_SEG_step / 1) + 1);
SEG_SET_EleDial_2SOC(1, ((Checkself_SEG_step*10) / 45));
SEG_SET_EleDial_1SOC(1, ((Checkself_SEG_step*10) / 45));
SEG_SET_Clock_ALL(1, allhour);
hour = (Checkself_SEG_step / 1) * 11;
min = (Checkself_SEG_step / 1) * 11;
hour = (Checkself_SEG_step / 5) * 11;
min = (Checkself_SEG_step / 5) * 11;
SEG_SET_Clock(hour, min, 1, 1, 1);
SEG_SET_GEAR(1, (Checkself_SEG_step / 1), 1);
SEG_SET_Cutterhead(1, (Checkself_SEG_step / 1), 1);
if (Checkself_SEG_step_count < 20)
SEG_SET_GEAR(1, (Checkself_SEG_step / 5), 1);
SEG_SET_Cutterhead(1, (Checkself_SEG_step / 5), 1);
if (Checkself_SEG_step_count < 100)
{
Checkself_SEG_step_count++;
}
else
{
Checkself_SEG_step_count = 20;
Checkself_SEG_step_count = 100;
}
if (Checkself_SEG_step_count < 10)
if (Checkself_SEG_step_count < 50)
{
Checkself_SEG_step++;
}
......
......@@ -9,7 +9,7 @@ typedef struct
uint32_t u32Task10msCnt;
uint32_t u32Task20msCnt;
uint32_t u32Task50msCnt;
uint32_t u32Task75msCnt;
uint32_t u32Task15msCnt;
uint32_t u32Task100msCnt;
} Sys_Scheduler_st_t;
......@@ -246,7 +246,7 @@ void Sys_Scheduler_Start(uint32_t u32SchCycle)
g_stSysScheduler.u32Task10msCnt = 1UL;
g_stSysScheduler.u32Task20msCnt = 3UL;
g_stSysScheduler.u32Task50msCnt = 5UL;
g_stSysScheduler.u32Task75msCnt = 6UL;
g_stSysScheduler.u32Task15msCnt = 2UL;
g_stSysScheduler.u32Task100msCnt = 7UL;
}
......@@ -303,11 +303,11 @@ void Sys_Scheduling_Service(void)
Sys_50ms_Tasks();
}
g_stSysScheduler.u32Task75msCnt += u32msDelta;
if (g_stSysScheduler.u32Task75msCnt >= 75UL)
g_stSysScheduler.u32Task15msCnt += u32msDelta;
if (g_stSysScheduler.u32Task15msCnt >= 15UL)
{
g_stSysScheduler.u32Task75msCnt %= 75UL;
Sys_75ms_Tasks();
g_stSysScheduler.u32Task15msCnt %= 15UL;
Sys_15ms_Tasks();
}
g_stSysScheduler.u32Task100msCnt += u32msDelta;
......
......@@ -41,5 +41,5 @@ extern void Sys_5ms_Tasks(void);
extern void Sys_10ms_Tasks(void);
extern void Sys_20ms_Tasks(void);
extern void Sys_50ms_Tasks(void);
extern void Sys_75ms_Tasks(void);
extern void Sys_15ms_Tasks(void);
extern void Sys_100ms_Tasks(void);
......@@ -48,9 +48,9 @@ void Sys_50ms_Tasks(void)
Gauge_Service();
}
void Sys_75ms_Tasks(void)
void Sys_15ms_Tasks(void)
{
if (checkself_seg_Flag == 1)
if ((Common_GetIgnOnTime() <= 1500) && (Common_GetIgnOnTime() > 0) && (checkself_seg_Flag == 1))
{
Checkself_SEG_Display();
// if (Checkself_SEG_step_count < 20)
......
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