Skip to content

Commit 478f7ec

Browse files
committed
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 <[email protected]>
1 parent c1b5ff9 commit 478f7ec

File tree

1 file changed

+4
-4
lines changed
  • samples/modules/lvgl/accelerometer_chart/src

1 file changed

+4
-4
lines changed

samples/modules/lvgl/accelerometer_chart/src/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static void create_accelerometer_chart(lv_obj_t *parent)
6262
lv_chart_set_point_count(chart1, CONFIG_SAMPLE_CHART_POINTS_PER_SERIES);
6363

6464
/* Do not display point markers on the data */
65-
lv_obj_set_style_size(chart1, 0, LV_PART_INDICATOR);
65+
lv_obj_set_style_size(chart1, 0, 0, LV_PART_INDICATOR);
6666
}
6767

6868
int main(void)
@@ -81,15 +81,15 @@ int main(void)
8181
return -ENODEV;
8282
}
8383

84-
create_accelerometer_chart(lv_scr_act());
84+
create_accelerometer_chart(lv_screen_active());
8585
sensor_timer = lv_timer_create(sensor_timer_cb,
8686
1000 / CONFIG_SAMPLE_ACCEL_SAMPLING_RATE,
8787
NULL);
88-
lv_task_handler();
88+
lv_timer_handler();
8989
display_blanking_off(display_dev);
9090

9191
while (1) {
92-
uint32_t sleep_ms = lv_task_handler();
92+
uint32_t sleep_ms = lv_timer_handler();
9393

9494
k_msleep(MIN(sleep_ms, INT32_MAX));
9595
}

0 commit comments

Comments
 (0)