Commit 2b472170 authored by Wenxi Xu's avatar Wenxi Xu
Browse files

修改了文件结构

重构了达妙驱动
增加了ekf算法
增加了vofa算法
parent c31aeb72
Loading
Loading
Loading
Loading
+113 −9
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0
#
# Note: The list of ForEachMacros can be obtained using:
#
#    git grep -h '^#define [^[:space:]]*FOR_EACH[^[:space:]]*(' include/ \
#    | sed "s,^#define \([^[:space:]]*FOR_EACH[^[:space:]]*\)(.*$,  - '\1'," \
#    | sort | uniq
#
# References:
#   - https://clang.llvm.org/docs/ClangFormatStyleOptions.html

---
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 98
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: Consecutive
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: true
ReflowComments: false
SortIncludes: false
 No newline at end of file
AlignConsecutiveMacros: AcrossComments
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AttributeMacros:
  - __aligned
  - __deprecated
  - __packed
  - __printf_like
  - __syscall
  - __syscall_always_inline
  - __subsystem
BitFieldColonSpacing: After
BreakBeforeBraces: Linux
ColumnLimit: 100
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
ForEachMacros:
  - 'ARRAY_FOR_EACH'
  - 'ARRAY_FOR_EACH_PTR'
  - 'FOR_EACH'
  - 'FOR_EACH_FIXED_ARG'
  - 'FOR_EACH_IDX'
  - 'FOR_EACH_IDX_FIXED_ARG'
  - 'FOR_EACH_NONEMPTY_TERM'
  - 'FOR_EACH_FIXED_ARG_NONEMPTY_TERM'
  - 'RB_FOR_EACH'
  - 'RB_FOR_EACH_CONTAINER'
  - 'SYS_DLIST_FOR_EACH_CONTAINER'
  - 'SYS_DLIST_FOR_EACH_CONTAINER_SAFE'
  - 'SYS_DLIST_FOR_EACH_NODE'
  - 'SYS_DLIST_FOR_EACH_NODE_SAFE'
  - 'SYS_SEM_LOCK'
  - 'SYS_SFLIST_FOR_EACH_CONTAINER'
  - 'SYS_SFLIST_FOR_EACH_CONTAINER_SAFE'
  - 'SYS_SFLIST_FOR_EACH_NODE'
  - 'SYS_SFLIST_FOR_EACH_NODE_SAFE'
  - 'SYS_SLIST_FOR_EACH_CONTAINER'
  - 'SYS_SLIST_FOR_EACH_CONTAINER_SAFE'
  - 'SYS_SLIST_FOR_EACH_NODE'
  - 'SYS_SLIST_FOR_EACH_NODE_SAFE'
  - '_WAIT_Q_FOR_EACH'
  - 'Z_FOR_EACH'
  - 'Z_FOR_EACH_ENGINE'
  - 'Z_FOR_EACH_EXEC'
  - 'Z_FOR_EACH_FIXED_ARG'
  - 'Z_FOR_EACH_FIXED_ARG_EXEC'
  - 'Z_FOR_EACH_IDX'
  - 'Z_FOR_EACH_IDX_EXEC'
  - 'Z_FOR_EACH_IDX_FIXED_ARG'
  - 'Z_FOR_EACH_IDX_FIXED_ARG_EXEC'
  - 'Z_GENLIST_FOR_EACH_CONTAINER'
  - 'Z_GENLIST_FOR_EACH_CONTAINER_SAFE'
  - 'Z_GENLIST_FOR_EACH_NODE'
  - 'Z_GENLIST_FOR_EACH_NODE_SAFE'
  - 'STRUCT_SECTION_FOREACH'
  - 'STRUCT_SECTION_FOREACH_ALTERNATE'
  - 'TYPE_SECTION_FOREACH'
  - 'K_SPINLOCK'
  - 'COAP_RESOURCE_FOREACH'
  - 'COAP_SERVICE_FOREACH'
  - 'COAP_SERVICE_FOREACH_RESOURCE'
  - 'HTTP_RESOURCE_FOREACH'
  - 'HTTP_SERVER_CONTENT_TYPE_FOREACH'
  - 'HTTP_SERVICE_FOREACH'
  - 'HTTP_SERVICE_FOREACH_RESOURCE'
  - 'I3C_BUS_FOR_EACH_I3CDEV'
  - 'I3C_BUS_FOR_EACH_I2CDEV'
IfMacros:
  - 'CHECKIF'
# Disabled for now, see bug https://github.com/zephyrproject-rtos/zephyr/issues/48520
#IncludeBlocks: Regroup
IncludeCategories:
  - Regex: '^".*\.h"$'
    Priority: 0
  - Regex: '^<(assert|complex|ctype|errno|fenv|float|inttypes|limits|locale|math|setjmp|signal|stdarg|stdbool|stddef|stdint|stdio|stdlib|string|tgmath|time|wchar|wctype)\.h>$'
    Priority: 1
  - Regex: '^\<zephyr/.*\.h\>$'
    Priority: 2
  - Regex: '.*'
    Priority: 3
IndentCaseLabels: false
IndentGotoLabels: false
IndentWidth: 8
InsertBraces: true
SpaceBeforeInheritanceColon: False
SpaceBeforeParens: ControlStatementsExceptControlMacros
SortIncludes: Never
UseTab: ForContinuationAndIndentation
WhitespaceSensitiveMacros:
  - COND_CODE_0
  - COND_CODE_1
  - IF_DISABLED
  - IF_ENABLED
  - LISTIFY
  - STRINGIFY
  - Z_STRINGIFY
  - DT_FOREACH_PROP_ELEM_SEP
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@
    },
    "C_Cpp.formatting": "clangFormat",
    "C_Cpp.errorSquiggles": "disabled",
    "cortex-debug.variableUseNaturalFormat": true,
    "cortex-debug.variableUseNaturalFormat": false,
    "C_Cpp.default.compileCommands": "${workspaceFolder}/.vscode/compile_commands.json",
    "cmake.configureOnOpen": false,

1663296746649528.pdf

0 → 100644
+559 KiB

File added.

No diff preview for this file type.

+53541 −38787

File changed.

Preview size limit exceeded, changes collapsed.

+48 −7
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@
	compatible = "dji,robomaster-board-c";

	chosen {
		zephyr,console = &usart6;
		zephyr,shell-uart = &usart6;
		zephyr,console = &usart1;
		zephyr,shell-uart = &usart1;
		zephyr,sram = &sram0;
		zephyr,button = &user_button;
		zephyr,flash = &flash0;
@@ -110,6 +110,23 @@
	status = "okay";
};

&dma1 {
    status = "okay";
};

&dma2 {
    status = "okay";
};

&usart1 {
	pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pb7>;
	pinctrl-names = "default";
	current-speed = <115200>;
	status = "okay";
	data-bits = <8>;
	stop-bits = "1";
};

&usart3 {
    pinctrl-0 = <&usart3_tx_pc10 &usart3_rx_pc11>;
    pinctrl-names = "default";
@@ -123,17 +140,16 @@
    dma-names = "rx", "tx";
};

&dma1 {
    status = "okay";
};

&usart6 {
	pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>;
	pinctrl-names = "default";
	current-speed = <115200>;
	current-speed = <1500000>;
	status = "okay";
	data-bits = <8>;
	stop-bits = "1";
	dmas = <&dma2 6 5 STM32_DMA_PERIPH_TX STM32_DMA_FIFO_FULL>,
			<&dma2 1 5 STM32_DMA_PERIPH_RX STM32_DMA_FIFO_FULL>;
	dma-names = "tx", "rx";
};

zephyr_udc0: &usbotg_fs {
@@ -191,6 +207,31 @@ zephyr_udc0: &usbotg_fs {
			&spi1_sck_pb3>;
	pinctrl-names="default";

    bmi08x_accel: bmi08x_accel@0 {
        compatible = "bosch,bmi08x-accel";
		status = "okay";
        reg = <0>;
        spi-max-frequency = <8000000>;
        int-gpios = <&gpioc 4 GPIO_ACTIVE_HIGH>;
        accel-hz = "800";
        accel-fs = <12>;
		int1-map-io = <0x01>;
		int2-map-io = <0x02>;
        int1-conf-io = <0x0A>;
		int2-conf-io = <0x0A>;
    };

    bmi08x_gyro: bmi08x_gyro@1{
        compatible = "bosch,bmi08x-gyro";
		status = "okay";
        reg = <1>;
        spi-max-frequency = <8000000>;
        int-gpios = <&gpioc 5 GPIO_ACTIVE_HIGH>;
        gyro-hz = "1000_116";
        gyro-fs = <1000>;
		int3-4-map-io = <0x01>;
		int3-4-conf-io = <0x01>;
    };
};

// &lptim1 {
Loading