What MCU/Processor/Board and compiler are you using?
esp32, esp-wrover-kit
What LVGL version are you using?
8.2
What have you tried so far?
In aTask “Serial.printf(" %d", (int)lv_slider_get_value(ui_SlideValue));” When I run this code, the following error message is displayed and the esp32 reboots. What did I do wrong?
I created a slide in guiTask and displayed it on the screen. In aTask, I tried to get the slide value and display it.
static void aTask(void *pvParameters)
{
...
while (1)
{
Serial.printf(" %d", (int)lv_slider_get_value(ui_SlideValue));
vTaskDelay(pdMS_TO_TICKS(500));
}
}
static void guiTask(void *pvParameter)
{
...
ui_SlideValue= lv_slider_create(ui_Screen1);
lv_slider_set_range(ui_SlideValue, 0, 255);
lv_slider_set_value(ui_SlideValue, 128, LV_ANIM_OFF);
if (lv_slider_get_mode(ui_SlideValue) == LV_SLIDER_MODE_RANGE)
lv_slider_set_left_value(ui_SlideValue, 0,
LV_ANIM_OFF);
lv_obj_set_width(ui_SlideValue, 150);
lv_obj_set_height(ui_SlideValue, 10);
lv_obj_set_x(ui_SlideValue, -3);
lv_obj_set_y(ui_SlideValue, -33);
lv_obj_set_align(ui_SlideValue, LV_ALIGN_CENTER);
...
while (1)
{
vTaskDelay(pdMS_TO_TICKS(10));
if (pdTRUE == xSemaphoreTake(xGuiSemaphore, portMAX_DELAY))
{
lv_timer_handler();
// Serial.print("+");
xSemaphoreGive(xGuiSemaphore);
}
}
}
error
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4018a3c7 PS : 0x00060c30 A0 : 0x800d1496 A1 : 0x3ffbcb20
A2 : 0x00000000 A3 : 0x3ffb99d4 A4 : 0x3ffb9988 A5 : 0x00000000
A6 : 0x00000001 A7 : 0x80000001 A8 : 0x8008da2b A9 : 0x3ffbcae0
A10 : 0x3ffd0598 A11 : 0x3ffbf198 A12 : 0x3ffd059c A13 : 0x00060c23
A14 : 0x00060c20 A15 : 0x00000001 SAR : 0x00000013 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000048 LBEG : 0x4008ab49 LEND : 0x4008ab59 LCOUNT : 0xffffffff