Commit 8903cbc3 authored by hu's avatar hu

调整BGU

parent 872dee2d
...@@ -14,13 +14,8 @@ volatile uint8_t FlashSync5Hz; ...@@ -14,13 +14,8 @@ volatile uint8_t FlashSync5Hz;
volatile uint8_t FlashSync05Hz; volatile uint8_t FlashSync05Hz;
volatile uint8_t FlashSync_2_5_Hz; volatile uint8_t FlashSync_2_5_Hz;
volatile uint8_t FlashSync3Hz;
const uint8_t FlashSync1HzTable[] = {0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, const uint8_t FlashSync1HzTable[] = {0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u,
1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u, 1u,
}; };
const uint8_t FlashSync2HzTable[] = {0u, 0u, 0u, 0u, 0u, 1u, 1u, 1u, 1u, 1u, const uint8_t FlashSync2HzTable[] = {0u, 0u, 0u, 0u, 0u, 1u, 1u, 1u, 1u, 1u,
0u, 0u, 0u, 0u, 0u, 1u, 1u, 1u, 1u, 1u, 0u, 0u, 0u, 0u, 0u, 1u, 1u, 1u, 1u, 1u,
...@@ -39,15 +34,8 @@ const uint8_t FlashSync_2_5_HzTable[] = {0u, 0u, 0u, 0u, 1u, 1u, 1u, 1u, 0u, 0u, ...@@ -39,15 +34,8 @@ const uint8_t FlashSync_2_5_HzTable[] = {0u, 0u, 0u, 0u, 1u, 1u, 1u, 1u, 0u, 0u,
1u, 1u, 0u, 0u, 0u, 0u, 1u, 1u, 1u, 1u, 1u, 1u, 0u, 0u, 0u, 0u, 1u, 1u, 1u, 1u,
}; /* 2.5Hz */ }; /* 2.5Hz */
const uint8_t FlashSync3HzTable[] = {0u, 1u};/* 3Hz */ uint8_t FlashTimer = 0u;
uint8_t FlashTimer40 = 0u;
uint8_t count_10 = 0u;//此变量在0~9循环,一周期50ms
uint8_t count_33 = 0u;//此变量在0~32循环,一周期165ms
uint8_t FlashTimer = 0u;//数组下标,数组元素总数为20
uint8_t FlashTimer40 = 0u;//数组下标,数组元素总数为40
uint8_t FlashTimer2 = 0u;//数组下标,数组元素总数为2
/****************************************************************************** /******************************************************************************
函数名:Flash_Sync_Signal_Generation_Service 函数名:Flash_Sync_Signal_Generation_Service
...@@ -55,18 +43,10 @@ uint8_t FlashTimer2 = 0u;//数组下标,数组元素总数为2 ...@@ -55,18 +43,10 @@ uint8_t FlashTimer2 = 0u;//数组下标,数组元素总数为2
参 数:无 参 数:无
返回值:无 返回值:无
******************************************************************************* *******************************************************************************
注 意:该服务函数必须每5ms被调用一次 注 意:该服务函数必须每50ms被调用一次
******************************************************************************/ ******************************************************************************/
void Flash_Sync_Signal_Generation_Service ( void ) void Flash_Sync_Signal_Generation_Service ( void )
{ {
count_10++;//每5ms加1
count_33++;//每5ms加1
if (count_10 >= 10u)
{
count_10 = 0u;
{
FlashTimer++; /*50ms一次 加 1*/ FlashTimer++; /*50ms一次 加 1*/
if ( FlashTimer >= 20u ) if ( FlashTimer >= 20u )
{ {
...@@ -78,26 +58,9 @@ void Flash_Sync_Signal_Generation_Service ( void ) ...@@ -78,26 +58,9 @@ void Flash_Sync_Signal_Generation_Service ( void )
{ {
FlashTimer40 = 0u; FlashTimer40 = 0u;
} }
}
}
if (count_33 >= 33u)
{
count_33 = 0u;
FlashTimer2++; /*165ms一次 加 1*/
if (FlashTimer2 >= 2)
{
FlashTimer2 = 0u;
}
}
FLASH_SYNC_1Hz = FlashSync1HzTable[FlashTimer]; /*500ms*/ FLASH_SYNC_1Hz = FlashSync1HzTable[FlashTimer]; /*500ms*/
FLASH_SYNC_2Hz = FlashSync2HzTable[FlashTimer]; /*250ms*/ FLASH_SYNC_2Hz = FlashSync2HzTable[FlashTimer]; /*250ms*/
FLASH_SYNC_5Hz = FlashSync5HzTable[FlashTimer]; /*100ms*/ FLASH_SYNC_5Hz = FlashSync5HzTable[FlashTimer]; /*100ms*/
FLASH_SYNC_05Hz = FlashSync05HzTable[FlashTimer40]; /*1000ms*/
FLASH_SYNC_2_5_Hz = FlashSync_2_5_HzTable[FlashTimer40]; /*200ms*/ FLASH_SYNC_2_5_Hz = FlashSync_2_5_HzTable[FlashTimer40]; /*200ms*/
FLASH_SYNC_3Hz = FlashSync3HzTable[FlashTimer2];/*165ms*/
} }
\ No newline at end of file
...@@ -20,9 +20,6 @@ extern volatile uint8_t FlashSync5Hz; ...@@ -20,9 +20,6 @@ extern volatile uint8_t FlashSync5Hz;
extern volatile uint8_t FlashSync05Hz; extern volatile uint8_t FlashSync05Hz;
extern volatile uint8_t FlashSync_2_5_Hz; extern volatile uint8_t FlashSync_2_5_Hz;
extern volatile uint8_t FlashSync3Hz;
#define FLASH_SYNC_1Hz FlashSync1Hz #define FLASH_SYNC_1Hz FlashSync1Hz
#define FLASH_SYNC_2Hz FlashSync2Hz #define FLASH_SYNC_2Hz FlashSync2Hz
#define FLASH_SYNC_4Hz FlashSync4Hz #define FLASH_SYNC_4Hz FlashSync4Hz
...@@ -30,8 +27,6 @@ extern volatile uint8_t FlashSync3Hz; ...@@ -30,8 +27,6 @@ extern volatile uint8_t FlashSync3Hz;
#define FLASH_SYNC_05Hz FlashSync05Hz #define FLASH_SYNC_05Hz FlashSync05Hz
#define FLASH_SYNC_2_5_Hz FlashSync_2_5_Hz /* 2.5Hz闪烁 */ #define FLASH_SYNC_2_5_Hz FlashSync_2_5_Hz /* 2.5Hz闪烁 */
#define FLASH_SYNC_3Hz FlashSync3Hz/* 3Hz闪烁 */
/****************************************************************************** /******************************************************************************
函数声明 函数声明
******************************************************************************/ ******************************************************************************/
......
...@@ -646,7 +646,7 @@ void GUI_AdBlue_Dispaly(uint8_t Mode) ...@@ -646,7 +646,7 @@ void GUI_AdBlue_Dispaly(uint8_t Mode)
} }
else if (Level_blinking == 0x03u) else if (Level_blinking == 0x03u)
{ {
if (FLASH_SYNC_3Hz == 1u) if (FLASH_SYNC_2_5_Hz == 1u)
{ {
GUI_General_Display(AdBlue_Sprite, CN_tianlanyefuhaodeng, GUI_BLENDMODE_SRC_OVER); /*AdBlue*/ GUI_General_Display(AdBlue_Sprite, CN_tianlanyefuhaodeng, GUI_BLENDMODE_SRC_OVER); /*AdBlue*/
} }
......
...@@ -134,7 +134,6 @@ void Sys_Run_Mode_5ms_Tasks(void) ...@@ -134,7 +134,6 @@ void Sys_Run_Mode_5ms_Tasks(void)
COM_RX_Process(); COM_RX_Process();
Id18EF1817_Send_Service(); Id18EF1817_Send_Service();
Id18033317_Send_Service(); Id18033317_Send_Service();
Flash_Sync_Signal_Generation_Service();
} }
/*============================================================================== /*==============================================================================
...@@ -196,7 +195,7 @@ void Sys_Run_Mode_20ms_Tasks(void) ...@@ -196,7 +195,7 @@ void Sys_Run_Mode_20ms_Tasks(void)
void Sys_Run_Mode_50ms_Tasks(void) void Sys_Run_Mode_50ms_Tasks(void)
{ {
Flash_Sync_Signal_Generation_Service();
Data_Time_Calibration(); Data_Time_Calibration();
Speed_PPK_Processing(); Speed_PPK_Processing();
Sound_Scheduling_Service(); Sound_Scheduling_Service();
......
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