Skip to content
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
ab64679
State Machine Base
DiegoLHendrix Dec 10, 2024
190f973
Switching to TPDO and RPDO
DiegoLHendrix Jan 18, 2025
62e4d55
Testin vicor fault input
DiegoLHendrix Jan 25, 2025
ac2b0a5
Vicor fault signal be working
DiegoLHendrix Jan 25, 2025
3aff232
I make oopsie
DiegoLHendrix Jan 27, 2025
6d2e140
Temperature sensing started
DiegoLHendrix Feb 6, 2025
81eff1e
Power switch temperature sensing is functional
DiegoLHendrix Feb 8, 2025
dffdba2
Temperature and Current sensing methods tested
DiegoLHendrix Feb 13, 2025
847fe5c
Fault State added
DiegoLHendrix Feb 15, 2025
c7fe087
GitHub being dumb
DiegoLHendrix Feb 18, 2025
561dd5f
Applied Formatting Changes During GitHub Build
Feb 18, 2025
8e188a6
Changed exit condition for fault state
DiegoLHendrix Feb 18, 2025
06af24e
Loosing it rn
DiegoLHendrix Feb 18, 2025
8fdc71a
Applied Formatting Changes During GitHub Build
Feb 18, 2025
acc57b8
Namespace changes
DiegoLHendrix Mar 1, 2025
dd04a80
Current and temperature sensing fixing
DiegoLHendrix Apr 5, 2025
a700955
Current and temperature sensing fixing
DiegoLHendrix Apr 5, 2025
84a4b38
Applied Formatting Changes During GitHub Build
Apr 5, 2025
8d77abc
Temperature sensing works
DiegoLHendrix Apr 8, 2025
e34ef4a
Applied Formatting Changes During GitHub Build
Apr 8, 2025
56ec042
Running method created
DiegoLHendrix Apr 23, 2025
5388ad5
Applied Formatting Changes During GitHub Build
Apr 23, 2025
99a1c49
Updated state machine and CANopen object dictionary
DiegoLHendrix Apr 24, 2025
91dedeb
Merge branch 'feature/diegolhendrix/state-machine' of github.com:RIT-…
DiegoLHendrix Apr 24, 2025
26fac15
Fixed merge conflicts
DiegoLHendrix Apr 24, 2025
70f900d
Process state with fault checking
DiegoLHendrix Apr 26, 2025
ae3ac7d
Applied Formatting Changes During GitHub Build
Apr 26, 2025
fe79b15
Initialized boards as off
DiegoLHendrix Apr 26, 2025
28fb43d
Merge branch 'feature/diegolhendrix/state-machine' of github.com:RIT-…
DiegoLHendrix Apr 26, 2025
07235ce
Fixed CANopen object dictionary, README.md, and current sensing
DiegoLHendrix May 3, 2025
2a97690
Check vicor fault status, added proper time intervals for CANopen dic…
DiegoLHendrix May 3, 2025
7347bb0
Fixed getCurrent method on TPS2H target
DiegoLHendrix May 3, 2025
94024b6
Applied Formatting Changes During GitHub Build
May 3, 2025
11dfb3f
Added setLimits in main.cpp and fixed incorrect log print message for…
DiegoLHendrix May 4, 2025
9489635
Fixed CANopen intervals
DiegoLHendrix May 5, 2025
80a252d
Applied Formatting Changes During GitHub Build
May 7, 2025
8b0a421
Properly receiving CANopen messages
DiegoLHendrix May 7, 2025
21d9dc8
Started making PR changes
DiegoLHendrix May 26, 2025
eeff12e
PR review changes part 1
DiegoLHendrix May 28, 2025
a2dceb2
Pr changes part 2: electric boogaloo
DiegoLHendrix Jul 23, 2025
c83c7f9
Applied Formatting Changes During GitHub Build
Jul 23, 2025
9862dcd
Fixed Latch pin logic, edited switchFaultStatus variable name, rename…
DiegoLHendrix Aug 18, 2025
0be2e7c
Applied Formatting Changes During GitHub Build
Aug 18, 2025
6a9c33f
made constructor explicit, made volt in (3.3) sensitivity and average…
danntrapp Oct 2, 2025
d69996e
renamed temperature limit because Rue told me to, fixed a comment
danntrapp Oct 2, 2025
bbb5160
Storing vals in variables for better readibility
danntrapp Oct 9, 2025
59f00ba
Updated CANopen object dictionary and EVT-Core branch
DiegoLHendrix Mar 30, 2026
26cec2b
Updated CANobject dictionary, added logic for turning switch off when…
DiegoLHendrix Apr 7, 2026
59b1669
Individual power switch channels now turn off when there is a fault i…
DiegoLHendrix Apr 11, 2026
24810c5
Updated variable names, comments, and struct declarations
DiegoLHendrix Apr 17, 2026
00eec29
Updated includes and namespaces for LVSS current sensor
DiegoLHendrix Apr 18, 2026
e6f8b17
Applied Formatting Changes During GitHub Build
Apr 18, 2026
3ab5cc9
Updated CANopen Object Dictionary to receive VCU board enable signal
DiegoLHendrix Apr 18, 2026
8f6ca21
Formatting and other pr changes
DiegoLHendrix Apr 23, 2026
3f8cac9
Applied Formatting Changes During GitHub Build
Apr 23, 2026
1b22a1e
Removed TPDO_NODE_ID variable and made logger messages more descriptive
DiegoLHendrix Apr 27, 2026
f95aa80
Applied Formatting Changes During GitHub Build
Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 164 additions & 14 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,66 +1,216 @@
# Generated from CLion C/C++ Code Style settings
Language: Cpp
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: true
PadOperators: true
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: true
PadOperators: false
AlignEscapedNewlines: Left
AlignOperands: DontAlign
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
#AllowAllConstructorInitializersOnNextLine: false (Deprecated -> PackConstructorInitializers)
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: MultiLine
BreakBeforeBraces: Custom
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
- __capability
BinPackArguments: false
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeColon
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
ColumnLimit: 0
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
QualifierAlignment: Leave
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: BinPack
ConstructorInitializerAllOnOneLineOrOnePerLine: false
AllowAllConstructorInitializersOnNextLine: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: BeforeHash

IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertBraces: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PointerAlignment: Left
ReflowComments: false
PPIndentWidth: -1
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RequiresClausePosition: OwnLine
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Latest
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...
Comment thread
DiegoLHendrix marked this conversation as resolved.
Outdated
15 changes: 5 additions & 10 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,17 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
submodules: recursive

# Install the gcc-arm tools and clang-format, and ensure clang-format 12 is being used
# Install the gcc-arm tools and clang-format, and ensure clang-format 15 is being used
- name: Install Compiler and Linter
run: |
sudo apt-get install gcc-arm-none-eabi
sudo apt-get install clang-format-12
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-12 10000
sudo apt-get install clang-format-15
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-15 10000

# Build the code for all supported chips
- name: F302 Build
- name: Project Build
run: |
cmake -DTARGET_DEV=STM32F302x8 -B ${{github.workspace}}/build
cmake --build ${{github.workspace}}/build

- name: F334 Build
run: |
cmake -DTARGET_DEV=STM32F334x8 -B ${{github.workspace}}/build
cmake -B ${{github.workspace}}/build
cmake --build ${{github.workspace}}/build

# Apply clang-format formatting to the branch and create a new commit if any files are changed
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ add_library(${PROJECT_NAME} STATIC
target_sources(${PROJECT_NAME} PRIVATE
src/LVSS.cpp
src/dev/ACS71240.cpp
src/dev/TPS2HB50BQ1.cpp
src/dev/TPS2HB35BQ.cpp
)

###############################################################################
Expand Down
77 changes: 2 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,5 @@
# Project Template

## Overview

### EVT-core
For an overview of EVT please see the following links:

[EVT-core Documentation](https://evt-core.readthedocs.io/)

[EVT-core GitHub](https://github.com/RIT-EVT/EVT-core/)

### Template Project

This project-template serves as the skeleton template that is used for
all EVT board repositories. It contains the following capabilities:

- Includes EVT-core as a submodule and compiled as a library for the board
- Set up to contain code pertinent to the board to be built
- Supports an arbitrary number of executable targets to be built and deployed onto a microcontroller
- These contain targets to be run on a specific EVT custom PCB
- Also contain utilities for validation and debugging
- Provides a framework for auto-generated and built documentation using Sphinx and hosted on
`readthedocs.io`

## Steps to Set Up a New Project

1) Create a new repo based on the project-template
1) From [project-template](https://github.com/RIT-EVT/project-template) click `Use this template`
2) Set the owner of the repository to RIT-EVT
3) Name the repo with the new board's acronym
4) Set the privacy to Public
5) Don't include all branches
2) Clone the new repo and create a setup branch
1) `git clone <URL>`
2) `git checkout -b feature/<github-username>/inital-setup`
3) Set the project template up as an upstream repository
1) `git remote add upstream https://github.com/RIT-EVT/project-template`
2) `git remote set-url --push upstream no-push`
1) Confirm that this worked by running `git remote -v`
2) This should produce output similar to this:
```
origin https://github.com/RIT-EVT/ABC.git (fetch)
origin https://github.com/RIT-EVT/ABC.git (push)
upstream https://github.com/RIT-EVT/project-template (fetch)
upstream no-push (push)
```
3) `git fetch upstream`
4) `git merge upstream/main --allow-unrelated-histories`

4) Update the EVT submodule
1) `git submodule update --init --recursive && git pull`
2) `cd ./libs/EVT-core`
3) `git merge origin/main`
4) `cd ../..`
5) Import the project into Read the Docs, following the steps on
[the wiki](https://wiki.rit.edu/display/EVT/Documentation+and+Organization+Standards)
6) Update all instances of BOARD_NAME to match your project name
1) `CMakeLists.txt:28`
2) Directory `./targets/BIKE_NAME-BOARD_NAME`
3) `targets/BIKE_NAME-BOARD_NAME/CMakeLists.txt:3`
4) `src/BOARD_NAME.cpp`
5) `include/BOARD_NAME.hpp`
6) `docs/Doxyfile:35`
7) `docs/source/index.rst:6`
8) `docs/source/api/index.rst:4,12,15`
9) `README.md:56`
7) Sample files are included in `./src` and `./include`. Once proper functionality has been
confirmed, these files should be deleted. There are placeholders to demonstrate the board library
building functionality.
8) Everything in this README from this final step up should be deleted, leaving only the content
below. When finished, all the changes should be committed and pushed to the setup branch, and a PR
should be created to merge into main.

# REV3-LVSS

## Introduction

*One-paragraph summary of the board and its purpose on the bike*
The Low Voltage Sub-System (LVSS) is a board designed to receive CANopen messages from the Vehicle Control Unit (VCU), indicating which boards on the bike needs to be turned on or off. The LVSS will include an STM32F446RE that works with a DCM4623TD2K13E0T70 Vicor DCM Power Module to take the battery pack voltage and step it down to multiple 12-volt signals. Utilizing the TPS2HB35BQ high-side power switches, a state machine will be able to send out the 12-volt signals to each individual board. The power switches can sense the current, temperature, and fault status and use these values to ensure the health of the LVSS.
LVSS Node ID = 1
Binary file removed datasheets/Current_Sensing_High_Power.pdf
Comment thread
DiegoLHendrix marked this conversation as resolved.
Binary file not shown.
Loading
Loading