Port display_gif_sd and display_speed_wifi to LVGL 9.6 + shared library
- both use shared/jc3636w518.ini, board library and perf monitor - GIF decoded in the display color format, loop delay 1 ms, per-loop memory prints removed - lv_conf: LVGL drive A: = SD card via LV_USE_FS_STDIO (/sdcard/) - shared/README.md, CLAUDE.md and project README updated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6e7206b821
commit
55e27b6572
15 files changed
+125
-2488
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#include <Arduino.h>
|
||||
#include "scr_st77916.h"
|
||||
#include "jc3636w518.h"
|
||||
#include "perf_monitor.h"
|
||||
#include "SD_MMC.h"
|
||||
|
||||
// https://randomnerdtutorials.com/esp32-client-server-wi-fi/
|
||||
@@ -19,7 +20,10 @@ void my_print(const char* buf) {
|
||||
void display_animation() {
|
||||
lv_obj_t* img;
|
||||
|
||||
img = lv_gif_create(lv_scr_act());
|
||||
img = lv_gif_create(lv_screen_active());
|
||||
// shown on a plain black screen: no transparency needed, so decode straight into the display's
|
||||
// color format (no alpha blending, no conversion) to save CPU
|
||||
lv_gif_set_color_format(img, lv_display_get_color_format(lv_display_get_default()));
|
||||
|
||||
Serial.print("Available Heap before: ");
|
||||
Serial.println(esp_get_free_heap_size());
|
||||
@@ -66,7 +70,7 @@ void display_text() {
|
||||
// lv_style_set_shadow_ofs_x(&style_text, 0);
|
||||
// lv_style_set_shadow_ofs_y(&style_text, 0);
|
||||
|
||||
label1 = lv_label_create(lv_scr_act());
|
||||
label1 = lv_label_create(lv_screen_active());
|
||||
|
||||
// Apply the style to the label
|
||||
lv_obj_add_style(label1, &style_text, LV_PART_MAIN);
|
||||
@@ -95,14 +99,13 @@ void connectToWifi() {
|
||||
void setup() {
|
||||
delay(200);
|
||||
Serial.begin(115200);
|
||||
scr_lvgl_init();
|
||||
|
||||
lv_init();
|
||||
lv_display_t* disp = scr_lvgl_init();
|
||||
perf_monitor_begin(disp);
|
||||
|
||||
//lv_log_register_print_cb(my_print); // Register print function for LVGL logs
|
||||
|
||||
// Get the active screen (root object for the display)
|
||||
lv_obj_t* screen = lv_scr_act();
|
||||
lv_obj_t* screen = lv_screen_active();
|
||||
|
||||
// Set the background color of the entire screen to black
|
||||
lv_obj_set_style_bg_color(screen, lv_color_black(), 0); // 0 is the part ID for the main part
|
||||
@@ -132,16 +135,9 @@ void setup() {
|
||||
}
|
||||
|
||||
void loop() {
|
||||
lv_timer_handler();
|
||||
vTaskDelay(5);
|
||||
|
||||
lv_mem_monitor_t mem_mon;
|
||||
lv_mem_monitor(&mem_mon);
|
||||
printf("Free memory: %d bytes\n", mem_mon.free_size);
|
||||
|
||||
Serial.print("Available Heap: ");
|
||||
Serial.println(esp_get_free_heap_size());
|
||||
|
||||
perf_timer_handler();
|
||||
vTaskDelay(1);
|
||||
perf_monitor_print();
|
||||
|
||||
if (WiFi.status() == WL_CONNECTED) {
|
||||
String speed = httpGETRequest("http://192.168.4.1/speed");
|
||||
|
||||
Reference in new issue
Block a user