Skip to content

Commit b0b9910

Browse files
flyingcyshuatuo-drHonestQiaomaidang-xingyingtao450
authored
merge dev (#287)
* prompt when platform commit change (#226) * fix: move volume_str inside display feature guard #225 * ubuntu support cross compile (#230) * support cross compile * platform support cross compile * add docs * rename config && boards (#232) * Feat cmd new (#233) * init cmd-new * new platform finish * support new project * new platform build * del new board * Add joystick peripheral (#237) * rename otto PID (#236) * format code (#240) * yt/feat-support oled drivers (#243) * yt/refatctor-add oled drivers and organize display files formats * yt/feat-lvgl suport pixels_format_i2 * yt/feat-lvgl tuya_t5ai_board support oled register * yt/feat-add tal uart example * yt/feat-update t5 and t3 platform * yt/feat-add lvgl_label example * yt/refactor-update porting tuya_cloud_types.h * yt/fix complie error * add check_format.py (#234) * add check_format.py * update check_format.py * update check_format.py * Feature/your otto robot (#238) * feat: support hand control for your_otto_robot * Update your_otto_robot Readme --------- Co-authored-by: Kyson <luowl@tuya.com> * Yj/feat support 4G (#246) * feat: support multiple network interfaces, update network management and TCP transmission logic * feat: add cellular network support * fix: update platform/T5AI commit * feat: update Ubuntu platform commit hash * feat: update documentation and copyright years * change PULL_REQUEST_TEMPLATE.md path (#249) * rename pull_request_template.md * Feat use tyutool source (#253) * tyutool source use * fix: rm_rf * Update tuya_config.h * fix: monitor python (#264) * feature: new board (#265) Co-authored-by: denglk <denglk@tuya.com> * change to QR-Code-generator (#266) * change to QR-Code-generator * merge dev * merge dev * fix warning * fix: examples/i2c build fail (#270) * fix build error (#271) * fix: build prepare.sh not use (#273) Co-authored-by: denglk <denglk@tuya.com> * change t5 commit: pwm (#282) * Feat release publish (#283) * support: auto release publish * del debug * change command help * Surport board DNESP32S3_BOX2_WIFI (#281) * add monitor save log (#284) * update CMake build script (#285) * Add joystick example (#248) * Add joystick peripheral * Add joystick example * support esp32 usb jtag (#278) * add esp32s3 usb_jtag uart * support authorization write success auto reset * update esp32 platform: support usb-jtag * update platform commit-id * Update platform_config.yaml --------- Co-authored-by: KyleDeng <55138677+KyleDeng@users.noreply.github.com> Co-authored-by: HonestQiao <honestqiao@gmail.com> Co-authored-by: maidang-xing <maidang.xing@tuya.com> Co-authored-by: yingtao450 <144092910+yingtao450@users.noreply.github.com> Co-authored-by: TuyaOS_otto_robot <92915925+luobenwang@users.noreply.github.com> Co-authored-by: Kyson <luowl@tuya.com> Co-authored-by: YangJie <yangjie6759@163.com> Co-authored-by: denglk <denglk@tuya.com>
1 parent 15c2ceb commit b0b9910

File tree

379 files changed

+15136
-5062
lines changed

Some content is hidden

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

379 files changed

+15136
-5062
lines changed

.clang-format-ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ src/libhttp/coreHTTP
77
src/libmqtt/coreMQTT
88
examples/switch_demo/libqrencode
99
apps/tuya.ai/your_chat_bot/src/display/material
10+
src/common/qrcode

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
### PR description
2+
[Describe the PR content in detail here]
3+
4+
5+
### Code Quality:
6+
As part of this pull request, I've considered the following:
7+
- [ ] Ensure that the code comments and documentation are clear, and use English for comments to ensure code readability.
8+
9+
- [ ] Ensure that the file header follows the [File Header Format](https://www.tuyaopen.ai/docs/contribute/coding-style-guide#file-header-format).
10+
11+
- [ ] Ensure that function headers follow the Doxygen format as specified in [Comments](https://www.tuyaopen.ai/docs/contribute/coding-style-guide#comments).
12+
13+
- [ ] Reviewed the [Coding Style Guide](https://www.tuyaopen.ai/docs/contribute/coding-style-guide) and verified code style compliance, including indentation, spacing, naming conventions, and other style guidelines.
14+
15+
- [ ] Have used the [code-formatting](https://www.tuyaopen.ai/docs/contribute/coding-style-guide#code-formatting) source code formatting tool to ensure compliance with TuyaOpen coding standards.
16+

.github/workflows/format-check.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Code Format, Chinese Character and Header Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- dev
8+
9+
paths:
10+
- '**/*.c'
11+
- '**/*.cpp'
12+
- '**/*.h'
13+
- '**/*.hpp'
14+
- '**/*.cc'
15+
- '**/*.cxx'
16+
17+
jobs:
18+
format-check:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
# Fetch full git history for diff comparison
26+
fetch-depth: 0
27+
28+
- name: Setup Python environment
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: '3.x'
32+
33+
- name: Install clang-format
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y clang-format-14
37+
sudo ln -sf /usr/bin/clang-format-14 /usr/bin/clang-format
38+
39+
- name: Verify clang-format installation
40+
run: clang-format --version
41+
42+
- name: Run code format, Chinese character and header check
43+
run: |
44+
python tools/check_format.py --base origin/${{ github.base_ref }} --verbose
45+
46+
- name: Check failure instructions
47+
if: failure()
48+
run: |
49+
echo "❌ Code format, Chinese character or header check failed!"
50+
echo ""
51+
echo "For format issues, run this command locally:"
52+
echo "clang-format -style=file -i [modified files]"
53+
echo ""
54+
echo "For Chinese characters, manually remove all Chinese text/comments."
55+
echo "Chinese characters are not allowed in the codebase."
56+
echo ""
57+
echo "For header issues, ensure each file has:"
58+
echo "- /** comment block with @file, @brief, @copyright tags"
59+
echo "- Copyright year ending with current year"
60+
echo "- Modification history is optional but recommended"
61+
echo ""
62+
echo "Or use the project's pre-commit hook for automatic formatting:"
63+
echo "cp tools/hooks/pre-commit .git/hooks/"
64+
echo "chmod +x .git/hooks/pre-commit"

.github/workflows/release.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
sync:
10+
runs-on: self-hosted
11+
steps:
12+
- name: Checkout GitHub code
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0 # 获取完整历史记录
16+
17+
- name: Configure Git
18+
run: |
19+
git config --global user.name "Github Action" # 保留,不需要修改
20+
git config --global user.email "action@github.com" # 保留,不需要修改
21+
22+
- name: Add Gitee Remote
23+
run: |
24+
git remote add gitee https://flyingcys:${{ secrets.GITEE_TOKEN }}@gitee.com/${{ secrets.GITEE_REPO }}.git # token from flyingcys
25+
26+
- name: Push to Gitee
27+
run: git push gitee --tags --force
28+
29+
gen-artifact:
30+
runs-on: self-hosted
31+
steps:
32+
- name: Check out repository code
33+
uses: actions/checkout@v4
34+
- name: Check Base Tools
35+
run: |
36+
cd ${{ github.workspace }}
37+
. ./export.sh
38+
tos.py version
39+
tos.py check
40+
rm -rf ${{ github.workspace }}/dist
41+
- name: Check [switch_demo] Build
42+
run: |
43+
cd ${{ github.workspace }}
44+
. ./export.sh
45+
cd ${{ github.workspace }}/apps/tuya_cloud/switch_demo
46+
tos.py dev bac -d ${{ github.workspace }}/dist
47+
- name: Check [your_chat_bot] Build
48+
run: |
49+
cd ${{ github.workspace }}
50+
. ./export.sh
51+
cd ${{ github.workspace }}/apps/tuya.ai/your_chat_bot
52+
tos.py dev bac -d ${{ github.workspace }}/dist
53+
- name: Check [your_otto_robot] Build
54+
run: |
55+
cd ${{ github.workspace }}
56+
. ./export.sh
57+
cd ${{ github.workspace }}/apps/tuya.ai/your_otto_robot
58+
tos.py dev bac -d ${{ github.workspace }}/dist
59+
60+
- name: Upload artifact
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: build-artifacts
64+
path: ${{ github.workspace }}/dist/*.zip
65+
66+
release:
67+
runs-on: self-hosted
68+
needs: [sync, gen-artifacts]
69+
steps:
70+
- name: Download all artifacts
71+
uses: actions/download-artifact@v4
72+
with:
73+
path: artifacts
74+
75+
- name: Create Release and Upload Assets
76+
uses: softprops/action-gh-release@v2
77+
with:
78+
files: artifacts/build-artifacts/*
79+
env:
80+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
82+
sync-release-to-gitee:
83+
runs-on: self-hosted
84+
needs: [release]
85+
steps:
86+
- name: Download artifacts
87+
uses: actions/download-artifact@v4
88+
with:
89+
path: artifacts
90+
91+
- name: Create Gitee Release
92+
run: |
93+
TAG_NAME="${{ github.ref_name }}"
94+
95+
RELEASE_INFO=$(curl -X POST 'https://gitee.com/api/v5/repos/${{ secrets.GITEE_REPO }}/releases' \
96+
-H 'Content-Type: application/json' \
97+
-H 'Authorization: token ${{ secrets.GITEE_TOKEN }}' \
98+
-d '{
99+
"tag_name": "${{ github.ref_name }}",
100+
"target_commitish": "master",
101+
"name": "Release ${{ github.ref_name }}",
102+
"body": "${{ github.ref_name }}",
103+
"draft": false,
104+
"prerelease": false
105+
}')
106+
# echo $RELEASE_INFO
107+
108+
RELEASE_ID=$(echo "$RELEASE_INFO" | jq -r '.id')
109+
# echo $RELEASE_ID
110+
111+
find artifacts -type f | while read -r file_path; do
112+
echo "| $file_path"
113+
curl -X POST "https://gitee.com/api/v5/repos/${{ secrets.GITEE_REPO }}/releases/$RELEASE_ID/attach_files" \
114+
-H "Authorization: token ${{ secrets.GITEE_TOKEN }}" \
115+
-F "file=@$file_path"
116+
done

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ __pycache__
2020
.mirror
2121

2222
/arduino-tuyaopen
23-
/tools/tyutool/*tyutool_*
24-
/tools/tyutool/cache/
23+
/tools/tyutool/
2524
/.set_example
2625
/dist
26+
*monitor.log

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@
1010
[submodule "src/common/backoffAlgorithm"]
1111
path = src/common/backoffAlgorithm
1212
url = https://github.com/FreeRTOS/backoffAlgorithm.git
13-
[submodule "apps/tuya_cloud/switch_demo/libqrencode"]
14-
path = apps/tuya_cloud/switch_demo/libqrencode
15-
url = https://github.com/fukuchi/libqrencode.git

apps/tuya.ai/duo_eye_mood/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
menu "configure app (your_chat_bot) "
22

3-
config TUYA_PRODUCT_KEY
4-
string "product key of project"
3+
config TUYA_PRODUCT_ID
4+
string "product ID of project"
55
default "8ixyalzpn0jrun9y"
66

77
choice

apps/tuya.ai/duo_eye_mood/config/TUYA_T5AI_BOARD_EYES.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CONFIG_PROJECT_VERSION="1.0.1"
2-
CONFIG_TUYA_PRODUCT_KEY="8ixyalzpn0jrun9y"
2+
CONFIG_TUYA_PRODUCT_ID="8ixyalzpn0jrun9y"
33
CONFIG_ENABLE_CHAT_DISPLAY=y
44
CONFIG_ENABLE_GUI_EYES=y
55
CONFIG_BOARD_CHOICE_T5AI=y

apps/tuya.ai/your_chat_bot/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
menu "configure app (your_chat_bot) "
22

3-
config TUYA_PRODUCT_KEY
4-
string "product key of project"
3+
config TUYA_PRODUCT_ID
4+
string "product ID of project"
55
default "p320pepzvmm1ghse"
66

77
choice

apps/tuya.ai/your_chat_bot/config/DNESP32S3.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CONFIG_PROJECT_VERSION="1.0.1"
2-
CONFIG_TUYA_PRODUCT_KEY="scig7pauzzid3w4b"
2+
CONFIG_TUYA_PRODUCT_ID="scig7pauzzid3w4b"
33
CONFIG_ENABLE_CHAT_MODE_ASR_WAKEUP_SINGEL=y
44
CONFIG_ENABLE_WAKEUP_KEYWORD_NIHAO_XIAOZHI=y
55
CONFIG_ENABLE_CHAT_DISPLAY=y

0 commit comments

Comments
 (0)