Fix dependencies for each component.

Add ability to clear LCD screen, and write at a label position.
This commit is contained in:
2025-11-02 16:43:35 -05:00
parent adf081cf1a
commit 164af20d56
9 changed files with 267 additions and 176 deletions

View File

@@ -1,8 +1,6 @@
## IDF Component Manager Manifest File
dependencies:
idf: '>=5.3.0'
i2c:
path: ../../components/i2c
lcd:
path: ../../components/lcd
ssd1306:

View File

@@ -18,20 +18,18 @@ extern "C" void app_main(void)
IPanelDevice lcd = SSD1306_new();
LCD d = LCD_init(&lcd);
LCD_set_text_with_mode(&d, "Test test 12345678910", "test-text1",
LV_LABEL_LONG_SCROLL, LV_ALIGN_CENTER);
LCD_set_text_with_mode(&d, "Test test 12345678910", LV_LABEL_LONG_SCROLL,
LV_ALIGN_CENTER);
// TODO: Uncomment and test once LCD::lv_obj_t is a dynamic array.
// LCD_set_text_with_mode(&d, "Test test changing text",
// "test-text1",
// LV_LABEL_LONG_SCROLL,
// LV_ALIGN_CENTER);
//
// LCD_set_text(&d, "Hello hello hello hello hello hello hello hello!",
// "test-text2");
//
// LCD_set_text_with_mode(&d, "A random sentence with no meaning at all.",
// "test-text3",
// LV_LABEL_LONG_CLIP,
// LV_ALIGN_BOTTOM_MID);
LCD_set_text(&d, "Hello hello hello hello hello hello hello hello!");
LCD_set_text_with_mode(&d, "A random sentence with no meaning at all.",
LV_LABEL_LONG_CLIP, LV_ALIGN_BOTTOM_MID);
sleep(1);
LCD_clear(&d);
LCD_set_text(&d, "Test clearing the screen");
LCD_set_text_with_mode(&d, "Test writing something and overwriting it",
LV_LABEL_LONG_SCROLL, LV_ALIGN_CENTER);
LCD_set_text_at(&d, "Overwrite.", 1);
}