Fix github workflows and build issues

This commit is contained in:
Gabor Peresztegi 2025-03-04 20:24:35 +01:00
parent 323e0b2e76
commit 649b30cef2
8 changed files with 20 additions and 22 deletions

View File

@ -55,7 +55,7 @@ jobs:
working-directory: ports/javascript
- name: Retrieve version
run: |
echo "::set-output name=VERSION_NAME::$(lib/lv_bindings/lvgl/scripts/find_version.sh)"
echo "::set-output name=VERSION_NAME::$(user_modules/lv_binding_micropython/lvgl/scripts/find_version.sh)"
id: version
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.3

View File

@ -17,13 +17,13 @@ jobs:
with:
release: '9-2019-q4' # The arm-none-eabi-gcc release to use.
- name: Initialize lv_bindings submodule
run: git submodule update --init --recursive lib/lv_bindings
run: git submodule update --init --recursive user_modules/lv_binding_micropython
- name: Initialize Micropython submodules
run: make -C ports/rp2 BOARD=${{ matrix.board }} USER_C_MODULES=../../lib/lv_bindings/bindings.cmake submodules
run: make -C ports/rp2 BOARD=${{ matrix.board }} USER_C_MODULES=../../user_modules/lv_binding_micropython/bindings.cmake submodules
- name: Build mpy-cross
run: make -j $(nproc) -C mpy-cross
- name: Build ${{ matrix.board }}
run: make -j $(nproc) -C ports/rp2 BOARD=${{ matrix.board }} USER_C_MODULES=../../lib/lv_bindings/bindings.cmake
run: make -j $(nproc) -C ports/rp2 BOARD=${{ matrix.board }} USER_C_MODULES=../../user_modules/lv_binding_micropython/bindings.cmake
- uses: actions/upload-artifact@v2
if: ${{ env.GITHUB_EVENT_NAME }} == 'push'
with:

View File

@ -7,6 +7,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Initialize lv_bindings submodule
run: git submodule update --init --recursive user_modules/lv_binding_micropython
# ruff version should be kept in sync with .pre-commit-config.yaml
- run: pip install --user ruff==0.1.3
- run: ruff check --output-format=github .

View File

@ -17,7 +17,7 @@ jobs:
sudo apt-get update -y -qq
sudo apt-get install libsdl2-dev parallel libfreetype-dev librlottie-dev libavformat-dev libavcodec-dev libswscale-dev libavutil-dev
- name: Initialize lv_bindings submodule
run: git submodule update --init --recursive lib/lv_bindings
run: git submodule update --init --recursive user_modules/lv_binding_micropython
- name: Update submodules
run: make -C ports/unix DEBUG=1 submodules
- name: Build mpy-cross
@ -27,5 +27,5 @@ jobs:
- name: Run tests
run: |
export XDG_RUNTIME_DIR=/tmp
lib/lv_bindings/tests/run.sh
user_modules/lv_binding_micropython/tests/run.sh

View File

@ -83,7 +83,7 @@ make -C mpy-cross
make -C ports/esp32 LV_CFLAGS="-DLV_COLOR_DEPTH=16" BOARD=GENERIC_SPIRAM deploy
```
Explanation about the paramters:
Explanation about the parameters:
- `LV_CFLAGS` are used to override color depth, for ILI9341 compatibility.
- `LV_COLOR_DEPTH=16` is needed if you plan to use the ILI9341 driver.
- `BOARD` - I use WROVER board with SPIRAM. You can choose other boards from `ports/esp32/boards/` directory.
@ -148,7 +148,7 @@ import lvgl as lv
from ili9341 import ili9341
disp = ili9341()
# Import XPT2046 driver and initalize it
# Import XPT2046 driver and initialize it
from xpt2046 import xpt2046
touch = xpt2046()
@ -160,7 +160,7 @@ By default, both ILI9341 and XPT2046 are initialized on the same SPI bus with th
- XPT2046: `cs=25, spihost=esp.HSPI_HOST, mhz=5, max_cmds=16, cal_x0 = 3783, cal_y0 = 3948, cal_x1 = 242, cal_y1 = 423, transpose = True, samples = 3`
You can change any of these parameters on ili9341/xpt2046 constructor.
You can also initalize them on different SPI buses if you want, by providing miso/mosi/clk parameters. Set them to -1 to use existing (initialized) spihost bus.
You can also initialize them on different SPI buses if you want, by providing miso/mosi/clk parameters. Set them to -1 to use existing (initialized) spihost bus.
Now you can create the GUI itself:

View File

@ -6,18 +6,14 @@
"features": [
"BLE",
"WiFi",
"SPIRAM",
"LCD",
"LED",
"IMU",
"RTC",
"PMU",
"External Flash",
"External RAM",
"SDCard",
"Button",
"Speaker",
"Microphone",
"Vibration Motor",
"USB-C"
"IMU",
"USB-C",
"Battery Charging",
"Display",
"Microphone"
],
"images": [
"m5core2.jpg"

View File

@ -74,7 +74,7 @@ class Power():
# True turns on at 2V, False or 0 turns off. Alternatively, specify a voltage in range 1.8 - 3.3 volts.
def vibrator(self, state):
if type(state) == bool and state:
if isinstance(state, bool) and state:
self.axp.write(VIBRATOR, 2.0)
else:
self.axp.write(VIBRATOR, state)

@ -1 +1 @@
Subproject commit b9c5cb84221d52e07a51100987d68f47c34acd0b
Subproject commit 1c7258270d9b2fef5839c1327d762ec71c212b98