加入了max30102模块

This commit is contained in:
2021-08-21 13:53:13 +08:00
parent 2eb96d763e
commit c19c78ac1a
14 changed files with 6382 additions and 6250 deletions
+38 -9
View File
@@ -166,25 +166,53 @@ void Set_Windows_XY_BY_ACC(window *temp_window,int acc_x,int acc_y)
}
//显示一个窗口
void Refresh_Window(window *temp_window)
void Refresh_Window(UI *ui,window *temp_window)
{
//开始绘制窗口//填充窗口背景
int x,y;
char z;
for(uint16_t temp_y=0;temp_y<temp_window->high;temp_y++)
{
Inteface_SetCursor(temp_window->x,temp_window->y+temp_y);
z=1;
for(uint16_t temp_i=0;temp_i<temp_window->width;temp_i++)
{
if(temp_i==0||temp_y==0||temp_i==temp_window->width-1||temp_y==temp_window->high-1)
x=temp_window->x+temp_i;
y=temp_window->y+temp_y;
if(y>=ui->y&&z==1)
{
Inteface_SetColor(BLUE);
}else
{
Inteface_SetColor(temp_window->background);
Inteface_SetCursor(x,y);
z=0;
}
if(x>=ui->x)
{
if(temp_y<16)
{
if(temp_i>temp_window->width-16)
{
Inteface_SetColor(RED);
}else
{
Inteface_SetColor(BLUE);
}
}else
{
if(temp_i==0||temp_y==0||temp_i==temp_window->width-1||temp_y==temp_window->high-1)
{
Inteface_SetColor(BLUE);
}else
{
Inteface_SetColor(temp_window->background);
}
}
}
}
}
//绘制bar
/*
for(uint16_t temp_y=0;temp_y<16;temp_y++)
{
Inteface_SetCursor(temp_window->x,temp_window->y+temp_y);
@@ -200,6 +228,7 @@ void Refresh_Window(window *temp_window)
}
}
*/
//显示title
LCD_ShowString(temp_window->x,temp_window->y,&temp_window->title,16,WHITE,WHITE);
@@ -230,7 +259,7 @@ void Refresh_UI(UI *ui)
if(temp_windows_stack!=NULL)
{
flag=1;
Refresh_Window(temp_windows_stack->window);
Refresh_Window(ui,temp_windows_stack->window);
//绘制下一个窗口
temp_windows_stack=temp_windows_stack->next;
}else
@@ -363,7 +392,7 @@ void UI_Server(UI *ui)
switch(hit_flag)
{
case CLOSE:
Close_Windows_Stack(ui,temp_windows_stack);
//Close_Windows_Stack(ui,temp_windows_stack);
ui->refresh_ui_flag=1; //发生了变化 刷新ui的显示
break;
case BAR: