Skip to content

Commit d70511b

Browse files
authored
Merge pull request #449 from rosflight/ptt/pass_by_structure
Ptt/pass by structure
2 parents 569d53c + 7500aaa commit d70511b

File tree

477 files changed

+796997
-1126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

477 files changed

+796997
-1126
lines changed

.gitignore

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,20 @@ scripts/parameter-descriptions.md
3333
*.cxxflags
3434

3535
# STM32Cube
36-
.cproject*
37-
.mxproject*
38-
*.launch
39-
.project*
40-
.settings/
41-
config_*/
36+
#.cproject*
37+
#.mxproject*
38+
#*.launch
39+
#.project*
40+
#.settings/
41+
#config_*/
42+
#test_build
43+
#varmint_build
44+
#pixracer_pro_build
45+
#STM32H743IIKX_FLASH.ld
46+
#STM32H753VIHX_FLASH.ld
47+
#build/
48+
#*/Debug/
49+
#cmake_install.cmake
50+
#varmint_11x/
51+
#varmint_11x_test/
52+
#varmint_12x/

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
[submodule "comms/mavlink/v1.0"]
2-
path = comms/mavlink/v1.0
3-
url = https://github.com/rosflight/mavlink_c_library.git
4-
[submodule "boards/varmint_h7"]
5-
path = boards/varmint_h7
6-
url = https://github.com/rosflight/varmint_h7.git
71
[submodule "lib/eigen"]
82
path = lib/eigen
93
url = https://gitlab.com/libeigen/eigen.git

CMakeLists.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
### project settings ###
22

3+
# Building the projects:
4+
# mkdir varmint_build && cd varmint_build && cmake .. -DBOARD_TO_BUILD=varmint && make -j
5+
# mkdir pixracer_pro_build && cd pixracer_pro_build && cmake .. -DBOARD_TO_BUILD=pixracer_pro && make -j
6+
#
7+
# alternate for make -j above is cmake --build . -j (note only one .)
8+
# make -j OR cmake --build . -j
9+
# to clean:
10+
# make clean -j OR make --build . --target clean -j
11+
#
12+
# unit test:
13+
# build:
14+
# mkdir test_build && cd test_build && cmake .. -DBOARD_TO_BUILD=test -DCMAKE_BUILD_TYPE=Release && make -j
15+
# test:
16+
# ./test/unit_tests
17+
318
cmake_minimum_required(VERSION 3.8)
419
project(rosflight_firmware C CXX ASM)
520

@@ -35,7 +50,6 @@ include_directories(
3550
lib
3651
comms/mavlink
3752
comms/mavlink/v1.0
38-
comms/mavlink/v1.0/common
3953
)
4054

4155
file(GLOB_RECURSE ROSFLIGHT_SOURCES

boards/varmint_h7

Lines changed: 0 additions & 1 deletion
This file was deleted.

boards/varmint_h7/.clang-format

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# ROS2 code style standards
2+
# https://docs.ros.org/en/humble/The-ROS2-Project/Contributing/Code-Style-Language-Versions.html#id3
3+
BasedOnStyle: LLVM
4+
AccessModifierOffset: -2
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: None
7+
AlignOperands: DontAlign
8+
AllowAllArgumentsOnNextLine: false
9+
AllowAllConstructorInitializersOnNextLine: false
10+
AllowAllParametersOfDeclarationOnNextLine: false
11+
AllowShortBlocksOnASingleLine: Always
12+
AllowShortCaseLabelsOnASingleLine: false
13+
AllowShortFunctionsOnASingleLine: All
14+
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
15+
AllowShortLambdasOnASingleLine: All
16+
AllowShortLoopsOnASingleLine: true
17+
AlwaysBreakAfterReturnType: None
18+
AlwaysBreakTemplateDeclarations: Yes
19+
BreakBeforeBraces: Custom
20+
BraceWrapping:
21+
AfterCaseLabel: false
22+
AfterClass: true
23+
AfterControlStatement: Never
24+
AfterEnum: true
25+
AfterFunction: true
26+
AfterNamespace: true
27+
AfterStruct: true
28+
AfterUnion: true
29+
BeforeCatch: false
30+
BeforeElse: false
31+
IndentBraces: false
32+
SplitEmptyFunction: false
33+
SplitEmptyRecord: true
34+
BreakBeforeBinaryOperators: NonAssignment
35+
BreakBeforeTernaryOperators: true
36+
BreakConstructorInitializers: BeforeComma
37+
BreakInheritanceList: BeforeColon
38+
ColumnLimit: 120
39+
CompactNamespaces: false
40+
ContinuationIndentWidth: 2
41+
IndentCaseLabels: true
42+
IndentPPDirectives: None
43+
IndentWidth: 2
44+
KeepEmptyLinesAtTheStartOfBlocks: true
45+
MaxEmptyLinesToKeep: 1
46+
NamespaceIndentation: None
47+
ObjCSpaceAfterProperty: false
48+
ObjCSpaceBeforeProtocolList: false
49+
PointerAlignment: Middle
50+
ReflowComments: false
51+
SpaceAfterCStyleCast: true
52+
SpaceAfterLogicalNot: false
53+
SpaceAfterTemplateKeyword: false
54+
SpaceBeforeAssignmentOperators: true
55+
SpaceBeforeCpp11BracedList: false
56+
SpaceBeforeCtorInitializerColon: true
57+
SpaceBeforeInheritanceColon: true
58+
SpaceBeforeParens: ControlStatements
59+
SpaceBeforeRangeBasedForLoopColon: true
60+
SpaceInEmptyParentheses: false
61+
SpacesBeforeTrailingComments: 1
62+
SpacesInAngles: false
63+
SpacesInCStyleCastParentheses: false
64+
SpacesInContainerLiterals: false
65+
SpacesInParentheses: false
66+
SpacesInSquareBrackets: false
67+
TabWidth: 2
68+
UseTab: Never

boards/varmint_h7/.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# STM32Cube
2+
#.cproject*
3+
#.mxproject*
4+
#*.launch
5+
#.project*
6+
#.settings/
7+
config_*/
8+
test_build
9+
varmint_build
10+
pixracer_pro_build
11+
STM32H743IIKX_FLASH.ld
12+
STM32H753VIHX_FLASH.ld
13+
build/
14+
*/Debug/
15+
cmake_install.cmake
16+
varmint_11x/
17+
varmint_11x_test/
18+
varmint_12x/

boards/varmint_h7/LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2024, AeroVironment Inc.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
1. Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
11+
2. Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
15+
3. Neither the name of the copyright holder nor the names of its
16+
contributors may be used to endorse or promote products derived from
17+
this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

boards/varmint_h7/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[![Build Varmint 10X](https://github.com/rosflight/varmint_h7/actions/workflows/build_varmint_10X.yml/badge.svg)](https://github.com/rosflight/varmint_h7/actions/workflows/build_varmint_10X.yml) [![Build Pixracer Pro](https://github.com/rosflight/varmint_h7/actions/workflows/build_pixracer_pro.yml/badge.svg)](https://github.com/rosflight/varmint_h7/actions/workflows/build_pixracer_pro.yml)
2+
3+
# Varmint H7
4+
5+
This repository contains a board implementation of the [ROSflight firmware](https://github.com/rosflight/rosflight_firmware) for AeroVironment's Varmint FCU package, a STM32H753 based flight controller with a NVIDIA Jetson Orin NX on board. It also has an implementation for 3DR's [PixRacer Pro](https://docs.3dr.com/autopilots/pixracer-pro/) autopilot, which has a very similar configuration to the Varmint board.
6+
7+
This code is based off of a [STM32cubeMX](https://www.st.com/en/development-tools/stm32cubemx.html) project, which enables quick configuration of the H7 processor. STM32cubeMX works by generating code for the configuration specified by the STM32cubeMX software. The generated code contains sections of "BEGIN USER CODE" and "END USER CODE" that the developer can then add their code inside. User code inside of these sections will persist between reconfigurations of the H7, while anything outside will be overwritten.
8+
9+
This repository can be compiled as a standalone project or as a submodule of the firmware. Standalone compilation is only used for testing, as none of the ROSflight firmware functionality is included. When compiling with the firmware repository, use the CMakeLists.txt file found in the root of the firmware repo.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/**
2+
******************************************************************************
3+
* File Name : AL94.I-CUBE-USBD-COMPOSITE_conf.h
4+
* Description : This file provides code for the configuration
5+
* of the AL94.I-CUBE-USBD-COMPOSITE_conf.h instances.
6+
******************************************************************************
7+
* @attention
8+
*
9+
* Copyright (c) 2024 STMicroelectronics.
10+
* All rights reserved.
11+
*
12+
* This software is licensed under terms that can be found in the LICENSE file
13+
* in the root directory of this software component.
14+
* If no LICENSE file comes with this software, it is provided AS-IS.
15+
*
16+
******************************************************************************
17+
*/
18+
/* Define to prevent recursive inclusion -------------------------------------*/
19+
#ifndef __AL94__I_CUBE_USBD_COMPOSITE_CONF__H__
20+
#define __AL94__I_CUBE_USBD_COMPOSITE_CONF__H__
21+
22+
#ifdef __cplusplus
23+
extern "C" {
24+
#endif
25+
26+
/* Includes ------------------------------------------------------------------*/
27+
28+
/**
29+
MiddleWare name : AL94.I-CUBE-USBD-COMPOSITE.1.0.3
30+
MiddleWare fileName : ./AL94.I-CUBE-USBD-COMPOSITE_conf.h
31+
MiddleWare version :
32+
*/
33+
/*---------- _USBD_USE_HS -----------*/
34+
//#define _USBD_USE_HS false
35+
36+
/*---------- _USBD_USE_CDC_ACM -----------*/
37+
#define _USBD_USE_CDC_ACM true
38+
39+
/*---------- _USBD_CDC_ACM_COUNT -----------*/
40+
#define _USBD_CDC_ACM_COUNT 2
41+
42+
/*---------- _USBD_USE_CDC_RNDIS -----------*/
43+
#define _USBD_USE_CDC_RNDIS false
44+
45+
/*---------- _USBD_USE_CDC_ECM -----------*/
46+
#define _USBD_USE_CDC_ECM false
47+
48+
/*---------- _USBD_USE_HID_MOUSE -----------*/
49+
#define _USBD_USE_HID_MOUSE false
50+
51+
/*---------- _USBD_USE_HID_KEYBOARD -----------*/
52+
#define _USBD_USE_HID_KEYBOARD false
53+
54+
/*---------- _USBD_USE_HID_CUSTOM -----------*/
55+
#define _USBD_USE_HID_CUSTOM false
56+
57+
/*---------- _USBD_USE_UAC_MIC -----------*/
58+
#define _USBD_USE_UAC_MIC false
59+
60+
/*---------- _USBD_USE_UAC_SPKR -----------*/
61+
#define _USBD_USE_UAC_SPKR false
62+
63+
/*---------- _USBD_USE_UVC -----------*/
64+
#define _USBD_USE_UVC false
65+
66+
/*---------- _USBD_USE_MSC -----------*/
67+
#define _USBD_USE_MSC false
68+
69+
/*---------- _USBD_USE_DFU -----------*/
70+
#define _USBD_USE_DFU false
71+
72+
/*---------- _USBD_USE_PRNTR -----------*/
73+
#define _USBD_USE_PRNTR false
74+
75+
/*---------- _STM32F1_DEVICE -----------*/
76+
#define _STM32F1_DEVICE false
77+
78+
#ifdef __cplusplus
79+
}
80+
#endif
81+
#endif /*__ AL94__I_CUBE_USBD_COMPOSITE_CONF__H_H */
82+
83+
/**
84+
* @}
85+
*/
86+
87+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)