First integration of the motion sensor (bma 421) : step counting + wake on wrist rotation + app to see the value of the 3 axis in "real time".
This commit is contained in:
@@ -53,6 +53,7 @@ static lv_style_t style_table_cell;
|
||||
static lv_style_t style_pad_small;
|
||||
static lv_style_t style_bg_grad;
|
||||
static lv_style_t style_lmeter;
|
||||
static lv_style_t style_chart_serie;
|
||||
|
||||
static bool inited;
|
||||
|
||||
@@ -260,6 +261,11 @@ static void basic_init(void)
|
||||
lv_style_set_line_width(&style_lmeter, LV_STATE_DEFAULT, LV_DPX(10));
|
||||
lv_style_set_scale_end_line_width(&style_lmeter, LV_STATE_DEFAULT, LV_DPX(7));
|
||||
|
||||
style_init_reset(&style_chart_serie);
|
||||
lv_style_set_line_color(&style_chart_serie, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
|
||||
lv_style_set_line_width(&style_chart_serie, LV_STATE_DEFAULT, 4);
|
||||
lv_style_set_size(&style_chart_serie, LV_STATE_DEFAULT, 4);
|
||||
lv_style_set_bg_opa(&style_chart_serie, LV_STATE_DEFAULT, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +471,12 @@ static void theme_apply(lv_obj_t * obj, lv_theme_style_t name)
|
||||
_lv_style_list_add_style(list, &style_bg);
|
||||
_lv_style_list_add_style(list, &style_lmeter);
|
||||
break;
|
||||
|
||||
|
||||
case LV_THEME_CHART:
|
||||
lv_obj_clean_style_list(obj, LV_CHART_PART_SERIES);
|
||||
list = lv_obj_get_style_list(obj, LV_CHART_PART_SERIES);
|
||||
_lv_style_list_add_style(list, &style_btn);
|
||||
_lv_style_list_add_style(list, &style_chart_serie);
|
||||
|
||||
default:
|
||||
break;
|
||||
|
Reference in New Issue
Block a user