Commit eb9f3b99 authored by 张金硕's avatar 张金硕

🐞 fix:里程库的函数放在100ms中断里调用

parent fd1a0b87
......@@ -80,7 +80,7 @@ void Sys_100ms_Tasks(void)
S3_ServerCNTT();
Get_DisTime_Service();
Fuel_Cal_Sevice(100u);
Services_Mileage_Callback();
// Services_Mileage_Callback();
// Data_Mileage_Clear();
// RTE_GPIO_Config(RTE_GPIO_PORT05_PIN04, GpioOut_High);
//BackLight_Process();
......@@ -89,6 +89,7 @@ void Sys_100ms_Tasks(void)
// aaa = Menu_Item_Select_Get(MENU_ITEM_SELECT_AUTO);
}
static uint16_t task_2ms = 0u;
static uint16_t task_100ms = 0u;
void Sys_Exact_50us_Tasks(void)
{
static uint32_t task_1ms = 0u;
......@@ -102,9 +103,15 @@ void Sys_Exact_50us_Tasks(void)
}
task_2ms++;
if (task_2ms >= 40)
if (task_2ms >= 40U)
{
task_2ms = 0;
task_2ms = 0U;
AMT630H_Timer(2);
}
task_100ms++;
if(task_100ms >= 2000U)
{
task_100ms = 0U;
Services_Mileage_Callback();
}
}
\ No newline at end of file
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