Skip to content

Commit

Permalink
支持gitee镜像 (#48)
Browse files Browse the repository at this point in the history
* 去除重复的代码

* 修复windows下脚本权限问题

* 更新第三方库,添加国内镜像
  • Loading branch information
Jiu-xiao authored Jan 24, 2024
1 parent a3dff58 commit 1d9ec0b
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "lib/host-protocol"]
path = lib/host-protocol
url = https://github.com/Jiu-xiao/host-protocol.git
url =https://github.com/xrobot-org/host-protocol.git
[submodule "stm32_cmsis"]
path = hw/mcu/st/cmsis_device_f4
url = https://github.com/STMicroelectronics/cmsis_device_f4.git
Expand Down Expand Up @@ -30,10 +30,10 @@
url = https://github.com/STMicroelectronics/cmsis_device_f1.git
[submodule "lib/Kconfiglib"]
path = lib/Kconfiglib
url = https://github.com/ulfalizer/Kconfiglib
url = https://github.com/ulfalizer/Kconfiglib.git
[submodule "lib/mini_shell"]
path = lib/mini_shell
url = https://gitee.com/jiu-xiao/mini_shell.git
url = https://github.com/Jiu-xiao/mini_shell.git
[submodule "hw/mcu/st/cmsis_device_f3"]
path = hw/mcu/st/cmsis_device_f3
url = https://github.com/STMicroelectronics/cmsis_device_f3.git
Expand Down
63 changes: 63 additions & 0 deletions .gitmodules_cn
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[submodule "lib/host-protocol"]
path = lib/host-protocol
url =https://gitee.com/x-robot/host-protocol.git
[submodule "stm32_cmsis"]
path = hw/mcu/st/cmsis_device_f4
url = https://gitee.com/x-robot/cmsis_device_f4.git
[submodule "stm32_hal"]
path = hw/mcu/st/stm32f4xx_hal_driver
url = https://gitee.com/x-robot/stm32f4xx_hal_driver.git
[submodule "freertos"]
path = lib/freertos
url = https://gitee.com/x-robot/FreeRTOS-Kernel.git
[submodule "arm_cmsis"]
path = lib/cmsis_5
url = https://gitee.com/x-robot/CMSIS_5.git
[submodule "tinyusb"]
path = lib/tinyusb
url = https://gitee.com/x-robot/tinyusb.git
[submodule "lib/one-message"]
path = lib/one-message
url = https://gitee.com/Jiu-xiao/OneMessageCPP.git
[submodule "lib/cmsis_svd"]
path = lib/cmsis_svd
url = https://gitee.com/x-robot/cmsis-svd.git
[submodule "hw/mcu/st/stm32f1xx_hal_driver"]
path = hw/mcu/st/stm32f1xx_hal_driver
url = https://gitee.com/x-robot/stm32f1xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_f1"]
path = hw/mcu/st/cmsis_device_f1
url = https://gitee.com/x-robot/cmsis_device_f1.git
[submodule "lib/Kconfiglib"]
path = lib/Kconfiglib
url = https://gitee.com/x-robot/Kconfiglib.git
[submodule "lib/mini_shell"]
path = lib/mini_shell
url = https://gitee.com/jiu-xiao/mini_shell.git
[submodule "hw/mcu/st/cmsis_device_f3"]
path = hw/mcu/st/cmsis_device_f3
url = https://gitee.com/x-robot/cmsis_device_f3.git
[submodule "hw/mcu/st/stm32f3xx_hal_driver"]
path = hw/mcu/st/stm32f3xx_hal_driver
url = https://gitee.com/x-robot/stm32f3xx_hal_driver.git
[submodule "lib/magic_enum"]
path = lib/magic_enum
url = https://gitee.com/x-robot/magic_enum.git
[submodule "hw/mcu/st/stm32g4xx_hal_driver"]
path = hw/mcu/st/stm32g4xx_hal_driver
url = https://gitee.com/x-robot/stm32g4xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_g4"]
path = hw/mcu/st/cmsis_device_g4
url = https://gitee.com/x-robot/cmsis_device_g4.git
[submodule "lib/MiniFlashDB"]
path = lib/MiniFlashDB
url = https://gitee.com/jiu-xiao/MiniFlashDB.git
[submodule "lib/printf"]
path = lib/printf
url = https://gitee.com/x-robot/printf.git
[submodule "hw/mcu/st/stm32g0xx_hal_driver"]
path = hw/mcu/st/stm32g0xx_hal_driver
url = https://gitee.com/x-robot/stm32g0xx_hal_driver.git
[submodule "hw/mcu/st/cmsis_device_g0"]
path = hw/mcu/st/cmsis_device_g0
url = https://gitee.com/x-robot/cmsis_device_g0.git
6 changes: 4 additions & 2 deletions project.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
import random
import sys
import os
Expand Down Expand Up @@ -545,7 +545,9 @@ def new_robot(name: str):
elif cmd[1] == "list":
list_target()
elif cmd[1] == "init":
os.system("sudo apt install cmake ninja-build python3-tk clang clangd")
os.system("git submodule init && git submodule update")
elif cmd[1] == "init-cn":
os.system("mv .gitmodules .gitmodules_en && mv .gitmodules_cn .gitmodules && git submodule init && git submodule update")
elif cmd[1] == "select":
if cmd_len < 4:
print("参数错误")
Expand Down
10 changes: 0 additions & 10 deletions src/module/gimbal/mod_gimbal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,6 @@ void Gimbal::SetMode(Mode mode) {
}

this->mode_ = mode;

memcpy(&(this->setpoint_.eulr_), &(this->eulr_),
sizeof(this->setpoint_.eulr_)); /* 切换模式后重置设定值 */
if (this->mode_ == RELAX) {
if (mode == ABSOLUTE) {
this->setpoint_.eulr_.yaw = this->eulr_.yaw;
}
}

this->mode_ = mode;
}

void Gimbal::DrawUIStatic(Gimbal* gimbal) {
Expand Down

0 comments on commit 1d9ec0b

Please sign in to comment.