diff --git a/.gitmodules b/.gitmodules index dc7051b2..0309c91c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 @@ -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 diff --git a/.gitmodules_cn b/.gitmodules_cn new file mode 100644 index 00000000..154de610 --- /dev/null +++ b/.gitmodules_cn @@ -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 diff --git a/project.py b/project.py index 100d9b84..8d93df69 100755 --- a/project.py +++ b/project.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import random import sys import os @@ -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("参数错误") diff --git a/src/module/gimbal/mod_gimbal.cpp b/src/module/gimbal/mod_gimbal.cpp index 0a2d8874..0d1613b6 100644 --- a/src/module/gimbal/mod_gimbal.cpp +++ b/src/module/gimbal/mod_gimbal.cpp @@ -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) {