samples: modules: lvgl: accelerometer_chart: Migrate to v9.2
This patch fixes the style size setter usage in the accelerometer_chart demo since it now expects two dimensions. Also the newly named functions which are typedefed by the api_map in LVGL are updated to anticipate their deprecation. Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
This commit is contained in:
parent
1279374e91
commit
693bc51f44
1 changed files with 4 additions and 4 deletions
|
|
@ -62,7 +62,7 @@ static void create_accelerometer_chart(lv_obj_t *parent)
|
||||||
lv_chart_set_point_count(chart1, CONFIG_SAMPLE_CHART_POINTS_PER_SERIES);
|
lv_chart_set_point_count(chart1, CONFIG_SAMPLE_CHART_POINTS_PER_SERIES);
|
||||||
|
|
||||||
/* Do not display point markers on the data */
|
/* Do not display point markers on the data */
|
||||||
lv_obj_set_style_size(chart1, 0, LV_PART_INDICATOR);
|
lv_obj_set_style_size(chart1, 0, 0, LV_PART_INDICATOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
|
|
@ -81,15 +81,15 @@ int main(void)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
create_accelerometer_chart(lv_scr_act());
|
create_accelerometer_chart(lv_screen_active());
|
||||||
sensor_timer = lv_timer_create(sensor_timer_cb,
|
sensor_timer = lv_timer_create(sensor_timer_cb,
|
||||||
1000 / CONFIG_SAMPLE_ACCEL_SAMPLING_RATE,
|
1000 / CONFIG_SAMPLE_ACCEL_SAMPLING_RATE,
|
||||||
NULL);
|
NULL);
|
||||||
lv_task_handler();
|
lv_timer_handler();
|
||||||
display_blanking_off(display_dev);
|
display_blanking_off(display_dev);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
uint32_t sleep_ms = lv_task_handler();
|
uint32_t sleep_ms = lv_timer_handler();
|
||||||
|
|
||||||
k_msleep(MIN(sleep_ms, INT32_MAX));
|
k_msleep(MIN(sleep_ms, INT32_MAX));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue