lvgl / lv_binding_micropython

LVGL binding for MicroPython
MIT License
237 stars 157 forks source link

tpcal #112

Closed uraich closed 3 years ago

uraich commented 3 years ago

The tpcal.py script, calibrating the xpt2046 touch panel, still uses lvgl v6. I ported it to v7. I created 2 versions: one for portrait and one for landscape more.

amirgon commented 3 years ago

Hi @uraich, Thank you for your contribution!

  1. Please rebase your changes. lv_colors.py is already in the repo and your commit tries to re-add it.
  2. Why did you choose to split it to two scripts? Is it possible to change the existing script to support both modes, instead?
    Code duplication makes it difficult to maintain the code in the future, and makes it harder to identify your changes by diff.
uraich commented 3 years ago

I combined the two scripts into one as requested. Changing the orientation variable allows to select portrait or landscape mode. What do I have to do to get rid of the lv_colors? My master branch does have it included now. Sorry, I am still not too confident with git.

amirgon commented 3 years ago

What do I have to do to get rid of the lv_colors? My master branch does have it included now.

I believe that what you need to do is to git pull --rebase from lv_binding_micropython. Rebase means that your changes are "removed" and "re-applied" after pulling recent commits from the server. After that you would need to do a git push --force to your fork because your existing commits should be replaced by the "re-applied" commits. Have a look at some git rebase tutorial, they probably explain this much better than I do.

amirgon commented 3 years ago

@uraich Did you have a chance to try my suggestion above to rebase this change in order to remove the redundant commit of lv_colors.h?

uraich commented 3 years ago

Well, I tried to re-base as you described but the stupid thing tells me: "repository up to date".

amirgon commented 3 years ago

@uraich I've merged your changes. Thanks!