Commit c31aeb72 authored by Wenxi Xu's avatar Wenxi Xu
Browse files

Little changes

parent 16d2148a
Loading
Loading
Loading
Loading

1599115279962725.pdf

deleted100644 → 0
−281 KiB

File deleted.

1663296746649528.pdf

deleted100644 → 0
−559 KiB

File deleted.

+6 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ To build the application, run the following command:

```shell
cd motor
west build -b $BOARD app/motor
west build -b $BOARD motor
```

where `$BOARD` is the target board. Here you can use `robomaster_board_c`
@@ -84,6 +84,11 @@ The RPM is graphed via UART1
另外,VS Code在下栏会显示一系列tasks,你可以在`.vscode/tasks.json`中找到它们的设置

详细的文档请参考`Documents`文件夹

### App
我们的App都放在app目录下
`git submodule update --init`
从子仓库中抓取所有的数据找到父级仓库对应的那次子仓库的提交id并且检出到父项目的目录中。
```
好无聊逗逗梅总吧
    嘬嘬嘬𐃆 ˒˒ ͏                               

motor/CMakeLists.txt

0 → 100644
+17 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)
set(CMAKE_CXX_STANDARD 17)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(motor)

FILE(GLOB app_sources src/*.c)

include_directories(${ZEPHYR_BASE}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/dts)
target_sources(app PRIVATE ${app_sources})
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include)
target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/dts)

motor/README.rst

0 → 100644
+51 −0
Original line number Diff line number Diff line
.. zephyr:code-sample:: can-babbling
   :name: Controller Area Network (CAN) babbling node
   :relevant-api: can_interface

   Simulate a babbling CAN node.

Overview
********

In a Controller Area Network a babbling node is a node continuously (and usually erroneously)
transmitting CAN frames with identical - often high - priority. This constant babbling blocks CAN
bus access for any CAN frame with lower priority as these frames will loose the bus arbitration.

This sample application simulates a babbling CAN node. The properties of the CAN frames sent are
configurable via :ref:`Kconfig <kconfig>`. The frames carry no data as only the arbitration part of
the CAN frame is of interest.

Being able to simulate a babbling CAN node is useful when examining the behavior of other nodes on
the same CAN bus when they constantly loose bus arbitration.

The source code for this sample application can be found at:
:zephyr_file:`samples/drivers/can/babbling`.

Requirements
************

This sample requires a board with a CAN controller. The CAN controller must be configured using the
``zephyr,canbus`` :ref:`devicetree <dt-guide>` chosen node property.

The sample supports an optional button for stopping the babbling. If present, the button must be
configured using the ``sw0`` :ref:`devicetree <dt-guide>` alias, usually in the :ref:`BOARD.dts file
<devicetree-in-out-files>`.

Building and Running
********************

Example building for :ref:`twr_ke18f`:

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/can/babbling
   :board: twr_ke18f
   :goals: build flash

Sample output
=============

.. code-block:: console

   *** Booting Zephyr OS build zephyr-v3.1.0-4606-g8c1efa8b96bb  ***
   babbling on can@40024000 with standard (11-bit) CAN ID 0x010, RTR 0, CAN FD 0
   abort by pressing User SW3 button
Loading