Skip to content

Commit

Permalink
Merge pull request #10 from m5stack/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
imliubo authored Sep 17, 2023
2 parents 7c509bc + c03f32e commit 22e5773
Show file tree
Hide file tree
Showing 1,070 changed files with 40,309 additions and 1,484,084 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code_formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v3.3.0
- uses: actions/setup-python@v4.5.0
- name: Install packages
run: source tools/ci.sh && ci_code_formatting_setup
- name: Run code formatting
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Nightly Build

on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:

permissions:
contents: read

jobs:
build_atoms3:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- name: Install packages
run: source tools/ci.sh && ci_esp32_idf44_setup
- name: Build
run: source tools/ci.sh && ci_esp32_nightly_build
- name: Deliver AtomS3 firmware
uses: actions/upload-artifact@v3
with:
name: M5STACK_AtomS3_firmware
path: ./m5stack/build-M5STACK_AtomS3/uiflow-*.bin
- name: Deliver AtomS3-Lite firmware
uses: actions/upload-artifact@v3
with:
name: M5STACK_AtomS3-Lite_firmware
path: ./m5stack/build-M5STACK_AtomS3_Lite/uiflow-*.bin
- name: Deliver StampS3 firmware
uses: actions/upload-artifact@v3
with:
name: M5STACK_StampS3_firmware
path: ./m5stack/build-M5STACK_StampS3/uiflow-*.bin
- name: Deliver CoreS3 firmware
uses: actions/upload-artifact@v3
with:
name: M5STACK_CoreS3_firmware
path: ./m5stack/build-M5STACK_CoreS3/uiflow-*.bin
- name: Deliver AtomS3U firmware
uses: actions/upload-artifact@v3
with:
name: M5STACK_AtomS3U_firmware
path: ./m5stack/build-M5STACK_AtomS3U/uiflow-*.bin
- name: Deliver Core2 firmware
uses: actions/upload-artifact@v3
with:
name: M5STACK_Core2_firmware
path: ./m5stack/build-M5STACK_Core2/uiflow-*.bin
- name: Deliver StickC_PLUS2 firmware
uses: actions/upload-artifact@v3
with:
name: M5STACK_StickC_PLUS2_firmware
path: ./m5stack/build-M5STACK_StickC_PLUS2/uiflow-*.bin
- name: Deliver StickC_PLUS firmware
uses: actions/upload-artifact@v3
with:
name: M5STACK_StickC_PLUS_firmware
path: ./m5stack/build-M5STACK_StickC_PLUS/uiflow-*.bin
- name: Deliver Fire firmware
uses: actions/upload-artifact@v3
with:
name: M5STACK_Fire_firmware
path: ./m5stack/build-M5STACK_Fire/uiflow-*.bin
4 changes: 1 addition & 3 deletions .github/workflows/ports_m5stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ jobs:
build_idf44:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/[email protected]
- name: Install packages
run: source tools/ci.sh && ci_esp32_idf44_setup
- name: Build
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ genrst/
.DS_Store

.vscode/
tools/littlefs/prebuilt/

dependencies.lock
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,15 @@
[submodule "tools/littlefs/mbed-littlefs"]
path = tools/littlefs/mbed-littlefs
url = https://github.com/ARMmbed/mbed-littlefs.git
[submodule "m5stack/components/esp32-camera"]
path = m5stack/components/esp32-camera
url = https://github.com/espressif/esp32-camera.git
[submodule "m5stack/components/M5Unified/M5GFX"]
path = m5stack/components/M5Unified/M5GFX
url = https://github.com/m5stack/M5GFX.git
[submodule "m5stack/components/M5Unified/M5Unified"]
path = m5stack/components/M5Unified/M5Unified
url = https://github.com/m5stack/M5Unified.git
[submodule "m5stack/components/lv_bindings"]
path = m5stack/components/lv_bindings
url = https://github.com/lvgl/lv_binding_micropython.git
30 changes: 30 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the "docs/" directory with Sphinx
# sphinx:
# configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 M5Stack

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
57 changes: 54 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# uiflow_micropython

## How to build

### Setting up ESP-IDF and the build environment

```shell
mkdir uiflow_workspace && cd uiflow_workspace
git clone https://github.com/m5stack/esp-idf.git
Expand All @@ -12,12 +14,61 @@ git -C esp-idf submodule update --init --recursive
```

### Building the firmware

```shell
git clone https://github.com/m5stack/uiflow_micropython
cd uiflow_micropython/m5stack
make submodules
make submodules # Only need once
make littlefs
make mpy-cross
make -j
make deploy PORT=/dev/ttyUSBx BAUD=1500000
# atoms3, atoms3-lite
make BOARD=M5STACK_S3_8MB BOARD_TYPE=atoms3 flash # Build and flash to atoms3 baord
# stamps3
make BOARD=M5STACK_S3_8MB BOARD_TYPE=stamps3 flash
# cores3
make BOARD=M5STACK_S3_SPIRAM_16MB BOARD_TYPE=cores3 flash
# atoms3u
make BOARD=M5STACK_S3_8MB BOARD_TYPE=atoms3u flash
# core2,tough
make BOARD=M5STACK_SPIRAM_16MB BOARD_TYPE=core2 flash
# stickcplus2
make BOARD=M5STACK_SPIRAM_8MB BOARD_TYPE=stickcplus2 flash
# stickcplus
make BOARD=M5STACK_4MB BOARD_TYPE=stickcplus flash
```

## License

