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:
Fabian Blatz 2024-04-04 08:24:26 +02:00 committed by Benjamin Cabé
parent 1279374e91
commit 693bc51f44

View file

@ -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);
/* 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)
@ -81,15 +81,15 @@ int main(void)
return -ENODEV;
}
create_accelerometer_chart(lv_scr_act());
create_accelerometer_chart(lv_screen_active());
sensor_timer = lv_timer_create(sensor_timer_cb,
1000 / CONFIG_SAMPLE_ACCEL_SAMPLING_RATE,
NULL);
lv_task_handler();
lv_timer_handler();
display_blanking_off(display_dev);
while (1) {
uint32_t sleep_ms = lv_task_handler();
uint32_t sleep_ms = lv_timer_handler();
k_msleep(MIN(sleep_ms, INT32_MAX));
}