ESP32-S3 PlatformIO
Hello
Why does the code is crashing when I do lv_chart_set_type(_chart, LV_CHART_TYPE_LINE);
48 KB Heap any clue
Code
The code block(s) should be between ```c and ``` tags:
void begin() {
Serial.printf("\n\r[RoomChart] parent ptr = %p\n\r", objects.room_container_1);
if (!objects.room_container_1) {
Serial.println("[RoomChart] parent is NULL – begin() called too early!");
return;
}
lv_obj_t* parent = objects.room_container_1;
// 1. Chart
_chart = lv_chart_create(parent);
Serial.printf("Free heap: %d\n\r\n", ESP.getFreeHeap());
// 2. Größe & Config
lv_obj_set_pos(_chart, 12, 5);
lv_obj_set_size(_chart, 430, 120);
Serial.printf("Free heap: %d\n\r\n", ESP.getFreeHeap());
lv_chart_set_type(_chart, LV_CHART_TYPE_LINE);
/*
//lv_chart_set_point_count(_chart, ROOM_CHART_HOURS);
//lv_chart_set_range(_chart,
LV_CHART_AXIS_PRIMARY_Y,
ROOM_CHART_TEMP_MIN * 10,
ROOM_CHART_TEMP_MAX * 10);
*/
// 3. Series FIRST!
//_serTemp = lv_chart_add_series(_chart, lv_color_hex(0x0C10D7), LV_CHART_AXIS_PRIMARY_Y);
/*
lv_chart_set_all_value(_chart, _serTemp, LV_CHART_POINT_NONE);
// 4. THEN styles
lv_obj_set_style_bg_opa(_chart, LV_OPA_TRANSP, LV_PART_MAIN);
lv_obj_set_style_border_width(_chart, 0, LV_PART_MAIN);
lv_obj_set_style_pad_all(_chart, 0, LV_PART_MAIN);
// Indicators zuletzt
lv_obj_set_style_width(_chart, 0, LV_PART_INDICATOR);
lv_obj_set_style_height(_chart, 0, LV_PART_INDICATOR);
*/
}
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.