Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Motor control work #3

Merged
merged 27 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
728d36e
README.md update for CI
VyaasBaskar Dec 17, 2024
cf5f290
Merge branch 'master' of https://github.com/Team846/monkey_menace
VyaasBaskar Dec 17, 2024
89c7b89
Motor control partial implementation
VyaasBaskar Dec 17, 2024
49c24d4
Rename GenericVerticalArmSubsystem -> VerticalArmCalculator, minor ch…
VyaasBaskar Dec 17, 2024
bdd8c76
Finished motor control implementations
prak132 Dec 17, 2024
bf3f033
Modified strategy for current limiting onboard TalonFX controller
VyaasBaskar Dec 17, 2024
f74c703
Documentation for TalonFX_interm and CI fix
prak132 Dec 19, 2024
d239789
Constructing TalonFX_interm in MotorMonkey, current limiting strategy…
VyaasBaskar Dec 19, 2024
231b20b
Merge branch 'motor_control_work' of https://github.com/Team846/monke…
VyaasBaskar Dec 19, 2024
a030788
Fixing CI fail issues
VyaasBaskar Dec 19, 2024
09cfed4
Added CppCheck badge to README
VyaasBaskar Dec 19, 2024
6c07e13
Added style.standard, reformatted all files
VyaasBaskar Dec 20, 2024
7db575d
Added correct clang format version in compilation_check.yaml
VyaasBaskar Dec 20, 2024
ebee109
Testing different clang format version
VyaasBaskar Dec 20, 2024
e4f93df
Rename cpp_check job, add to critical warning list
VyaasBaskar Dec 20, 2024
c9d79a1
Merge branch 'ci_tests' of https://github.com/Team846/monkey_menace i…
VyaasBaskar Dec 20, 2024
d9ce384
Merge pull request #2 from Team846/ci_tests
VyaasBaskar Dec 20, 2024
738441d
Added SparkMAX motor control
prak132 Dec 22, 2024
71e3082
Implemented certain functions of MotorMonkey
VyaasBaskar Dec 23, 2024
33f1862
Ensure spotlessApply runs each build, remove spotlessCppCheck from gr…
VyaasBaskar Dec 23, 2024
82d31ea
Fixed status frame enabling for SparkMAXs
prak132 Dec 24, 2024
5d754df
Bug fixes for SparkMAX_interm, added macros to simplify code
VyaasBaskar Dec 24, 2024
22de874
Made common parent class for SparkMAX_interm and SparkFLEX_interm
VyaasBaskar Dec 24, 2024
3a274d9
Fixing warnings
VyaasBaskar Dec 25, 2024
bde2814
Added SoftLimits and HMCHelper, a class to help interface with Higher…
VyaasBaskar Dec 25, 2024
bdd25b5
Added SoftLimits and HMCHelper, a class to help interface with Higher…
VyaasBaskar Dec 25, 2024
27aac02
Added error handling and retries to MotorMonkey
VyaasBaskar Dec 26, 2024
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
86 changes: 86 additions & 0 deletions .github/workflows/compilation_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Compilation Check

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"

jobs:
compilation_check:
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2024-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup cache directory for PCRE and CppCheck
id: cache-setup
run: |
echo "pcre-8.45" > cache-directory-2.txt
echo "cppcheck-2.12.1" >> cache-directory-2.txt

- name: Cache PCRE and CppCheck
id: cache-deps
uses: actions/cache@v3
with:
path: |
/usr/local/bin/cppcheck
/usr/local/bin/cfg
/usr/local/lib/libpcre.so*
key: ${{ runner.os }}-build-${{ hashFiles('cache-directory-2.txt') }}
restore-keys: |
${{ runner.os }}-build-

- name: Update package index
if: steps.cache-deps.outputs.cache-hit != 'true'
run: sudo apt-get update

- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: sudo apt-get install -y wget build-essential

- name: Download and Install PCRE
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
wget -O pcre-8.45.tar.gz https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz/download
tar -xzf pcre-8.45.tar.gz
cd pcre-8.45
./configure
make
sudo make install

- name: Download and Install CppCheck
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
wget -O cppcheck.tar.gz https://github.com/danmar/cppcheck/archive/refs/tags/2.12.1.tar.gz
tar -xzf cppcheck.tar.gz
cd cppcheck-2.12.1
make MATCHCOMPILER=yes HAVE_RULES=yes CFGDIR=cfg
sudo cp cppcheck /usr/local/bin/
sudo cp -r cfg /usr/local/bin/cfg

- name: Set Library Path
run: echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf.d/local.conf && sudo ldconfig

- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y wget lsb-release software-properties-common
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
sudo apt-get install -y clang-format-18
sudo ln -sf /usr/bin/clang-format-18 /usr/bin/clang-format

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Install Roborio Toolchain
run: ./gradlew installRoborioToolchain

- name: Compile code and run tests
run: ./gradlew build -PfromCI -PrunningSpotlessCpp
79 changes: 79 additions & 0 deletions .github/workflows/cpp_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CppCheck

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"

jobs:
cpp_check:
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2024-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup cache directory for PCRE and CppCheck
id: cache-setup
run: |
echo "pcre-8.45" > cache-directory-2.txt
echo "cppcheck-2.12.1" >> cache-directory-2.txt

- name: Cache PCRE and CppCheck
id: cache-deps
uses: actions/cache@v3
with:
path: |
/usr/local/bin/cppcheck
/usr/local/bin/cfg
/usr/local/lib/libpcre.so*
key: ${{ runner.os }}-build-${{ hashFiles('cache-directory-2.txt') }}
restore-keys: |
${{ runner.os }}-build-

- name: Update package index
if: steps.cache-deps.outputs.cache-hit != 'true'
run: sudo apt-get update

- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: sudo apt-get install -y wget build-essential

- name: Download and Install PCRE
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
wget -O pcre-8.45.tar.gz https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz/download
tar -xzf pcre-8.45.tar.gz
cd pcre-8.45
./configure
make
sudo make install

- name: Download and Install CppCheck
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
wget -O cppcheck.tar.gz https://github.com/danmar/cppcheck/archive/refs/tags/2.12.1.tar.gz
tar -xzf cppcheck.tar.gz
cd cppcheck-2.12.1
make MATCHCOMPILER=yes HAVE_RULES=yes CFGDIR=cfg
sudo cp cppcheck /usr/local/bin/
sudo cp -r cfg /usr/local/bin/cfg

- name: Set Library Path
run: echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf.d/local.conf && sudo ldconfig

- name: Install clang-format
run: sudo apt-get update && sudo apt-get install -y clang-format

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Install Roborio Toolchain
run: ./gradlew installRoborioToolchain

- name: Compile code and run tests
run: ./gradlew runCppCheck -PfromCI -PrunningCppCheckTest
37 changes: 37 additions & 0 deletions .github/workflows/formatting_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Formatting Check

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"

jobs:
formatting_check:
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2024-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y wget lsb-release software-properties-common
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
sudo apt-get install -y clang-format-18
sudo ln -sf /usr/bin/clang-format-18 /usr/bin/clang-format

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Install Roborio Toolchain
run: ./gradlew installRoborioToolchain

- name: Spotless Check
run: ./gradlew spotlessCheck -PfromCI
99 changes: 0 additions & 99 deletions .github/workflows/verify_code.yaml

This file was deleted.

Loading
Loading