mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-05 15:00:42 +08:00

### Maintenance page * Add add tab color for mobile view * Add spellcheck off / autocorect off in input * Add disconnect button when authenticate enabled * Add Invalid user or password message when authentication failed ### Board support * Add ESP32 S2 support * Add ESP32 S3 support * Add ESP32 C3 support ### ESP commands * Add command 701 to control GCODE streaming * Remove command 901 as duplicate * Update command 420 to add more details * Use text as default output * All json on all commands for formated output ### Core * Add benchmak function to check transfer speed (for test only-not production) * Merge code for ESP3DLib support * Add better printer display support (M117 / Serial TFT) * Use ESP32 analogWrite instead of emulated one ### Modules * Display * Refactor code * Remove SPI ILI 9341 / 9488 support as not suitable * Add ST7789 support (135x240 / 240x240) * Filesystem * Bug fixes due to esp core updates * Better SD sharing mecanism * Better global FS management * FTP * Add SD sharing support * Better global FS management * GCODE Host * Add basic support for macro files * Add ESP command support * Use not blocking method to stream commands / handle response * Notifications * Add IFTTT notification service * Add WebUI notification * Add ESP3D display notification * WebDav * Add SD sharing support * Add bug fix from https://github.com/d-a-v/ESPWebDAV * Better global FS management * Websocket * Add function to handle zombies connections * WiFi * Fix connection to AP sometime fail * Fix low signal not diplayed in ESP420 even connected * Add AP Setup mode ### Libraries * Update SDFat-2.0.6 to 2.1.2 * Update ESP32SSDP 1.1.1 to 1.2.0 * Update TFT_eSPI-1.4.11 to 2.4.61 * Update arduinoWebSockets-2.3.5 to 2.3.6 * Update esp8266-oled-ssd1306-4.0.0 to 4.3.0 * Remove lvgl support ### Tools * Add I2C scanner script * Add python script to simulate/stress printer serial communication ### PlatformIO * Use latest 4.4.0 Espressif32 release (ESP32-arduino core 2.0.3) * Add fix for Flash more than 4MB * Add Esp32 S2/S3/C3 env * Add ESP32-ST7789 / esp32-TTGO_T_Display env
8.1 KiB
8.1 KiB
LVGL - Light and Versatile Graphics Library
LVGL - 轻量级通用型图形库
LVGL是一个高度可裁剪、低资源占用、界面美观且易用的嵌入式系统图形库
官网 · 文档 · 论坛 · 服务 · 例程
English | 中文 |
目录
概况与总览
特性
- 丰富且强大的模块化图形组件:按钮 (buttons)、图表 (charts)、列表 (lists)、滑动条 (sliders)、图片 (images) 等
- 高级的图形引擎:动画、抗锯齿、透明度、平滑滚动、图层混合等效果
- 支持多种输入设备:触摸屏、 键盘、编码器、按键等
- 支持多显示设备
- 不依赖特定的硬件平台,可以在任何显示屏上运行
- 配置可裁剪(最低资源占用:64 kB Flash,16 kB RAM)
- 基于UTF-8的多语种支持,例如中文、日文、韩文、阿拉伯文等
- 可以通过类CSS的方式来设计、布局图形界面(例如:Flexbox、Grid)
- 支持操作系统、外置内存、以及硬件加速(LVGL已内建支持STM32 DMA2D、NXP PXP和VGLite)
- 即便仅有单缓冲区(frame buffer)的情况下,也可保证渲染如丝般顺滑
- 全部由C编写完成,并支持C++调用
- 支持Micropython编程,参见:LVGL API in Micropython
- 支持模拟器仿真,可以无硬件依托进行开发
- 丰富详实的例程
- 详尽的文档以及API参考手册,可线上查阅或可下载为PDF格式
硬件要求
要求 | 最低要求 | 建议要求 |
架构 | 16、32、64位微控制器或微处理器 | |
时钟 | > 16 MHz | > 48 MHz |
Flash/ROM | > 64 kB | > 180 kB |
Static RAM | > 16 kB | > 48 kB |
Draw buffer | > 1 × hor. res. pixels | > 1/10屏幕大小 |
编译器 | C99或更新 |
注意:资源占用情况与具体硬件平台、编译器等因素有关,上表中仅给出参考值
已经支持的平台
LVGL本身并不依赖特定的硬件平台,任何满足LVGL硬件配置要求的微控制器均可运行LVGL。 如下仅列举其中一部分:
- NXP: Kinetis, LPC, iMX, iMX RT
- STM32F1, STM32F3, STM32F4, STM32F7, STM32L4, STM32L5, STM32H7
- Microchip dsPIC33, PIC24, PIC32MX, PIC32MZ
- Linux frame buffer (/dev/fb)
- Raspberry Pi
- Espressif ESP32
- Infineon Aurix
- Nordic NRF52 Bluetooth modules
- Quectel modems
LVGL也支持:
- Arduino library
- PlatformIO package
- Zephyr library
- ESP32 component
- NXP MCUXpresso component
- NuttX library
- RT-Thread RTOS
如何入门
请按照如下顺序来学习LVGL:
- 使用网页在线例程来体验LVGL(3分钟)
- 阅读文档简介章节来初步了解LVGL(5分钟)
- 再来阅读一下文档快速快速概览章节来了解LVGL的基本知识(15分钟)
- 学习如何使用模拟器来在电脑上仿真LVGL(10分钟)
- 试着动手实践一些例程
- 参考移植指南尝试将LVGL移植到一块开发板上,LVGL也已经提供了一些移植好的工程
- 仔细阅读文档总览章节来更加深入的了解和熟悉LVGL(2-3小时)
- 浏览文档组件(Widgets)章节来了解如何使用它们
- 如果你有问题可以到LVGL论坛提问
- 阅读文档如何向社区贡献章节来看看你能帮LVGL社区做些什么,以促进LVGL软件质量的不断提高(15分钟)
例程
更多例程请参见 examples 文件夹。
C
lv_obj_t * btn = lv_btn_create(lv_scr_act()); /*Add a button to the current screen*/
lv_obj_set_pos(btn, 10, 10); /*Set its position*/
lv_obj_set_size(btn, 100, 50); /*Set its size*/
lv_obj_add_event_cb(btn, btn_event_cb, LV_EVENT_CLICKED, NULL); /*Assign a callback to the button*/
lv_obj_t * label = lv_label_create(btn); /*Add a label to the button*/
lv_label_set_text(label, "Button"); /*Set the labels text*/
lv_obj_center(label); /*Align the label to the center*/
...
void btn_event_cb(lv_event_t * e)
{
printf("Clicked\n");
}
Micropython
更多信息请到 Micropython官网 查询.
def btn_event_cb(e):
print("Clicked")
# Create a Button and a Label
btn = lv.btn(lv.scr_act())
btn.set_pos(10, 10)
btn.set_size(100, 50)
btn.add_event_cb(btn_event_cb, lv.EVENT.CLICKED, None)
label = lv.label(btn)
label.set_text("Button")
label.center()
服务
LVGL 责任有限公司成立的目的是为了给用户使用LVGL图形库提供额外的技术支持,我们致力于提供以下服务:
- 图形设计
- UI设计
- 技术咨询以及技术支持
更多信息请参见 https://lvgl.io/services ,如果有任何问题请随时联系我们。
如何向社区贡献
LVGL是一个开源项目,非常欢迎您参与到社区贡献当中。您有很多种方式来为提高LVGL贡献您的一份力量,包括但不限于:
- 介绍你基于LVGL设计的作品或项目
- 写一些例程
- 修改以及完善文档
- 修复bug
请参见文档如何向社区贡献章节来获取更多信息。