What MCU/Processor/Board and compiler i am using?
Using the ESP32-S3 Tdisplay-S3 , xtensa-esp32s3-elf-g++.
What LVGL version i am using?
V8.3
What do i want to achieve?
Im trying to invert the meter obj, the goal is to set 2 meters, 1 in each side of the display to show the Voltage and Amperage, the part that gather the data about voltage and amperage is working fine (tested), the problem is when i try to invert the meter obj.
What have i tried so far?
- Tried add the feature locally in the lvgl files.
- In LV_METER_SET_SCALE_RANGE, i partially achieved the goal, the visual part of the meter is flipped, but the indicator inst showing in the visible part of the meter.
Code to reproduce
this is the meter that works normally.
lv_obj_t *meter = lv_meter_create(s_screen.screen_obj);
lv_obj_align(meter, LV_ALIGN_RIGHT_MID, 80, 0);
lv_obj_set_size(meter, 165, 165);
lv_obj_set_style_bg_opa(meter, LV_OPA_0, 0);
lv_obj_set_style_pad_all(meter, 2, 0);
lv_obj_remove_style(meter, nullptr, LV_PART_INDICATOR);
lv_obj_set_style_text_color(meter, lv_palette_main(LV_PALETTE_GREY), 0);
lv_meter_scale_t *scale = lv_meter_add_scale(meter);
lv_meter_set_scale_range(meter, scale, 0, 100, 180, 90);
lv_meter_set_scale_ticks(
meter, scale, 3, 2, 5, lv_palette_main(LV_PALETTE_GREY));
lv_meter_set_scale_major_ticks(
meter, scale, 1, 2, 10, lv_color_hex3(0xeee), 10);
lv_meter_indicator_t *indic2 = lv_meter_add_arc(
meter, scale, 10, lv_palette_main(LV_PALETTE_RED), 0);
lv_meter_set_indicator_end_value(meter, indic2, 50);
the meter that doesnt work is this.
lv_obj_t *meter1 = lv_meter_create(s_screen.screen_obj);
lv_obj_align(meter1, LV_ALIGN_LEFT_MID, -80, 0);
lv_obj_set_size(meter1, 165, 165);
lv_obj_set_style_bg_opa(meter1, LV_OPA_0, 0);
lv_obj_set_style_pad_all(meter1, 2, 0);
lv_obj_remove_style(meter1, nullptr, LV_PART_INDICATOR);
lv_obj_set_style_text_color(
meter1, lv_palette_main(LV_PALETTE_GREY), 0);
lv_meter_scale_t *scale1 = lv_meter_add_scale(meter1);
lv_meter_set_scale_range(meter1, scale1, 0, 360, -180, -270);
lv_meter_set_scale_ticks(
meter1, scale1, 3, 2, 5, lv_palette_main(LV_PALETTE_GREY));
lv_meter_set_scale_major_ticks(
meter1, scale1, 1, 2, 10, lv_color_hex3(0xeee), 10);
lv_meter_indicator_t *indic1 = lv_meter_add_arc(
meter1, scale1, 10, lv_palette_main(LV_PALETTE_BLUE), 0);
lv_meter_set_indicator_end_value(meter1, indic1, 100);