Skip to content

Commit 0e8cf40

Browse files
authored
Dev (#49)
* 去除重复的代码 * 修复windows下脚本权限问题 * 更新第三方库,添加国内镜像 * 更新工作流 * 允许多次初始化submodule * 清理镜像文件 * 更新错误的链接
1 parent 1d9ec0b commit 0e8cf40

File tree

4 files changed

+24
-20
lines changed

4 files changed

+24
-20
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
name: build_publish_firmware
2+
name: build_test
33

44
on:
55
push:
@@ -17,7 +17,6 @@ on:
1717
- '**.s'
1818
- '**.yml'
1919
pull_request:
20-
branches: [ "master" ]
2120
types: [opened, reopened]
2221

2322

.github/workflows/build_publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
name: build_test
2+
name: build_publish_firmware
33

44
on:
55
workflow_dispatch:

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ XRobot基本部分是一套开发板与功能模块的管理系统,能够让
9090

9191
## 应用案例
9292

93-
>Robomaster
93+
> Robomaster
9494
9595
* 麦轮/舵轮/平衡步兵
9696
* 英雄
@@ -99,34 +99,34 @@ XRobot基本部分是一套开发板与功能模块的管理系统,能够让
9999
* 飞镖架
100100
* 无人机
101101

102-
>成品模块
102+
> 成品模块
103103
104104
* 六轴CAN总线IMU模块
105105
* CAN转UART模块
106106
* BLE配网模块
107107
* CAN总线微动检测模块
108108
* 诸多商业产品案例
109109

110-
| | | |
111-
| ---------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
112-
| <img src="./doc/image/rmuc.jpg" height="210" width="265"> | <img src="./doc/image/rmuc1.jpg" height="210" width="265"> | <img src="./doc/image/rmuc2.jpg" height="210" width="265"> |
110+
| | | |
111+
| -------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
112+
| `<img src="./doc/image/rmuc.jpg" height="210" width="265">` | `<img src="./doc/image/rmuc1.jpg" height="210" width="265">` | `<img src="./doc/image/rmuc2.jpg" height="210" width="265">` |
113113

114114
<img src="./doc/image/rmuc3.jpg" height="600" width="800">
115115

116116
`以上机器人均使用XRobot驱动`
117117

118118
## 硬件支持
119119

120-
| MCU | Board | Image |
121-
| ----------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------ |
122-
| STM32F407IG | [Robomaster C型开发板](https://www.robomaster.com/zh-CN/products/components/general/development-board-type-c/info) | <img src="doc/image/rm-c.png" width="500" height="220"> |
123-
| STM32F302CB | [IMU-DEV-BOARD](https://xrobot-org.github.io/1.hardware/3.IMU-DEV.html) | <img src="doc/image/IMU-DEV-1.jpg" width="350" height="200"> |
124-
| STM32F446RE | [C-Mini](https://xrobot-org.github.io/1.hardware/1.C-MINI.html) | <img src="doc/image/C-MINI-1.jpg" width="350" height="250"> |
125-
| STM32F103 | [F103 CAN](https://xrobot-org.github.io/1.hardware/4.F103_CAN.html) | <img src="doc/image/f103_can.jpeg" width="350" height="250"> |
126-
| ESP32-C3 | [ESP32C3-Core](https://xrobot-org.github.io/1.hardware/2.ESP32C3-Core.html) | <img src="doc/image/esp32c3-core-1.jpeg" width="260" height="200"> |
127-
| Linux x86 | [Intel NUC](https://www.intel.cn/content/www/cn/zh/products/details/nuc.html) | <img src="doc/image/nuc.jpg" width="350" height="200"> |
128-
| Linux arm | [Raspberry pi 4B](https://www.raspberrypi.com/) | <img src="doc/image/raspi.png" width="350" height="200"> |
129-
| Linux arm | [mCore-R818](https://mangopi.org/mcorer818) | <img src="doc/image/mCore-R818.jpg" width="200" height="200"> |
120+
| MCU | Board | Image |
121+
| ----------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
122+
| STM32F407IG | [Robomaster C型开发板](https://www.robomaster.com/zh-CN/products/components/general/development-board-type-c/info) | `<img src="doc/image/rm-c.png" width="500" height="220">` |
123+
| STM32F302CB | [IMU-DEV-BOARD](https://xrobot-org.github.io/1.hardware/3.IMU-DEV.html) | `<img src="doc/image/IMU-DEV-1.jpg" width="350" height="200">` |
124+
| STM32F446RE | [C-Mini](https://xrobot-org.github.io/1.hardware/1.C-MINI.html) | `<img src="doc/image/C-MINI-1.jpg" width="350" height="250">` |
125+
| STM32F103 | [F103 CAN](https://xrobot-org.github.io/1.hardware/4.F103_CAN.html) | `<img src="doc/image/f103_can.jpeg" width="350" height="250">` |
126+
| ESP32-C3 | [ESP32C3-Core](https://xrobot-org.github.io/1.hardware/2.ESP32C3-Core.html) | `<img src="doc/image/esp32c3-core-1.jpeg" width="260" height="200">` |
127+
| Linux x86 | [Intel NUC](https://www.intel.cn/content/www/cn/zh/products/details/nuc.html) | `<img src="doc/image/nuc.jpg" width="350" height="200">` |
128+
| Linux arm | [Raspberry pi 4B](https://www.raspberrypi.com/) | `<img src="doc/image/raspi.png" width="350" height="200">` |
129+
| Linux arm | [mCore-R818](https://mangopi.org/mcorer818) | `<img src="doc/image/mCore-R818.jpg" width="200" height="200">` |
130130

131131
## 图片展示
132132

project.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,8 @@ def new_robot(name: str):
499499
print("clean - 清除编译产物")
500500
print("build [BOARD] [ROBOT] - 构建目标")
501501
print("list - 列出可构建目标")
502-
print("init - 安装必备软件包")
502+
print("init - 初始化submodule")
503+
print("init-cn - 使用gitee镜像初始化submodule")
503504
print("select [BOARD] [ROBOT] - 选择构建目标")
504505
print("new [TYPE] [NAME] - 新建模块")
505506

@@ -547,7 +548,11 @@ def new_robot(name: str):
547548
elif cmd[1] == "init":
548549
os.system("git submodule init && git submodule update")
549550
elif cmd[1] == "init-cn":
550-
os.system("mv .gitmodules .gitmodules_en && mv .gitmodules_cn .gitmodules && git submodule init && git submodule update")
551+
if os.path.exists(".gitmodules_cn"):
552+
os.system("mv .gitmodules .gitmodules_en && mv .gitmodules_cn .gitmodules && git submodule init && git submodule update")
553+
else:
554+
os.system("git submodule init && git submodule update")
555+
os.system("mv .gitmodules .gitmodules_cn && mv .gitmodules_en .gitmodules")
551556
elif cmd[1] == "select":
552557
if cmd_len < 4:
553558
print("参数错误")

0 commit comments

Comments
 (0)