曲线颜色修改bug修复
This commit is contained in:
parent
1b2b188e8f
commit
956ca7baaa
|
@ -1341,7 +1341,7 @@ void scr_main_color_update(void)
|
||||||
{
|
{
|
||||||
case COLOR_BLUE:
|
case COLOR_BLUE:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_1 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_BLUE_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_1, lv_color_hex(COLOR_BLUE_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_BLUE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_BLUE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_BLUE);
|
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_BLUE);
|
||||||
}
|
}
|
||||||
|
@ -1349,7 +1349,7 @@ void scr_main_color_update(void)
|
||||||
|
|
||||||
case COLOR_DARK_BLUE:
|
case COLOR_DARK_BLUE:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_1 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_DARK_BLUE_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_1, lv_color_hex(COLOR_DARK_BLUE_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_DARK_BLUE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_DARK_BLUE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_DARK_BLUE);
|
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_DARK_BLUE);
|
||||||
}
|
}
|
||||||
|
@ -1357,7 +1357,7 @@ void scr_main_color_update(void)
|
||||||
|
|
||||||
case COLOR_YELLOW:
|
case COLOR_YELLOW:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_1 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_YELLOW_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_1, lv_color_hex(COLOR_YELLOW_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_YELLOW_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_YELLOW_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_YELLOW);
|
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_YELLOW);
|
||||||
}
|
}
|
||||||
|
@ -1365,7 +1365,7 @@ void scr_main_color_update(void)
|
||||||
|
|
||||||
case COLOR_GREEN:
|
case COLOR_GREEN:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_1 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_GREEN_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_1, lv_color_hex(COLOR_GREEN_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_GREEN_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_GREEN_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_GREEN);
|
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_GREEN);
|
||||||
}
|
}
|
||||||
|
@ -1373,7 +1373,7 @@ void scr_main_color_update(void)
|
||||||
|
|
||||||
case COLOR_RED:
|
case COLOR_RED:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_1 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_RED_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_1, lv_color_hex(COLOR_RED_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_RED_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_RED_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_RED);
|
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_RED);
|
||||||
}
|
}
|
||||||
|
@ -1381,7 +1381,7 @@ void scr_main_color_update(void)
|
||||||
|
|
||||||
case COLOR_PURPLE:
|
case COLOR_PURPLE:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_1 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_PURPLE_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_1, lv_color_hex(COLOR_PURPLE_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_PURPLE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_IN, lv_color_hex(COLOR_PURPLE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_PURPLE);
|
set_obj_color(guider_ui.screen_main_label_area_IN, COLOR_PURPLE);
|
||||||
}
|
}
|
||||||
|
@ -1395,7 +1395,7 @@ void scr_main_color_update(void)
|
||||||
{
|
{
|
||||||
case COLOR_BLUE:
|
case COLOR_BLUE:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_0 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_BLUE_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_0, lv_color_hex(COLOR_BLUE_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_BLUE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_BLUE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_BLUE);
|
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_BLUE);
|
||||||
}
|
}
|
||||||
|
@ -1403,7 +1403,7 @@ void scr_main_color_update(void)
|
||||||
|
|
||||||
case COLOR_DARK_BLUE:
|
case COLOR_DARK_BLUE:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_0 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_DARK_BLUE_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_0, lv_color_hex(COLOR_DARK_BLUE_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_DARK_BLUE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_DARK_BLUE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_DARK_BLUE);
|
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_DARK_BLUE);
|
||||||
}
|
}
|
||||||
|
@ -1411,7 +1411,7 @@ void scr_main_color_update(void)
|
||||||
|
|
||||||
case COLOR_YELLOW:
|
case COLOR_YELLOW:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_0 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_YELLOW_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_0, lv_color_hex(COLOR_YELLOW_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_YELLOW_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_YELLOW_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_YELLOW);
|
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_YELLOW);
|
||||||
}
|
}
|
||||||
|
@ -1419,7 +1419,7 @@ void scr_main_color_update(void)
|
||||||
|
|
||||||
case COLOR_GREEN:
|
case COLOR_GREEN:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_0 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_GREEN_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_0, lv_color_hex(COLOR_GREEN_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_GREEN_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_GREEN_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_GREEN);
|
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_GREEN);
|
||||||
}
|
}
|
||||||
|
@ -1427,7 +1427,7 @@ void scr_main_color_update(void)
|
||||||
|
|
||||||
case COLOR_RED:
|
case COLOR_RED:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_0 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_RED_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_0, lv_color_hex(COLOR_RED_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_RED_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_RED_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_RED);
|
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_RED);
|
||||||
}
|
}
|
||||||
|
@ -1435,7 +1435,7 @@ void scr_main_color_update(void)
|
||||||
|
|
||||||
case COLOR_PURPLE:
|
case COLOR_PURPLE:
|
||||||
{
|
{
|
||||||
guider_ui.screen_main_chart_1_0 = lv_chart_add_series(guider_ui.screen_main_chart_1, lv_color_hex(COLOR_PURPLE_VALUE), LV_CHART_AXIS_PRIMARY_Y);
|
lv_chart_set_series_color(guider_ui.screen_main_chart_1, guider_ui.screen_main_chart_1_0, lv_color_hex(COLOR_PURPLE_VALUE));
|
||||||
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_PURPLE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_line_color(guider_ui.screen_main_line_legend_OUT, lv_color_hex(COLOR_PURPLE_VALUE), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_PURPLE);
|
set_obj_color(guider_ui.screen_main_label_area_OUT, COLOR_PURPLE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,10 @@ void key_functions_setting(void)
|
||||||
//加载主界面
|
//加载主界面
|
||||||
setup_scr_screen_main(&guider_ui);
|
setup_scr_screen_main(&guider_ui);
|
||||||
delay_cnt(500);
|
delay_cnt(500);
|
||||||
|
|
||||||
|
//恢复之前显示的数据
|
||||||
|
scr_main_recover();
|
||||||
|
|
||||||
lv_scr_load(guider_ui.screen_main);
|
lv_scr_load(guider_ui.screen_main);
|
||||||
|
|
||||||
//切换至菜单后,清除主界面对象,释放内存
|
//切换至菜单后,清除主界面对象,释放内存
|
||||||
|
@ -133,8 +137,7 @@ void key_functions_setting(void)
|
||||||
//当前界面为主界面
|
//当前界面为主界面
|
||||||
m5data.scr_now = SCREEN_MAIN;
|
m5data.scr_now = SCREEN_MAIN;
|
||||||
|
|
||||||
//恢复之前显示的数据
|
|
||||||
scr_main_recover();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue