Skip to content

Commit 124f9b0

Browse files
committed
arch(driver): new driver architecture with new color format support
1 parent df789ed commit 124f9b0

File tree

425 files changed

+25185
-24121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

425 files changed

+25185
-24121
lines changed

.github/workflows/build_micropython.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ jobs:
1919
run: |
2020
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
2121
sudo apt-get update -y -qq
22-
sudo apt-get install libsdl2-dev parallel libfreetype-dev librlottie-dev libavformat-dev libavcodec-dev libswscale-dev libavutil-dev
22+
sudo apt-get install libsdl2-dev parallel libfreetype-dev librlottie-dev libavformat-dev libavcodec-dev libswscale-dev libavutil-dev
2323
- name: Clone lv_micropython
2424
run: |
2525
git clone https://github.com/lvgl/lv_micropython.git .
26-
git checkout master
26+
git checkout arch/drivers
2727
- name: Initialize lv_bindings submodule
2828
run: git submodule update --init --recursive lib/lv_bindings
2929
- name: Update ${{ matrix.port }} port submodules
3030
if: matrix.port != 'esp32'
3131
# VARIANT needed for unix
32-
run: make -C ports/${{ matrix.port }} VARIANT=dev DEBUG=1 USER_C_MODULES=../../lib/lv_bindings/bindings.cmake submodules
32+
run: make -C ports/${{ matrix.port }} VARIANT=dev DEBUG=1 USER_C_MODULES=../../lib/lv_bindings/bindings.cmake submodules
3333
- name: Checkout LVGL submodule
3434
working-directory: ./lib/lv_bindings/lvgl
3535
run: |
@@ -71,4 +71,4 @@ jobs:
7171
run: |
7272
export XDG_RUNTIME_DIR=/tmp
7373
lib/lv_bindings/tests/run.sh
74-
74+

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ If LVGL saved you a lot of time and money or you just had fun using it, consider
8989
Our goal is to provide financial compensation for people who do the most for LVGL. It means not only the maintainers but anyone who implements a great feature should get a payment from the accumulated money. We use the donations to cover our operational costs like servers and related services.
9090

9191
**How to donate?**<br>
92-
We use [Open Collective](https://opencollective.com/lvgl) where you can easily send one time or recurring donations. You can also see all of our expenses in a transparent way.
92+
We use [Open Collective](https://opencollective.com/lvgl) where you can easily send one time or recurring donations. You can also see all of our expenses in a transparent way.
9393

9494
**How to get paid for your contribution?**<br>
9595
If someone implements or fixes an issue labeled as [Sponsored](https://github.com/lvgl/lvgl/labels/Sponsored) he or she will get a payment for that work. We estimate the required time, complexity and importance of the issue and set a price accordingly. To jump in just comment on a [Sponsored](https://github.com/lvgl/lvgl/labels/Sponsored) issue saying "Hi, I'd like to deal with it. This is how I'm planning to fix/implement it...". A work is considered ready when it's approved and merged by a maintainer. After that you can submit and expense at [opencollective.com](https://opencollective.com/lvgl) and you will receive teh payment in a few days.
@@ -148,7 +148,7 @@ scr = lv.scr_act()
148148
scr.set_style_bg_color(lv.color_hex(0x003a57), lv.PART.MAIN)
149149
150150
# Create a white label, set its text and align it to the center
151-
label = lv.label(lv.scr_act())
151+
label = lv.label(lv.scr_act())
152152
label.set_text("Hello world")
153153
label.set_style_text_color(lv.color_hex(0xffffff), lv.PART.MAIN)
154154
label.align(lv.ALIGN.CENTER, 0, 0)
@@ -183,7 +183,7 @@ label.align(lv.ALIGN.CENTER, 0, 0)
183183
lv_obj_t * btn = lv_btn_create(lv_scr_act());                   /*Add a button to the current screen*/
184184
lv_obj_center(btn);                                     /*Set its position*/
185185
lv_obj_set_size(btn, 100, 50);                                  /*Set its size*/
186-
lv_obj_add_event_cb(btn, btn_event_cb, LV_EVENT_CLICKED, NULL); /*Assign a callback to the button*/
186+
lv_obj_add_event(btn, btn_event_cb, LV_EVENT_CLICKED, NULL); /*Assign a callback to the button*/
187187

188188
lv_obj_t * label = lv_label_create(btn);                        /*Add a label to the button*/
189189
lv_label_set_text(label, "Button");                             /*Set the labels text*/
@@ -208,7 +208,7 @@ def btn_event_cb(e):
208208
btn = lv.btn(lv.scr_act())
209209
btn.center()
210210
btn.set_size(100, 50)
211-
btn.add_event_cb(btn_event_cb, lv.EVENT.CLICKED, None)
211+
btn.add_event(btn_event_cb, lv.EVENT.CLICKED, None)
212212
213213
label = lv.label(btn)
214214
label.set_text("Button")
@@ -231,22 +231,22 @@ lv_obj_set_flex_align(lv_scr_act(), LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_START, L
231231
lv_obj_t * cb;
232232
cb = lv_checkbox_create(lv_scr_act());
233233
lv_checkbox_set_text(cb, "Apple");
234-
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
234+
lv_obj_add_event(cb, event_handler, LV_EVENT_ALL, NULL);
235235

236236
cb = lv_checkbox_create(lv_scr_act());
237237
lv_checkbox_set_text(cb, "Banana");
238238
lv_obj_add_state(cb, LV_STATE_CHECKED);
239-
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
239+
lv_obj_add_event(cb, event_handler, LV_EVENT_ALL, NULL);
240240

241241
cb = lv_checkbox_create(lv_scr_act());
242242
lv_checkbox_set_text(cb, "Lemon");
243243
lv_obj_add_state(cb, LV_STATE_DISABLED);
244-
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
244+
lv_obj_add_event(cb, event_handler, LV_EVENT_ALL, NULL);
245245

246246
cb = lv_checkbox_create(lv_scr_act());
247247
lv_obj_add_state(cb, LV_STATE_CHECKED | LV_STATE_DISABLED);
248248
lv_checkbox_set_text(cb, "Melon\nand a new line");
249-
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
249+
lv_obj_add_event(cb, event_handler, LV_EVENT_ALL, NULL);
250250
```
251251
252252
</details>
@@ -257,7 +257,7 @@ lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
257257
```python
258258
def event_handler(e):
259259
code = e.get_code()
260-
obj = e.get_target()
260+
obj = e.get_target_obj()
261261
if code == lv.EVENT.VALUE_CHANGED:
262262
txt = obj.get_text()
263263
if obj.get_state() & lv.STATE.CHECKED:
@@ -272,22 +272,22 @@ lv.scr_act().set_flex_align(lv.FLEX_ALIGN.CENTER, lv.FLEX_ALIGN.START, lv.FLEX_A
272272
273273
cb = lv.checkbox(lv.scr_act())
274274
cb.set_text("Apple")
275-
cb.add_event_cb(event_handler, lv.EVENT.ALL, None)
275+
cb.add_event(event_handler, lv.EVENT.ALL, None)
276276
277277
cb = lv.checkbox(lv.scr_act())
278278
cb.set_text("Banana")
279279
cb.add_state(lv.STATE.CHECKED)
280-
cb.add_event_cb(event_handler, lv.EVENT.ALL, None)
280+
cb.add_event(event_handler, lv.EVENT.ALL, None)
281281
282282
cb = lv.checkbox(lv.scr_act())
283283
cb.set_text("Lemon")
284284
cb.add_state(lv.STATE.DISABLED)
285-
cb.add_event_cb(event_handler, lv.EVENT.ALL, None)
285+
cb.add_event(event_handler, lv.EVENT.ALL, None)
286286
287287
cb = lv.checkbox(lv.scr_act())
288288
cb.add_state(lv.STATE.CHECKED | lv.STATE.DISABLED)
289289
cb.set_text("Melon")
290-
cb.add_event_cb(event_handler, lv.EVENT.ALL, None)
290+
cb.add_event(event_handler, lv.EVENT.ALL, None)
291291
```
292292

293293
</details>

0 commit comments

Comments
 (0)