- [micropython][] Copyright (c) 2013-2023 Damien P. George and licensed under MIT License.
- [umqtt][] Copyright (c) 2013-2014 micropython-lib contributors and licensed under MIT License.
- [urequests][] Copyright (c) 2013-2014 micropython-lib contributors and licensed under MIT License.
- [ir][] Copyright (c) 2020 Peter Hinch and licensed under MIT License.
- [neopixel][] Copyright (c) 2013-2014 micropython-lib contributors and licensed under MIT License.
- [bh1750fvi][] Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
- [bmp280][] Copyright (c) 2020 Sebastian Wicki and licensed under MIT License.
- [checksum][] Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
- [dht12][] Copyright (c) 2020 Sebastian Wicki and licensed under MIT License.
- [pcf8563][] Copyright (c) 2020 Sebastian Wicki and licensed under MIT License.
- [qmp6988][] Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
- [scd40][] Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
- [sgp30][] Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
- [sht4x][] Copyright (c) 2021 ladyada for Adafruit and licensed under MIT License.
- [vl53l0x][] Copyright (c) 2017 Tony DiCola for Adafruit Industries and licensed under MIT License.
- [camera][] Copyright (c) 2021 Mauro Riva and licensed under Apache License Version 2.0.

[micropython]: https://github.com/micropython/micropython
[umqtt]: https://github.com/micropython/micropython-lib
[urequests]: https://github.com/micropython/micropython-lib
[ir]: https://github.com/peterhinch/micropython_ir
[neopixel]: https://github.com/micropython/micropython-lib
[bh1750fvi]: https://github.com/gandro/micropython-m5stamp-c3u
[bmp280]: https://github.com/gandro/micropython-m5stickc-plus
[checksum]: https://github.com/gandro/micropython-m5stamp-c3u
[dht12]: https://github.com/gandro/micropython-m5stickc-plus
[pcf8563]: https://github.com/gandro/micropython-m5stickc-plus
[qmp6988]: https://github.com/gandro/micropython-m5stamp-c3u
[scd40]: https://github.com/gandro/micropython-m5stamp-c3u
[sgp30]: https://github.com/gandro/micropython-m5stamp-c3u
[sht4x]: https://github.com/adafruit/Adafruit_CircuitPython_SHT4x
[vl53l0x]: https://github.com/adafruit/Adafruit_CircuitPython_VL53L0X
[camera]: https://github.com/lemariva/micropython-camera-driver
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
23 changes: 23 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = zh_CN
BUILDDIR = build/$(SOURCEDIR)

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doxygen:
doxygen

.PHONY: help Makefile #doxygen

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile #doxygen
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 changes: 20 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
# uiflow-micropyton api docs
# UIFLOW2 API Documentation

# Building Documentation

## 安装环境

```shell
pip3 install -r requirements.txt
```

## 编译

```shell
make SOURCEDIR=zh_CN html # 简体中文
make SOURCEDIR=en html # English
```

## 预览

打开 build/zh_CN/html/index.html,即可在浏览器上预览。
1 change: 1 addition & 0 deletions docs/_static/hardware/button/example.m5f2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"V2.0","type":"cores3","components":[{"name":"screen","type":"screen","layer":0,"screenId":"builtin","screenName":"","id":"__cores3_screen","createTime":1691735427865,"x":0,"y":0,"width":280,"height":280,"backgroundColor":"#222222","size":0,"isSelected":true},{"name":"label0","type":"label","layer":1,"screenId":"builtin","screenName":"","id":"fz^u0eB%y8-NPojV","createTime":1691735496590,"x":58,"y":43,"color":"#ffffff","backgroundColor":"#222222","text":"Text","engine":"gfx","font":"Widgets.FONTS.DejaVu24","rotation":0,"isSelected":false}],"resources":[{"hardware":["hardware_button"]}],"units":[],"hats":[],"i2cs":[],"blockly":"<block type=\"basic_on_setup\" id=\"setup_block\" deletable=\"false\" x=\"50\" y=\"51\"><mutation isBegin=\"true\"></mutation><field name=\"UPDATEOP\">true</field><statement name=\"FUNC\"><block type=\"system_m5_begin\" id=\"system_m5_begin\"></block></statement></block><block type=\"basic_on_loop\" id=\"loop_block\" deletable=\"false\" x=\"450\" y=\"50\"><mutation isUpdate=\"true\"></mutation><field name=\"UPDATEOP\">true</field><statement name=\"FUNC\"><block type=\"system_m5_update\" id=\"system_m5_update\"></block></statement></block><block type=\"button_callback\" id=\"L4rijE%Hlm.w*sm3pb/q\" x=\"50\" y=\"210\"><field name=\"NAME\">BtnPWR</field><field name=\"TYPE\">WAS_CLICKED</field><statement name=\"FUNC\"><block type=\"label_set_text\" id=\"~`4DOFfo?9qbJZs~^_*k\"><field name=\"NAME\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"2Ai4P/$$0B[})I[^0H*8\"><field name=\"TEXT\">clicked</field></shadow></value></block></statement></block><block type=\"button_callback\" id=\"7*GhO.N9Z21FWfHGi.m;\" x=\"50\" y=\"350\"><field name=\"NAME\">BtnPWR</field><field name=\"TYPE\">WAS_HOLD</field><statement name=\"FUNC\"><block type=\"label_set_text\" id=\"1@1Ul}egWfr@?YJzhXP*\"><field name=\"NAME\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"L(b{uhMt-/P6;_*2q[x+\"><field name=\"TEXT\">hold</field></shadow></value></block></statement></block>","screen":[{"simulationName":"Built-in","type":"builtin","width":320,"height":240,"scale":0.78,"screenName":"","blockId":"","id":"builtin","createTime":1691735427862}]}
Loading

0 comments on commit 22e5773

Please sign in to comment.