What LVGL version are you using?
8.3.x
Description
I want to set the distance between meter scale and the border of the meter.
Some guys said that changing the r_mod
of struct lv_meter_scale_t
could achieve this. Here is the defination:
typedef struct {
lv_color_t tick_color;
uint16_t tick_cnt;
uint16_t tick_length;
uint16_t tick_width;
lv_color_t tick_major_color;
uint16_t tick_major_nth;
uint16_t tick_major_length;
uint16_t tick_major_width;
int16_t label_gap;
int16_t label_color;
int32_t min;
int32_t max;
int16_t r_mod;
uint16_t angle_range;
int16_t rotation;
} lv_meter_scale_t;
I tried set r_mod
different values, but they don’t work as expected.
static lv_obj_t *time_meter = lv_meter_create(parent);
lv_obj_set_size(time_meter, width, height);
lv_obj_center(time_meter);
lv_meter_scale_t *time_scale = lv_meter_add_scale(time_meter);
time_scale->r_mod = 0;
// time_scale->r_mod = -50;
// time_scale->r_mod = 50;
What should I do? Help