mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
Compare commits
33 Commits
v2027.0.0-
...
v2026.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b82d204525 | ||
|
|
ccb3266753 | ||
|
|
71a788e20b | ||
|
|
f395954d3c | ||
|
|
ab3af00d07 | ||
|
|
1b2f051b4b | ||
|
|
3dc334c1ee | ||
|
|
baa6379267 | ||
|
|
0d1dd84e86 | ||
|
|
a61866912b | ||
|
|
57c40a3dfc | ||
|
|
6f86f533e5 | ||
|
|
ded6790bcd | ||
|
|
769ce5e9fa | ||
|
|
f6b4ad575b | ||
|
|
7cd0ef5bd9 | ||
|
|
bd7a88a6d0 | ||
|
|
95cb38e6df | ||
|
|
b8d6bc2eb1 | ||
|
|
688535298b | ||
|
|
02252b58d7 | ||
|
|
e207ca4880 | ||
|
|
f4db88da9a | ||
|
|
e45aadc851 | ||
|
|
fea6883d98 | ||
|
|
b7fe5ef833 | ||
|
|
cd237e57d4 | ||
|
|
8b99ad82c3 | ||
|
|
58ba536351 | ||
|
|
4aef52a117 | ||
|
|
a6a4912a80 | ||
|
|
873e960e93 | ||
|
|
4f133c6aa1 |
2
.github/workflows/bazel.yml
vendored
2
.github/workflows/bazel.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
||||
|
||||
build-mac:
|
||||
name: "Mac"
|
||||
runs-on: macos-14
|
||||
runs-on: macOS-15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with: { fetch-depth: 0 }
|
||||
|
||||
2
.github/workflows/cmake-android.yml
vendored
2
.github/workflows/cmake-android.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
- uses: nttld/setup-ndk@v1
|
||||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r27c
|
||||
ndk-version: r27d
|
||||
add-to-path: false
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
|
||||
4
.github/workflows/cmake.yml
vendored
4
.github/workflows/cmake.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
name: Linux
|
||||
container: wpilib/roborio-cross-ubuntu:2025-22.04
|
||||
flags: "--preset with-java-and-sccache -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=ON"
|
||||
- os: macOS-14
|
||||
- os: macOS-15
|
||||
name: macOS
|
||||
container: ""
|
||||
env: ""
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
uses: lukka/run-vcpkg@v11.5
|
||||
with:
|
||||
vcpkgDirectory: ${{ runner.workspace }}/vcpkg
|
||||
vcpkgGitCommitId: 37c3e63a1306562f7f59c4c3c8892ddd50fdf992 # HEAD on 2024-02-24
|
||||
vcpkgGitCommitId: 74e6536215718009aae747d86d84b78376bf9e09 # HEAD on 2025-10-17
|
||||
|
||||
- name: configure
|
||||
run: cmake ${{ matrix.flags }}
|
||||
|
||||
14
.github/workflows/gradle.yml
vendored
14
.github/workflows/gradle.yml
vendored
@@ -52,11 +52,11 @@ jobs:
|
||||
run: echo "EXTRA_GRADLE_ARGS=-PreleaseMode" >> $GITHUB_ENV
|
||||
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '2027')
|
||||
- name: Build with Gradle
|
||||
uses: addnab/docker-run-action@v3
|
||||
uses: addnab/docker-run-action@3e77f186b7a929ef010f183a9e24c0f9955ea609
|
||||
with:
|
||||
image: ${{ matrix.container }}
|
||||
options: -v ${{ github.workspace }}:/work -w /work -e ARTIFACTORY_PUBLISH_USERNAME -e ARTIFACTORY_PUBLISH_PASSWORD -e GITHUB_REF -e CI
|
||||
run: df . && rm -f semicolon_delimited_script && echo $GITHUB_REF && ./gradlew build --build-cache -PbuildServer -PskipJavaFormat ${{ matrix.build-options }} ${{ env.EXTRA_GRADLE_ARGS }}
|
||||
run: df . && echo $GITHUB_REF && ./gradlew build --build-cache -PbuildServer -PskipJavaFormat ${{ matrix.build-options }} ${{ env.EXTRA_GRADLE_ARGS }}
|
||||
env:
|
||||
ARTIFACTORY_PUBLISH_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PUBLISH_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
build-options: "-PciReleaseOnly -Pbuildwinarm64 -Ponlywindowsarm64"
|
||||
task: "copyAllOutputs"
|
||||
outputs: "build/allOutputs"
|
||||
- os: macOS-14
|
||||
- os: macOS-15
|
||||
artifact-name: macOS
|
||||
architecture: aarch64
|
||||
task: "build"
|
||||
@@ -153,7 +153,7 @@ jobs:
|
||||
if: matrix.os == 'windows-2022'
|
||||
- name: Check disk free space pre-cleanup (macOS)
|
||||
run: df -h .
|
||||
if: matrix.os == 'macOS-14'
|
||||
if: matrix.os == 'macOS-15'
|
||||
- name: Cleanup disk space
|
||||
# CodeQL: 5G
|
||||
# go: 748M
|
||||
@@ -162,10 +162,10 @@ jobs:
|
||||
rm -rf /Users/runner/hostedtoolcache/CodeQL
|
||||
rm -rf /Users/runner/hostedtoolcache/go
|
||||
rm -rf /Users/runner/Library/Android
|
||||
if: matrix.os == 'macOS-14'
|
||||
if: matrix.os == 'macOS-15'
|
||||
- name: Check disk free space post-cleanup (macOS)
|
||||
run: df -h .
|
||||
if: matrix.os == 'macOS-14'
|
||||
if: matrix.os == 'macOS-15'
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew ${{ matrix.task }} --build-cache -PbuildServer -PskipJavaFormat ${{ matrix.build-options }} ${{ env.EXTRA_GRADLE_ARGS }}
|
||||
env:
|
||||
@@ -181,7 +181,7 @@ jobs:
|
||||
if: matrix.os == 'windows-2022'
|
||||
- name: Check disk free space (macOS)
|
||||
run: df -h .
|
||||
if: matrix.os == 'macOS-14'
|
||||
if: matrix.os == 'macOS-15'
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.artifact-name }}
|
||||
|
||||
4
.github/workflows/lint-format.yml
vendored
4
.github/workflows/lint-format.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
- name: Install wpiformat
|
||||
run: |
|
||||
python -m venv ${{ runner.temp }}/wpiformat
|
||||
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.34
|
||||
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.36
|
||||
- name: Run
|
||||
run: ${{ runner.temp }}/wpiformat/bin/wpiformat
|
||||
- name: Check output
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
- name: Install wpiformat
|
||||
run: |
|
||||
python -m venv ${{ runner.temp }}/wpiformat
|
||||
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.34
|
||||
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.36
|
||||
- name: Create compile_commands.json
|
||||
run: |
|
||||
./gradlew generateCompileCommands -Ptoolchain-optional-roboRio
|
||||
|
||||
14
.github/workflows/sentinel-build.yml
vendored
14
.github/workflows/sentinel-build.yml
vendored
@@ -53,11 +53,11 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build with Gradle
|
||||
uses: addnab/docker-run-action@v3
|
||||
uses: addnab/docker-run-action@3e77f186b7a929ef010f183a9e24c0f9955ea609
|
||||
with:
|
||||
image: ${{ matrix.container }}
|
||||
options: -v ${{ github.workspace }}:/work -w /work -e GITHUB_REF -e CI
|
||||
run: df . && rm -f semicolon_delimited_script && echo $GITHUB_REF && ./gradlew build -PbuildServer -PskipJavaFormat ${{ matrix.build-options }}
|
||||
run: df . && echo $GITHUB_REF && ./gradlew build -PbuildServer -PskipJavaFormat ${{ matrix.build-options }}
|
||||
- name: Check free disk space
|
||||
run: df .
|
||||
- uses: actions/upload-artifact@v4
|
||||
@@ -97,7 +97,7 @@ jobs:
|
||||
build-options: "-PciReleaseOnly -Pbuildwinarm64 -Ponlywindowsarm64"
|
||||
task: "copyAllOutputs"
|
||||
outputs: "build/allOutputs"
|
||||
- os: macOS-14
|
||||
- os: macOS-15
|
||||
artifact-name: macOS
|
||||
architecture: aarch64
|
||||
task: "build"
|
||||
@@ -146,7 +146,7 @@ jobs:
|
||||
if: matrix.os == 'windows-2022'
|
||||
- name: Check disk free space pre-cleanup (macOS)
|
||||
run: df -h .
|
||||
if: matrix.os == 'macOS-14'
|
||||
if: matrix.os == 'macOS-15'
|
||||
- name: Cleanup disk space
|
||||
# CodeQL: 5G
|
||||
# go: 748M
|
||||
@@ -155,10 +155,10 @@ jobs:
|
||||
rm -rf /Users/runner/hostedtoolcache/CodeQL
|
||||
rm -rf /Users/runner/hostedtoolcache/go
|
||||
rm -rf /Users/runner/Library/Android
|
||||
if: matrix.os == 'macOS-14'
|
||||
if: matrix.os == 'macOS-15'
|
||||
- name: Check disk free space post-cleanup (macOS)
|
||||
run: df -h .
|
||||
if: matrix.os == 'macOS-14'
|
||||
if: matrix.os == 'macOS-15'
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew ${{ matrix.task }} -PbuildServer -PskipJavaFormat ${{ matrix.build-options }}
|
||||
- name: Sign Libraries with Developer ID
|
||||
@@ -170,7 +170,7 @@ jobs:
|
||||
if: matrix.os == 'windows-2022'
|
||||
- name: Check disk free space (macOS)
|
||||
run: df -h .
|
||||
if: matrix.os == 'macOS-14'
|
||||
if: matrix.os == 'macOS-15'
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.artifact-name }}
|
||||
|
||||
2
.github/workflows/tools.yml
vendored
2
.github/workflows/tools.yml
vendored
@@ -7,7 +7,7 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
YEAR: 2025
|
||||
YEAR: 2026
|
||||
|
||||
jobs:
|
||||
build-artifacts:
|
||||
|
||||
@@ -351,7 +351,9 @@ endif()
|
||||
if(WITH_WPILIB)
|
||||
set(APRILTAG_DEP_REPLACE "find_dependency(apriltag)")
|
||||
set(WPILIBC_DEP_REPLACE "find_dependency(wpilibc)")
|
||||
set(WPILIBJ_DEP_REPLACE "find_dependency(wpilibj)")
|
||||
if(WITH_JAVA)
|
||||
set(WPILIBJ_DEP_REPLACE "find_dependency(wpilibj)")
|
||||
endif()
|
||||
set(WPILIBNEWCOMMANDS_DEP_REPLACE "find_dependency(wpilibNewCommands)")
|
||||
add_subdirectory(apriltag)
|
||||
add_subdirectory(wpilibj)
|
||||
|
||||
@@ -13,7 +13,7 @@ This article contains instructions on building projects using a development buil
|
||||
|
||||
Development builds are the per-commit build hosted every time a commit is pushed to the [allwpilib](https://github.com/wpilibsuite/allwpilib/) repository. These builds are then hosted on [artifactory](https://frcmaven.wpi.edu/artifactory/webapp/#/home).
|
||||
|
||||
To build a project using a development build, find the build.gradle file and open it. Then, add the following code below the plugin section and replace YEAR with the year of the development version. It is also necessary to use a 2025 GradleRIO version, ie `2025.1.1-beta-1`
|
||||
To build a project using a development build, find the build.gradle file and open it. Then, add the following code below the plugin section and replace YEAR with the year of the development version. It is also necessary to use a 2026 GradleRIO version, ie `2026.1.1`
|
||||
|
||||
```groovy
|
||||
wpi.maven.useLocal = false
|
||||
@@ -28,13 +28,13 @@ Java
|
||||
```groovy
|
||||
plugins {
|
||||
id "java"
|
||||
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-1"
|
||||
id "edu.wpi.first.GradleRIO" version "2026.1.1"
|
||||
}
|
||||
|
||||
wpi.maven.useLocal = false
|
||||
wpi.maven.useDevelopment = true
|
||||
wpi.versions.wpilibVersion = '2025.+'
|
||||
wpi.versions.wpimathVersion = '2025.+'
|
||||
wpi.versions.wpilibVersion = '2026.+'
|
||||
wpi.versions.wpimathVersion = '2026.+'
|
||||
```
|
||||
|
||||
C++
|
||||
@@ -42,13 +42,13 @@ C++
|
||||
plugins {
|
||||
id "cpp"
|
||||
id "google-test-test-suite"
|
||||
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-1"
|
||||
id "edu.wpi.first.GradleRIO" version "2026.1.1"
|
||||
}
|
||||
|
||||
wpi.maven.useLocal = false
|
||||
wpi.maven.useDevelopment = true
|
||||
wpi.versions.wpilibVersion = '2025.+'
|
||||
wpi.versions.wpimathVersion = '2025.+'
|
||||
wpi.versions.wpilibVersion = '2026.+'
|
||||
wpi.versions.wpimathVersion = '2026.+'
|
||||
```
|
||||
|
||||
### Development Build Documentation
|
||||
@@ -64,7 +64,7 @@ Java
|
||||
```groovy
|
||||
plugins {
|
||||
id "java"
|
||||
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-1"
|
||||
id "edu.wpi.first.GradleRIO" version "2026.1.1"
|
||||
}
|
||||
|
||||
wpi.maven.useLocal = false
|
||||
@@ -78,7 +78,7 @@ C++
|
||||
plugins {
|
||||
id "cpp"
|
||||
id "google-test-test-suite"
|
||||
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-1"
|
||||
id "edu.wpi.first.GradleRIO" version "2026.1.1"
|
||||
}
|
||||
|
||||
wpi.maven.useLocal = false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2009-2025 FIRST and other WPILib contributors
|
||||
Copyright (c) 2009-2026 FIRST and other WPILib contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -50,7 +50,7 @@ Using Gradle makes building WPILib very straightforward. It only has a few depen
|
||||
- C++ compiler
|
||||
- On Linux, install GCC 11 or greater
|
||||
- On Windows, install [Visual Studio Community 2022](https://visualstudio.microsoft.com/vs/community/) and select the C++ programming language during installation (Gradle can't use the build tools for Visual Studio)
|
||||
- On macOS 13.3 or newer, install Xcode 14 or later (the command-line build tools are insufficient).
|
||||
- On macOS, install the Xcode command-line build tools via `xcode-select --install`. Xcode 14 or later is required.
|
||||
- ARM compiler toolchain
|
||||
- Run `./gradlew installRoboRioToolchain` after cloning this repository
|
||||
- If the WPILib installer was used, this toolchain is already installed
|
||||
|
||||
@@ -255,8 +255,9 @@ bool UsbCameraImpl::CheckDeviceChange(WPARAM wParam, DEV_BROADCAST_HDR* pHdr,
|
||||
}
|
||||
|
||||
void UsbCameraImpl::DeviceDisconnect() {
|
||||
if (m_connectVerbose)
|
||||
if (m_connectVerbose) {
|
||||
SINFO("Disconnected from {}", m_path);
|
||||
}
|
||||
m_sourceReader.Reset();
|
||||
m_mediaSource.Reset();
|
||||
if (m_imageCallback) {
|
||||
@@ -655,8 +656,9 @@ void UsbCameraImpl::DeviceCacheProperty(
|
||||
rawProp->valueStr = perProp->valueStr; // copy
|
||||
} else {
|
||||
// Read current raw value and set percentage from it
|
||||
if (!rawProp->DeviceGet(lock, pProcAmp))
|
||||
if (!rawProp->DeviceGet(lock, pProcAmp)) {
|
||||
SWARNING("failed to get property {}", rawProp->name);
|
||||
}
|
||||
|
||||
if (perProp) {
|
||||
perProp->SetValue(RawToPercentage(*rawProp, rawProp->value));
|
||||
@@ -666,8 +668,9 @@ void UsbCameraImpl::DeviceCacheProperty(
|
||||
|
||||
// Set value on device if user-configured
|
||||
if (rawProp->valueSet) {
|
||||
if (!rawProp->DeviceSet(lock, pProcAmp))
|
||||
if (!rawProp->DeviceSet(lock, pProcAmp)) {
|
||||
SWARNING("failed to set property {}", rawProp->name);
|
||||
}
|
||||
}
|
||||
|
||||
// Update pointers since we released the lock
|
||||
|
||||
@@ -47,20 +47,29 @@ cppProjectZips.add(project(':romiVendordep').cppHeadersZip)
|
||||
cppProjectZips.add(project(':xrpVendordep').cppHeadersZip)
|
||||
|
||||
doxygen {
|
||||
// Doxygen binaries are only provided for x86_64 platforms
|
||||
// Other platforms will need to provide doxygen via their system
|
||||
// See below maven and https://doxygen.nl/download.html for provided binaries
|
||||
// Ensure theme.css (from https://github.com/jothepro/doxygen-awesome-css) is compatible with
|
||||
// doxygen version when updating
|
||||
// Doxygen binaries are only provided for x86_64 platforms. Other platforms
|
||||
// will need to use a local Doxygen install.
|
||||
//
|
||||
// executeByVersion() fetches Doxygen binaries from
|
||||
// https://frcmaven.wpi.edu/ui/native/generic-release-mirror/doxygen/, which
|
||||
// is a mirror of binaries from https://doxygen.nl/download.html.
|
||||
//
|
||||
// To mirror a new Doxygen version, retrigger the GitHub Actions workflow in
|
||||
// https://github.com/wpilibsuite/doxygen-mirror with the desired version
|
||||
// number as an input.
|
||||
//
|
||||
// Ensure theme.css (from https://github.com/jothepro/doxygen-awesome-css)
|
||||
// is compatible with Doxygen version when updating.
|
||||
executables {
|
||||
doxygen {
|
||||
// Note: has no effect if not on an x86_64 platform - you need to have a global install available on your
|
||||
// PATH for the doxygen plugin to run
|
||||
// Note: has no effect if not on an x86_64 platform - you need to
|
||||
// have a global install available on your PATH for the Doxygen
|
||||
// plugin to run.
|
||||
executableByVersion('1.12.0')
|
||||
|
||||
String arch = System.getProperty("os.arch");
|
||||
if (!(arch.equals("x86_64") || arch.equals("amd64"))) {
|
||||
// Search for a local doxygen install
|
||||
// Search for a local Doxygen install
|
||||
executableBySearchPath('doxygen')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ kFramework_AdvantageKit = 7
|
||||
kFramework_MagicBot = 8
|
||||
kFramework_KitBotTraditional = 9
|
||||
kFramework_KitBotInline = 10
|
||||
kFramework_Everybot = 11
|
||||
kRobotDrive_ArcadeStandard = 1
|
||||
kRobotDrive_ArcadeButtonSpin = 2
|
||||
kRobotDrive_ArcadeRatioCurve = 3
|
||||
|
||||
@@ -125,3 +125,12 @@ kResourceType_ThriftyNova = 123
|
||||
kResourceType_RevServoHub = 124
|
||||
kResourceType_PWFSEN36005 = 125
|
||||
kResourceType_LaserShark = 126
|
||||
kResourceType_YAMS = 127
|
||||
kResourceType_LEDPattern = 128
|
||||
kResourceType_LinearQuadraticRegulator = 129
|
||||
kResourceType_KalmanFilter = 130
|
||||
kResourceType_PoseEstimator = 131
|
||||
kResourceType_PoseEstimator3d = 132
|
||||
kResourceType_LinearSystemLoop = 133
|
||||
kResourceType_LumynLabs_ConnectorX = 134
|
||||
kResourceType_LumynLabs_ConnectorXAnimate = 135
|
||||
|
||||
@@ -273,6 +273,24 @@ public final class FRCNetComm {
|
||||
public static final int kResourceType_PWFSEN36005 = 125;
|
||||
/** kResourceType_LaserShark = 126. */
|
||||
public static final int kResourceType_LaserShark = 126;
|
||||
/** kResourceType_YAMS = 127. */
|
||||
public static final int kResourceType_YAMS = 127;
|
||||
/** kResourceType_LEDPattern = 128. */
|
||||
public static final int kResourceType_LEDPattern = 128;
|
||||
/** kResourceType_LinearQuadraticRegulator = 129. */
|
||||
public static final int kResourceType_LinearQuadraticRegulator = 129;
|
||||
/** kResourceType_KalmanFilter = 130. */
|
||||
public static final int kResourceType_KalmanFilter = 130;
|
||||
/** kResourceType_PoseEstimator = 131. */
|
||||
public static final int kResourceType_PoseEstimator = 131;
|
||||
/** kResourceType_PoseEstimator3d = 132. */
|
||||
public static final int kResourceType_PoseEstimator3d = 132;
|
||||
/** kResourceType_LinearSystemLoop = 133. */
|
||||
public static final int kResourceType_LinearSystemLoop = 133;
|
||||
/** kResourceType_LumynLabs_ConnectorX = 134. */
|
||||
public static final int kResourceType_LumynLabs_ConnectorX = 134;
|
||||
/** kResourceType_LumynLabs_ConnectorXAnimate = 135. */
|
||||
public static final int kResourceType_LumynLabs_ConnectorXAnimate = 135;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -321,6 +339,8 @@ public final class FRCNetComm {
|
||||
public static final int kFramework_KitBotTraditional = 9;
|
||||
/** kFramework_KitBotInline = 10. */
|
||||
public static final int kFramework_KitBotInline = 10;
|
||||
/** kFramework_Everybot = 11. */
|
||||
public static final int kFramework_Everybot = 11;
|
||||
/** kRobotDrive_ArcadeStandard = 1. */
|
||||
public static final int kRobotDrive_ArcadeStandard = 1;
|
||||
/** kRobotDrive_ArcadeButtonSpin = 2. */
|
||||
|
||||
@@ -178,6 +178,15 @@ namespace HALUsageReporting {
|
||||
kResourceType_RevServoHub = 124,
|
||||
kResourceType_PWFSEN36005 = 125,
|
||||
kResourceType_LaserShark = 126,
|
||||
kResourceType_YAMS = 127,
|
||||
kResourceType_LEDPattern = 128,
|
||||
kResourceType_LinearQuadraticRegulator = 129,
|
||||
kResourceType_KalmanFilter = 130,
|
||||
kResourceType_PoseEstimator = 131,
|
||||
kResourceType_PoseEstimator3d = 132,
|
||||
kResourceType_LinearSystemLoop = 133,
|
||||
kResourceType_LumynLabs_ConnectorX = 134,
|
||||
kResourceType_LumynLabs_ConnectorXAnimate = 135,
|
||||
};
|
||||
enum tInstances : int32_t {
|
||||
kLanguage_LabVIEW = 1,
|
||||
@@ -199,6 +208,7 @@ namespace HALUsageReporting {
|
||||
kFramework_MagicBot = 8,
|
||||
kFramework_KitBotTraditional = 9,
|
||||
kFramework_KitBotInline = 10,
|
||||
kFramework_Everybot = 11,
|
||||
kRobotDrive_ArcadeStandard = 1,
|
||||
kRobotDrive_ArcadeButtonSpin = 2,
|
||||
kRobotDrive_ArcadeRatioCurve = 3,
|
||||
|
||||
@@ -147,6 +147,15 @@ typedef enum
|
||||
kResourceType_RevServoHub = 124,
|
||||
kResourceType_PWFSEN36005 = 125,
|
||||
kResourceType_LaserShark = 126,
|
||||
kResourceType_YAMS = 127,
|
||||
kResourceType_LEDPattern = 128,
|
||||
kResourceType_LinearQuadraticRegulator = 129,
|
||||
kResourceType_KalmanFilter = 130,
|
||||
kResourceType_PoseEstimator = 131,
|
||||
kResourceType_PoseEstimator3d = 132,
|
||||
kResourceType_LinearSystemLoop = 133,
|
||||
kResourceType_LumynLabs_ConnectorX = 134,
|
||||
kResourceType_LumynLabs_ConnectorXAnimate = 135,
|
||||
|
||||
// kResourceType_MaximumID = 255,
|
||||
} tResourceType;
|
||||
@@ -172,6 +181,7 @@ typedef enum
|
||||
kFramework_MagicBot = 8,
|
||||
kFramework_KitBotTraditional = 9,
|
||||
kFramework_KitBotInline = 10,
|
||||
kFramework_Everybot = 11,
|
||||
kRobotDrive_ArcadeStandard = 1,
|
||||
kRobotDrive_ArcadeButtonSpin = 2,
|
||||
kRobotDrive_ArcadeRatioCurve = 3,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "Romi-Vendordep",
|
||||
"version": "1.0.0",
|
||||
"uuid": "1010372a-b446-46f4-b229-61e53a26a7dc",
|
||||
"frcYear": "2026beta",
|
||||
"frcYear": "2026",
|
||||
"mavenUrls": [],
|
||||
"jsonUrl": "",
|
||||
"javaDependencies": [
|
||||
|
||||
@@ -14,7 +14,7 @@ nativeUtils {
|
||||
wpi {
|
||||
configureDependencies {
|
||||
opencvYear = "frc2025"
|
||||
niLibVersion = "2025.2.0"
|
||||
niLibVersion = "2026.1.0"
|
||||
opencvVersion = "4.10.0-3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ extern "C" {
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
int HALSIM_InitExtension(void) {
|
||||
int HALSIM_InitExtension(void) {
|
||||
static bool once = false;
|
||||
|
||||
if (once) {
|
||||
|
||||
@@ -45,7 +45,7 @@ extern "C" {
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
int HALSIM_InitExtension(void) {
|
||||
int HALSIM_InitExtension(void) {
|
||||
std::puts("Simulator GUI Initializing.");
|
||||
|
||||
gui::CreateContext();
|
||||
|
||||
@@ -57,13 +57,9 @@
|
||||
HALSIM_Cancel##cbname##Callback(m_index, m_callback); \
|
||||
} \
|
||||
\
|
||||
int32_t GetIndex() const { \
|
||||
return m_index; \
|
||||
} \
|
||||
int32_t GetIndex() const { return m_index; } \
|
||||
\
|
||||
int GetChannel() const { \
|
||||
return m_channel; \
|
||||
} \
|
||||
int GetChannel() const { return m_channel; } \
|
||||
\
|
||||
private: \
|
||||
static void CallbackFunc(const char*, void* param, \
|
||||
@@ -100,13 +96,9 @@
|
||||
HALSIM_Cancel##cbname##Callback(m_index, m_channel, m_callback); \
|
||||
} \
|
||||
\
|
||||
int32_t GetIndex() const { \
|
||||
return m_index; \
|
||||
} \
|
||||
int32_t GetIndex() const { return m_index; } \
|
||||
\
|
||||
int32_t GetChannel() const { \
|
||||
return m_channel; \
|
||||
} \
|
||||
int32_t GetChannel() const { return m_channel; } \
|
||||
\
|
||||
private: \
|
||||
static void CallbackFunc(const char*, void* param, \
|
||||
|
||||
@@ -18,7 +18,7 @@ extern "C" {
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
|
||||
int HALSIM_InitExtension(void) {
|
||||
int HALSIM_InitExtension(void) {
|
||||
std::puts("HALSim WS Client Extension Initializing");
|
||||
|
||||
HAL_OnShutdown(nullptr, [](void*) { gClient.reset(); });
|
||||
|
||||
@@ -18,7 +18,7 @@ extern "C" {
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
int HALSIM_InitExtension(void) {
|
||||
int HALSIM_InitExtension(void) {
|
||||
std::puts("Websocket WS Server Initializing.");
|
||||
|
||||
HAL_OnShutdown(nullptr, [](void*) { gServer.reset(); });
|
||||
|
||||
@@ -25,7 +25,7 @@ extern "C" {
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
|
||||
int HALSIM_InitExtension(void) {
|
||||
int HALSIM_InitExtension(void) {
|
||||
std::puts("HALSim XRP Extension Initializing");
|
||||
|
||||
HAL_OnShutdown(nullptr, [](void*) { gClient.reset(); });
|
||||
|
||||
@@ -2,49 +2,32 @@
|
||||
<FindBugsFilter>
|
||||
<Match>
|
||||
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.DriverStation" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.Ultrasonic" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.Watchdog" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.wpilibj.DriverStation" />
|
||||
<Class name="edu.wpi.first.wpilibj.Ultrasonic" />
|
||||
<Class name="edu.wpi.first.wpilibj.Watchdog" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16448_IMU" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16470_IMU" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.DriverStation" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.GenericHID" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.Ultrasonic" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.motorcontrol.NidecBrushless" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.CommandScheduler" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16448_IMU" />
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16470_IMU" />
|
||||
<Class name="edu.wpi.first.wpilibj.DriverStation" />
|
||||
<Class name="edu.wpi.first.wpilibj.GenericHID" />
|
||||
<Class name="edu.wpi.first.wpilibj.Ultrasonic" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.CommandScheduler" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="CT_CONSTRUCTOR_THROW" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="DCN_NULLPOINTER_EXCEPTION" />
|
||||
<Or>
|
||||
<Bug pattern="DCN_NULLPOINTER_EXCEPTION" />
|
||||
<Bug pattern="SING_SINGLETON_GETTER_NOT_SYNCHRONIZED" />
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
</Or>
|
||||
<Class name="edu.wpi.first.wpilibj.test.TestSuite" />
|
||||
</Match>
|
||||
<Match>
|
||||
@@ -53,16 +36,32 @@
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="DM_DEFAULT_ENCODING" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.epilogue.processor.EpilogueGenerator" />
|
||||
<Class name="edu.wpi.first.wpilibj.examples.i2ccommunication.I2CCommunicationTest" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.PrintCommandTest" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.wpilibj.Filesystem" />
|
||||
<Class name="edu.wpi.first.wpilibj.DataLogManager" />
|
||||
<Class name="edu.wpi.first.util.CombinedRuntimeLoader" />
|
||||
<Class name="edu.wpi.first.util.RuntimeDetector" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<!--
|
||||
These are false positives where the Random instance is used multiple times in a loop. Futhermore, high randomness is not a
|
||||
high priority because these are tests- In fact, the odometry tests seed the Random instance to guarantee repeatability.
|
||||
-->
|
||||
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="EC_BAD_ARRAY_COMPARE" />
|
||||
<Class name="edu.wpi.first.math.estimator.SwerveDrivePoseEstimator$InterpolationRecord" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.math.kinematics.SwerveDriveOdometry3dTest" />
|
||||
<Class name="edu.wpi.first.math.kinematics.SwerveDriveOdometryTest" />
|
||||
<Class name="edu.wpi.first.math.filter.LinearFilterTest" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="EI_EXPOSE_REP" />
|
||||
@@ -81,15 +80,24 @@
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="FL_FLOATS_AS_LOOP_COUNTERS" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.math.controller.DifferentialDriveAccelerationLimiterTest" />
|
||||
<Class name="edu.wpi.first.math.controller.ImplicitModelFollowerTest" />
|
||||
<Class name="edu.wpi.first.math.controller.LinearSystemLoopTest" />
|
||||
<Class name="~edu\.wpi\.first\.math\.estimator\.[^.]*PoseEstimator(3d)?Test" />
|
||||
<Class name="edu.wpi.first.math.filter.LinearFilterTest" />
|
||||
<Class name="edu.wpi.first.math.kinematics.ChassisSpeedsTest" />
|
||||
<Class name="edu.wpi.first.wpilibj.AnalogPotentiometerTest" />
|
||||
<Class name="edu.wpi.first.wpilibj.DMATest" />
|
||||
<Class name="edu.wpi.first.wpilibj.LEDPatternTest" />
|
||||
<Class name="edu.wpi.first.wpilibj.simulation.AnalogInputSimTest" />
|
||||
<Class name="edu.wpi.first.wpilibj.simulation.AnalogOutputSimTest" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||
<Class name="edu.wpi.first.wpilibj.smartdashboard.MechanismLigament2d" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="MS_CANNOT_BE_FINAL" />
|
||||
<Class name="edu.wpi.first.wpilibj.examples.pacgoat.Robot" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="MS_EXPOSE_REP" />
|
||||
</Match>
|
||||
@@ -98,46 +106,33 @@
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NM_CLASS_NAMING_CONVENTION" />
|
||||
<Class name="edu.wpi.first.hal.FRCNetComm$tInstances" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NM_CLASS_NAMING_CONVENTION" />
|
||||
<Class name="edu.wpi.first.hal.FRCNetComm$tResourceType" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.hal.FRCNetComm$tInstances" />
|
||||
<Class name="edu.wpi.first.hal.FRCNetComm$tResourceType" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<!--
|
||||
This seems to be a false positive from the &= used by these command compositions to determine runsWhenDisabled
|
||||
-->
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelCommandGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelDeadlineGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelRaceGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ProxyScheduleCommand" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.SequentialCommandGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.SelectCommand" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelCommandGroup" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelDeadlineGroup" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelRaceGroup" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.SequentialCommandGroup" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.SelectCommand" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
|
||||
<Class name="edu.wpi.first.wpilibj.test.AntJunitLauncher" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
|
||||
<Class name="edu.wpi.first.util.CombinedRuntimeLoader" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.wpilibj.test.AntJunitLauncher" />
|
||||
<Class name="edu.wpi.first.util.CombinedRuntimeLoader" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED" />
|
||||
@@ -145,78 +140,49 @@
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SC_START_IN_CTOR" />
|
||||
<Class name="edu.wpi.first.wpilibj.MotorSafety" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SF_SWITCH_FALLTHROUGH" />
|
||||
<Class name="edu.wpi.first.cameraserver.CameraServer$PropertyPublisher" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_GETTER_NOT_SYNCHRONIZED" />
|
||||
<Class name="edu.wpi.first.wpilibj.test.TestSuite" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.wpilibj.test.TestSuite" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.CommandScheduler" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.math.geometry.CoordinateAxis" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.math.geometry.CoordinateSystem" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.wpilibj2.command.CommandScheduler" />
|
||||
<Class name="edu.wpi.first.math.geometry.CoordinateAxis" />
|
||||
<Class name="edu.wpi.first.math.geometry.CoordinateSystem" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA" />
|
||||
<Class name="edu.wpi.first.wpilibj.Ultrasonic" />
|
||||
</Match>
|
||||
<Match>
|
||||
<!--
|
||||
Many false positives from instance reporting.
|
||||
-->
|
||||
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="THROWS_METHOD_THROWS_CLAUSE_THROWABLE" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="THROWS_METHOD_THROWS_RUNTIMEEXCEPTION" />
|
||||
</Match>
|
||||
<Match>
|
||||
<!--
|
||||
False positives because the users are supposed to fill in the code.
|
||||
-->
|
||||
<Bug pattern="UC_USELESS_VOID_METHOD" />
|
||||
<Class name="edu.wpi.first.wpilibj.templates.romitimed.Robot" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="UC_USELESS_VOID_METHOD" />
|
||||
<Class name="edu.wpi.first.wpilibj.templates.xrptimed.Robot" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="UC_USELESS_VOID_METHOD" />
|
||||
<Class name="edu.wpi.first.wpilibj.templates.timed.Robot" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="UC_USELESS_VOID_METHOD" />
|
||||
<Class name="edu.wpi.first.wpilibj.templates.timeslice.Robot" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="UC_USELESS_VOID_METHOD" />
|
||||
<Class name="edu.wpi.first.wpilibj.templates.timesliceskeleton.Robot" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.wpilibj.templates.romitimed.Robot" />
|
||||
<Class name="edu.wpi.first.wpilibj.templates.xrptimed.Robot" />
|
||||
<Class name="edu.wpi.first.wpilibj.templates.timed.Robot" />
|
||||
<Class name="edu.wpi.first.wpilibj.templates.timeslice.Robot" />
|
||||
<Class name="edu.wpi.first.wpilibj.templates.timesliceskeleton.Robot" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="URF_UNREAD_FIELD" />
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16448_IMU" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="URF_UNREAD_FIELD" />
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16470_IMU" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="URF_UNREAD_FIELD" />
|
||||
<Class name="edu.wpi.first.wpilibj.AnalogTrigger" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16448_IMU" />
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16470_IMU" />
|
||||
</Or>
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" />
|
||||
@@ -227,5 +193,14 @@
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="VA_FORMAT_STRING_USES_NEWLINE" />
|
||||
<Or>
|
||||
<Class name="edu.wpi.first.epilogue.processor.LoggableHandler" />
|
||||
<Class name="edu.wpi.first.util.MsvcRuntimeException" />
|
||||
<Class name="edu.wpi.first.util.RuntimeLoader" />
|
||||
<Class name="edu.wpi.first.wpilibj.Tracer" />
|
||||
<Class name="edu.wpi.first.wpilibj.Watchdog" />
|
||||
<Class name="edu.wpi.first.math.system.LinearSystem" />
|
||||
<Class name="edu.wpi.first.math.trajectory.Trajectory" />
|
||||
</Or>
|
||||
</Match>
|
||||
</FindBugsFilter>
|
||||
|
||||
@@ -251,17 +251,17 @@ OLSResult CalculateFeedforwardGains(const Storage& data,
|
||||
|
||||
if (type == analysis::kArm) {
|
||||
// dx/dt = -Kv/Ka x + 1/Ka u - Ks/Ka sgn(x)
|
||||
// - Kg/Ka cos(offset) cos(angle) NOLINT
|
||||
// + Kg/Ka sin(offset) sin(angle) NOLINT
|
||||
// dx/dt = αx + βu + γ sgn(x) + δ cos(angle) + ε sin(angle) NOLINT
|
||||
// - Kg/Ka cos(offset) cos(angle)
|
||||
// + Kg/Ka sin(offset) sin(angle)
|
||||
// dx/dt = αx + βu + γ sgn(x) + δ cos(angle) + ε sin(angle)
|
||||
|
||||
// δ = -Kg/Ka cos(offset)
|
||||
// ε = Kg/Ka sin(offset)
|
||||
double δ = ols.coeffs[3];
|
||||
double ε = ols.coeffs[4];
|
||||
|
||||
// Kg = hypot(δ, ε)/β NOLINT
|
||||
// offset = atan2(ε, -δ) NOLINT
|
||||
// Kg = hypot(δ, ε)/β
|
||||
// offset = atan2(ε, -δ)
|
||||
gains.emplace_back(std::hypot(δ, ε) / β);
|
||||
gains.emplace_back(std::atan2(ε, -δ));
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@ class Analyzer : public glass::View {
|
||||
*/
|
||||
static constexpr const char* kPresetNames[] = {"Default",
|
||||
"WPILib",
|
||||
"CTRE Phoenix 5 CANcoder",
|
||||
"CTRE Phoenix 5",
|
||||
"CTRE Phoenix 6",
|
||||
"REV Brushless Encoder Port",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sat, 7 May 2022 22:09:18 -0400
|
||||
Subject: [PATCH 01/37] Remove StringRef, ArrayRef, and Optional
|
||||
Subject: [PATCH 01/36] Remove StringRef, ArrayRef, and Optional
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/PointerUnion.h | 1 -
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sat, 7 May 2022 22:12:41 -0400
|
||||
Subject: [PATCH 02/37] Wrap std::min/max calls in parens, for Windows warnings
|
||||
Subject: [PATCH 02/36] Wrap std::min/max calls in parens, for Windows warnings
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/DenseMap.h | 4 ++--
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sat, 7 May 2022 22:13:55 -0400
|
||||
Subject: [PATCH 03/37] Change unique_function storage size
|
||||
Subject: [PATCH 03/36] Change unique_function storage size
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/FunctionExtras.h | 4 ++--
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sat, 7 May 2022 22:17:19 -0400
|
||||
Subject: [PATCH 04/37] Threading updates
|
||||
Subject: [PATCH 04/36] Threading updates
|
||||
|
||||
- Remove guards for threads and exception
|
||||
- Prefer scope gaurd over lock gaurd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sat, 7 May 2022 22:28:13 -0400
|
||||
Subject: [PATCH 05/37] \#ifdef guard safety
|
||||
Subject: [PATCH 05/36] \#ifdef guard safety
|
||||
|
||||
Prevents redefinition if someone is pulling in real LLVM, since the macros are in global namespace
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sat, 7 May 2022 22:37:34 -0400
|
||||
Subject: [PATCH 06/37] Explicitly use std::
|
||||
Subject: [PATCH 06/36] Explicitly use std::
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/SmallSet.h | 2 +-
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sat, 7 May 2022 22:53:50 -0400
|
||||
Subject: [PATCH 07/37] Remove format_provider
|
||||
Subject: [PATCH 07/36] Remove format_provider
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/Chrono.h | 114 ------------------------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sun, 8 May 2022 13:34:07 -0400
|
||||
Subject: [PATCH 08/37] Add compiler warning pragmas
|
||||
Subject: [PATCH 08/36] Add compiler warning pragmas
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/FunctionExtras.h | 11 +++++++++++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sun, 8 May 2022 13:43:50 -0400
|
||||
Subject: [PATCH 09/37] Remove unused functions
|
||||
Subject: [PATCH 09/36] Remove unused functions
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/SmallString.h | 77 ------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Thu, 5 May 2022 23:18:34 -0400
|
||||
Subject: [PATCH 10/37] Detemplatize SmallVectorBase
|
||||
Subject: [PATCH 10/36] Detemplatize SmallVectorBase
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/SmallVector.h | 35 ++++++++++-----------------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sun, 8 May 2022 13:48:59 -0400
|
||||
Subject: [PATCH 11/37] Add vectors to raw_ostream
|
||||
Subject: [PATCH 11/36] Add vectors to raw_ostream
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/raw_ostream.h | 115 ++++++++++++++++++++++++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Tue, 3 May 2022 22:16:10 -0400
|
||||
Subject: [PATCH 12/37] Extra collections features
|
||||
Subject: [PATCH 12/36] Extra collections features
|
||||
|
||||
---
|
||||
llvm/lib/Support/raw_ostream.cpp | 8 ++++++++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Thu, 5 May 2022 18:09:45 -0400
|
||||
Subject: [PATCH 14/37] Delete numbers from MathExtras
|
||||
Subject: [PATCH 13/36] Delete numbers from MathExtras
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/MathExtras.h | 36 --------------------------
|
||||
@@ -1,22 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Wed, 4 May 2022 00:01:00 -0400
|
||||
Subject: [PATCH 13/37] EpochTracker ABI macro
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/EpochTracker.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/llvm/include/llvm/ADT/EpochTracker.h b/llvm/include/llvm/ADT/EpochTracker.h
|
||||
index fc41d6f2c92d2f9876c741067b5645a74663db04..56d0acda2c1a0e390cfed086fa298b650c4a561f 100644
|
||||
--- a/llvm/include/llvm/ADT/EpochTracker.h
|
||||
+++ b/llvm/include/llvm/ADT/EpochTracker.h
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
namespace llvm {
|
||||
|
||||
-#if LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
+#ifndef NDEBUG //ifndef LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
#define LLVM_DEBUGEPOCHBASE_HANDLEBASE_EMPTYBASE
|
||||
|
||||
/// A base class for data structure classes wishing to make iterators
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Tue, 3 May 2022 22:50:24 -0400
|
||||
Subject: [PATCH 15/37] Add lerp and sgn
|
||||
Subject: [PATCH 14/36] Add lerp and sgn
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/MathExtras.h | 21 +++++++++++++++++++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sun, 8 May 2022 16:38:11 -0400
|
||||
Subject: [PATCH 16/37] Fixup includes
|
||||
Subject: [PATCH 15/36] Fixup includes
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/PointerLikeTypeTraits.h | 1 +
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sun, 8 May 2022 16:42:09 -0400
|
||||
Subject: [PATCH 17/37] Use std::is_trivially_copy_constructible
|
||||
Subject: [PATCH 16/36] Use std::is_trivially_copy_constructible
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/type_traits.h | 16 ----------------
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Tue, 3 May 2022 20:22:38 -0400
|
||||
Subject: [PATCH 18/37] Windows support
|
||||
Subject: [PATCH 17/36] Windows support
|
||||
|
||||
---
|
||||
.../llvm/Support/Windows/WindowsSupport.h | 45 +++++----
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Tue, 17 Sep 2024 21:19:52 -0700
|
||||
Subject: [PATCH 19/37] Remove call to RtlGetLastNtStatus()
|
||||
Subject: [PATCH 18/36] Remove call to RtlGetLastNtStatus()
|
||||
|
||||
---
|
||||
llvm/lib/Support/ErrorHandling.cpp | 23 -----------------------
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sun, 8 May 2022 16:46:20 -0400
|
||||
Subject: [PATCH 20/37] Prefer fmtlib
|
||||
Subject: [PATCH 19/36] Prefer fmtlib
|
||||
|
||||
---
|
||||
llvm/lib/Support/ErrorHandling.cpp | 20 ++++++--------------
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sun, 8 May 2022 16:49:36 -0400
|
||||
Subject: [PATCH 21/37] Prefer wpi's fs.h
|
||||
Subject: [PATCH 20/36] Prefer wpi's fs.h
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/raw_ostream.h | 7 ++-----
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sun, 8 May 2022 19:16:51 -0400
|
||||
Subject: [PATCH 22/37] Remove unused functions
|
||||
Subject: [PATCH 21/36] Remove unused functions
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/raw_ostream.h | 5 +-
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sun, 8 May 2022 19:30:43 -0400
|
||||
Subject: [PATCH 23/37] OS-specific changes
|
||||
Subject: [PATCH 22/36] OS-specific changes
|
||||
|
||||
---
|
||||
llvm/lib/Support/ErrorHandling.cpp | 16 +++++++---------
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Mon, 9 May 2022 00:04:30 -0400
|
||||
Subject: [PATCH 24/37] Use SmallVector for UTF conversion
|
||||
Subject: [PATCH 23/36] Use SmallVector for UTF conversion
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/ConvertUTF.h | 6 +++---
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Thu, 19 May 2022 00:58:36 -0400
|
||||
Subject: [PATCH 25/37] Prefer to use static pointers in raw_ostream
|
||||
Subject: [PATCH 24/36] Prefer to use static pointers in raw_ostream
|
||||
|
||||
See #1401
|
||||
---
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Fri, 1 Mar 2024 11:56:17 -0800
|
||||
Subject: [PATCH 26/37] constexpr endian byte swap
|
||||
Subject: [PATCH 25/36] constexpr endian byte swap
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/Endian.h | 4 +++-
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Wed, 10 Aug 2022 17:07:52 -0700
|
||||
Subject: [PATCH 27/37] Copy type traits from STLExtras.h into PointerUnion.h
|
||||
Subject: [PATCH 26/36] Copy type traits from STLExtras.h into PointerUnion.h
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/PointerUnion.h | 46 ++++++++++++++++++++++++++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Leander Schulten <Leander.Schulten@rwth-aachen.de>
|
||||
Date: Mon, 10 Jul 2023 00:53:43 +0200
|
||||
Subject: [PATCH 28/37] Unused variable in release mode
|
||||
Subject: [PATCH 27/36] Unused variable in release mode
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/DenseMap.h | 2 +-
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Tue, 11 Jul 2023 22:56:09 -0700
|
||||
Subject: [PATCH 29/37] Use C++20 <bit> header
|
||||
Subject: [PATCH 28/36] Use C++20 <bit> header
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/DenseMap.h | 3 +-
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Sun, 30 Jul 2023 14:17:37 -0700
|
||||
Subject: [PATCH 30/37] Remove DenseMap GTest printer test
|
||||
Subject: [PATCH 29/36] Remove DenseMap GTest printer test
|
||||
|
||||
LLVM modifies internal GTest headers to support it, which we can't do.
|
||||
---
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Johnson <johnson.peter@gmail.com>
|
||||
Date: Sun, 29 Oct 2023 23:00:08 -0700
|
||||
Subject: [PATCH 31/37] raw_ostream: Add SetNumBytesInBuffer
|
||||
Subject: [PATCH 30/36] raw_ostream: Add SetNumBytesInBuffer
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/raw_ostream.h | 5 +++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Tue, 17 Sep 2024 15:30:31 -0700
|
||||
Subject: [PATCH 32/37] raw_ostream: Replace errnoAsErrorCode()
|
||||
Subject: [PATCH 31/36] raw_ostream: Replace errnoAsErrorCode()
|
||||
|
||||
---
|
||||
llvm/lib/Support/raw_ostream.cpp | 4 ++--
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Johnson <johnson.peter@gmail.com>
|
||||
Date: Sat, 2 Dec 2023 15:21:32 -0800
|
||||
Subject: [PATCH 33/37] type_traits.h: Add is_constexpr()
|
||||
Subject: [PATCH 32/36] type_traits.h: Add is_constexpr()
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/type_traits.h | 5 +++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Sun, 17 Mar 2024 14:51:11 -0700
|
||||
Subject: [PATCH 34/37] Remove auto-conversion from raw_ostream
|
||||
Subject: [PATCH 33/36] Remove auto-conversion from raw_ostream
|
||||
|
||||
---
|
||||
llvm/lib/Support/raw_ostream.cpp | 11 +----------
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Tue, 18 Jun 2024 09:07:33 -0700
|
||||
Subject: [PATCH 35/37] Add SmallVector erase_if()
|
||||
Subject: [PATCH 34/36] Add SmallVector erase_if()
|
||||
|
||||
---
|
||||
llvm/include/llvm/ADT/SmallVector.h | 8 ++++++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Sat, 13 Jul 2024 15:24:30 -0700
|
||||
Subject: [PATCH 36/37] Fix AlignedCharArrayUnion for C++23
|
||||
Subject: [PATCH 35/36] Fix AlignedCharArrayUnion for C++23
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/AlignOf.h | 14 +++++---------
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Mon, 23 Dec 2024 22:56:29 -0800
|
||||
Subject: [PATCH 37/37] Fix minIntN() and maxIntN() assertions
|
||||
Subject: [PATCH 36/36] Fix minIntN() and maxIntN() assertions
|
||||
|
||||
---
|
||||
llvm/include/llvm/Support/MathExtras.h | 4 ++--
|
||||
@@ -19,10 +19,7 @@ def copy_upstream_src(wpilib_root: Path):
|
||||
# Copy Sleipnir files into allwpilib
|
||||
walk_cwd_and_copy_if(
|
||||
lambda dp, f: (has_prefix(dp, Path("include")) or has_prefix(dp, Path("src")))
|
||||
or f == ".clang-format"
|
||||
or f == ".clang-tidy"
|
||||
or f == ".styleguide"
|
||||
or f == ".styleguide-license",
|
||||
and f not in [".styleguide", ".styleguide-license"],
|
||||
wpimath / "src/main/native/thirdparty/sleipnir",
|
||||
)
|
||||
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
"protobuf",
|
||||
"libssh"
|
||||
],
|
||||
"builtin-baseline": "37c3e63a1306562f7f59c4c3c8892ddd50fdf992"
|
||||
"builtin-baseline": "74e6536215718009aae747d86d84b78376bf9e09"
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "WPILib-New-Commands",
|
||||
"version": "1.0.0",
|
||||
"uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266",
|
||||
"frcYear": "2026beta",
|
||||
"frcYear": "2026",
|
||||
"mavenUrls": [],
|
||||
"jsonUrl": "",
|
||||
"javaDependencies": [
|
||||
|
||||
@@ -25,8 +25,7 @@ namespace frc2 {
|
||||
* std::unique_ptr<Command>, use CommandPtr::Unwrap to convert.
|
||||
* CommandPtr::UnwrapVector does the same for vectors.
|
||||
*/
|
||||
class [[nodiscard]]
|
||||
CommandPtr final {
|
||||
class [[nodiscard]] CommandPtr final {
|
||||
public:
|
||||
explicit CommandPtr(std::unique_ptr<Command>&& command);
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/DMC60.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
DMC60::DMC60(int channel) : PWMMotorController("DMC60", channel) {
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_DigilentDMC60, GetChannel() + 1);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/Jaguar.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
Jaguar::Jaguar(int channel) : PWMMotorController("Jaguar", channel) {
|
||||
m_pwm.SetBounds(2.31_ms, 1.55_ms, 1.507_ms, 1.454_ms, 0.697_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_Jaguar, GetChannel() + 1);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/SD540.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
SD540::SD540(int channel) : PWMMotorController("SD540", channel) {
|
||||
m_pwm.SetBounds(2.05_ms, 1.55_ms, 1.5_ms, 1.44_ms, 0.94_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_MindsensorsSD540, GetChannel() + 1);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/Victor.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
Victor::Victor(int channel) : PWMMotorController("Victor", channel) {
|
||||
m_pwm.SetBounds(2.027_ms, 1.525_ms, 1.507_ms, 1.49_ms, 1.026_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_2X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_Victor, GetChannel() + 1);
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Digilent DMC 60 Motor Controller with PWM control.
|
||||
*
|
||||
* Note that the DMC 60 uses the following bounds for PWM values. These
|
||||
* values should work reasonably well for most controllers, but if users
|
||||
* experience issues such as asymmetric behavior around the deadband or
|
||||
* inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the DMC 60 User
|
||||
* Manual available from Digilent.
|
||||
*
|
||||
* \li 2.004ms = full "forward"
|
||||
* \li 1.520ms = the "high end" of the deadband range
|
||||
* \li 1.500ms = center of the deadband range (off)
|
||||
* \li 1.480ms = the "low end" of the deadband range
|
||||
* \li 0.997ms = full "reverse"
|
||||
*/
|
||||
class DMC60 : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Constructor for a DMC 60 connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the DMC 60 is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
*/
|
||||
explicit DMC60(int channel);
|
||||
|
||||
DMC60(DMC60&&) = default;
|
||||
DMC60& operator=(DMC60&&) = default;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
@@ -1,43 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Luminary Micro / Vex Robotics Jaguar Motor Controller with PWM control.
|
||||
*
|
||||
* Note that the Jaguar uses the following bounds for PWM values. These
|
||||
* values should work reasonably well for most controllers, but if users
|
||||
* experience issues such as asymmetric behavior around the deadband or
|
||||
* inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Jaguar User
|
||||
* Manual available from Luminary Micro / Vex Robotics.
|
||||
*
|
||||
* \li 2.310ms = full "forward"
|
||||
* \li 1.550ms = the "high end" of the deadband range
|
||||
* \li 1.507ms = center of the deadband range (off)
|
||||
* \li 1.454ms = the "low end" of the deadband range
|
||||
* \li 0.697ms = full "reverse"
|
||||
*/
|
||||
class Jaguar : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Constructor for a Jaguar connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the Jaguar is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
*/
|
||||
explicit Jaguar(int channel);
|
||||
|
||||
Jaguar(Jaguar&&) = default;
|
||||
Jaguar& operator=(Jaguar&&) = default;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
@@ -1,43 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Mindsensors SD540 Motor Controller with PWM control.
|
||||
*
|
||||
* Note that the SD540 uses the following bounds for PWM values. These
|
||||
* values should work reasonably well for most controllers, but if users
|
||||
* experience issues such as asymmetric behavior around the deadband or
|
||||
* inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the SD540 User
|
||||
* Manual available from Mindsensors.
|
||||
*
|
||||
* \li 2.050ms = full "forward"
|
||||
* \li 1.550ms = the "high end" of the deadband range
|
||||
* \li 1.500ms = center of the deadband range (off)
|
||||
* \li 1.440ms = the "low end" of the deadband range
|
||||
* \li 0.940ms = full "reverse"
|
||||
*/
|
||||
class SD540 : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Constructor for a SD540 connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the SD540 is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
*/
|
||||
explicit SD540(int channel);
|
||||
|
||||
SD540(SD540&&) = default;
|
||||
SD540& operator=(SD540&&) = default;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
@@ -1,43 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Vex Robotics Victor 888 Motor Controller with PWM control.
|
||||
*
|
||||
* Note that the Victor 888 uses the following bounds for PWM values. These
|
||||
* values should work reasonably well for most controllers, but if users
|
||||
* experience issues such as asymmetric behavior around the deadband or
|
||||
* inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Victor 888 User
|
||||
* Manual available from Vex Robotics.
|
||||
*
|
||||
* \li 2.027ms = full "forward"
|
||||
* \li 1.525ms = the "high end" of the deadband range
|
||||
* \li 1.507ms = center of the deadband range (off)
|
||||
* \li 1.490ms = the "low end" of the deadband range
|
||||
* \li 1.026ms = full "reverse"
|
||||
*/
|
||||
class Victor : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Constructor for a Victor 888 connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the Victor 888 is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
*/
|
||||
explicit Victor(int channel);
|
||||
|
||||
Victor(Victor&&) = default;
|
||||
Victor& operator=(Victor&&) = default;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
#include <wpi/MathExtras.h>
|
||||
#include <wpi/timestamp.h>
|
||||
|
||||
@@ -21,7 +22,9 @@ using namespace frc;
|
||||
LEDPattern::LEDPattern(std::function<void(frc::LEDPattern::LEDReader,
|
||||
std::function<void(int, frc::Color)>)>
|
||||
impl)
|
||||
: m_impl(std::move(impl)) {}
|
||||
: m_impl(std::move(impl)) {
|
||||
HAL_Report(HALUsageReporting::kResourceType_LEDPattern, 1);
|
||||
}
|
||||
|
||||
void LEDPattern::ApplyTo(LEDPattern::LEDReader reader,
|
||||
std::function<void(int, frc::Color)> writer) const {
|
||||
|
||||
@@ -182,6 +182,10 @@ void Notifier::StartPeriodic(units::second_t period) {
|
||||
UpdateAlarm();
|
||||
}
|
||||
|
||||
void Notifier::StartPeriodic(units::hertz_t frequency) {
|
||||
StartPeriodic(1 / frequency);
|
||||
}
|
||||
|
||||
void Notifier::Stop() {
|
||||
std::scoped_lock lock(m_processMutex);
|
||||
m_periodic = false;
|
||||
|
||||
@@ -91,6 +91,8 @@ TimedRobot::TimedRobot(units::second_t period) : IterativeRobotBase(period) {
|
||||
HALUsageReporting::kFramework_Timed);
|
||||
}
|
||||
|
||||
TimedRobot::TimedRobot(units::hertz_t frequency) : TimedRobot{1 / frequency} {}
|
||||
|
||||
TimedRobot::~TimedRobot() {
|
||||
if (m_notifier != HAL_kInvalidHandle) {
|
||||
int32_t status = 0;
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include "frc/motorcontrol/NidecBrushless.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
#include <wpi/sendable/SendableBuilder.h>
|
||||
#include <wpi/sendable/SendableRegistry.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
WPI_IGNORE_DEPRECATED
|
||||
|
||||
NidecBrushless::NidecBrushless(int pwmChannel, int dioChannel)
|
||||
: m_dio(dioChannel), m_pwm(pwmChannel) {
|
||||
wpi::SendableRegistry::AddChild(this, &m_dio);
|
||||
wpi::SendableRegistry::AddChild(this, &m_pwm);
|
||||
SetExpiration(0_s);
|
||||
SetSafetyEnabled(false);
|
||||
|
||||
// the dio controls the output (in PWM mode)
|
||||
m_dio.SetPWMRate(15625);
|
||||
m_dio.EnablePWM(0.5);
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_NidecBrushless, pwmChannel + 1);
|
||||
wpi::SendableRegistry::AddLW(this, "Nidec Brushless", pwmChannel);
|
||||
}
|
||||
|
||||
WPI_UNIGNORE_DEPRECATED
|
||||
|
||||
void NidecBrushless::Set(double speed) {
|
||||
if (!m_disabled) {
|
||||
m_speed = speed;
|
||||
m_dio.UpdateDutyCycle(0.5 + 0.5 * (m_isInverted ? -speed : speed));
|
||||
m_pwm.SetAlwaysHighMode();
|
||||
}
|
||||
Feed();
|
||||
}
|
||||
|
||||
double NidecBrushless::Get() const {
|
||||
return m_speed;
|
||||
}
|
||||
|
||||
void NidecBrushless::SetInverted(bool isInverted) {
|
||||
m_isInverted = isInverted;
|
||||
}
|
||||
|
||||
bool NidecBrushless::GetInverted() const {
|
||||
return m_isInverted;
|
||||
}
|
||||
|
||||
void NidecBrushless::Disable() {
|
||||
m_disabled = true;
|
||||
m_dio.UpdateDutyCycle(0.5);
|
||||
m_pwm.SetDisabled();
|
||||
}
|
||||
|
||||
void NidecBrushless::Enable() {
|
||||
m_disabled = false;
|
||||
}
|
||||
|
||||
void NidecBrushless::StopMotor() {
|
||||
m_dio.UpdateDutyCycle(0.5);
|
||||
m_pwm.SetDisabled();
|
||||
}
|
||||
|
||||
std::string NidecBrushless::GetDescription() const {
|
||||
return fmt::format("Nidec {}", GetChannel());
|
||||
}
|
||||
|
||||
int NidecBrushless::GetChannel() const {
|
||||
return m_pwm.GetChannel();
|
||||
}
|
||||
|
||||
void NidecBrushless::InitSendable(wpi::SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("Nidec Brushless");
|
||||
builder.SetActuator(true);
|
||||
builder.SetSafeState([=, this] { StopMotor(); });
|
||||
builder.AddDoubleProperty(
|
||||
"Value", [=, this] { return Get(); },
|
||||
[=, this](double value) { Set(value); });
|
||||
}
|
||||
@@ -88,7 +88,7 @@ units::ampere_t ElevatorSim::GetCurrentDraw() const {
|
||||
double kA = 1.0 / m_plant.B(1, 0);
|
||||
using Kv_t = units::unit_t<units::compound_unit<
|
||||
units::volt, units::inverse<units::meters_per_second>>>;
|
||||
Kv_t Kv = Kv_t{kA * m_plant.A(1, 1)};
|
||||
Kv_t Kv = Kv_t{-kA * m_plant.A(1, 1)};
|
||||
units::meters_per_second_t velocity{m_x(1)};
|
||||
units::radians_per_second_t motorVelocity = velocity * Kv * m_gearbox.Kv;
|
||||
|
||||
|
||||
@@ -146,6 +146,22 @@ class WPILibMathShared : public wpi::math::MathShared {
|
||||
HAL_Report(HALUsageReporting::kResourceType_PathWeaverTrajectory,
|
||||
count);
|
||||
break;
|
||||
case wpi::math::MathUsageId::kController_LinearQuadraticRegulator:
|
||||
HAL_Report(HALUsageReporting::kResourceType_LinearQuadraticRegulator,
|
||||
count);
|
||||
break;
|
||||
case wpi::math::MathUsageId::kEstimator_KalmanFilter:
|
||||
HAL_Report(HALUsageReporting::kResourceType_KalmanFilter, count);
|
||||
break;
|
||||
case wpi::math::MathUsageId::kEstimator_PoseEstimator:
|
||||
HAL_Report(HALUsageReporting::kResourceType_PoseEstimator, count);
|
||||
break;
|
||||
case wpi::math::MathUsageId::kEstimator_PoseEstimator3d:
|
||||
HAL_Report(HALUsageReporting::kResourceType_PoseEstimator3d, count);
|
||||
break;
|
||||
case wpi::math::MathUsageId::kSystem_LinearSystemLoop:
|
||||
HAL_Report(HALUsageReporting::kResourceType_LinearSystemLoop, count);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include <hal/Types.h>
|
||||
#include <units/frequency.h>
|
||||
#include <units/time.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
@@ -107,6 +108,17 @@ class Notifier {
|
||||
*/
|
||||
void StartPeriodic(units::second_t period);
|
||||
|
||||
/**
|
||||
* Run the callback periodically with the given frequency.
|
||||
*
|
||||
* The user-provided callback should be written so that it completes before
|
||||
* the next time it's scheduled to run.
|
||||
*
|
||||
* @param frequency Frequency after which to call the callback starting one
|
||||
* period after the call to this method.
|
||||
*/
|
||||
void StartPeriodic(units::hertz_t frequency);
|
||||
|
||||
/**
|
||||
* Stop further callback invocations.
|
||||
*
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <hal/Notifier.h>
|
||||
#include <hal/Types.h>
|
||||
#include <units/frequency.h>
|
||||
#include <units/math.h>
|
||||
#include <units/time.h>
|
||||
#include <wpi/priority_queue.h>
|
||||
@@ -47,10 +48,17 @@ class TimedRobot : public IterativeRobotBase {
|
||||
/**
|
||||
* Constructor for TimedRobot.
|
||||
*
|
||||
* @param period Period.
|
||||
* @param period The period of the robot loop function.
|
||||
*/
|
||||
explicit TimedRobot(units::second_t period = kDefaultPeriod);
|
||||
|
||||
/**
|
||||
* Constructor for TimedRobot.
|
||||
*
|
||||
* @param frequency The frequency of the robot loop function.
|
||||
*/
|
||||
explicit TimedRobot(units::hertz_t frequency);
|
||||
|
||||
TimedRobot(TimedRobot&&) = default;
|
||||
TimedRobot& operator=(TimedRobot&&) = default;
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class DifferentialDrive : public RobotDriveBase,
|
||||
* Construct a DifferentialDrive.
|
||||
*
|
||||
* To pass multiple motors per side, use CAN motor controller followers or
|
||||
* PWMSpeedController::AddFollower(). If a motor needs to be inverted, do so
|
||||
* PWMMotorController::AddFollower(). If a motor needs to be inverted, do so
|
||||
* before passing it in.
|
||||
*
|
||||
* @param leftMotor Left motor.
|
||||
@@ -91,7 +91,7 @@ class DifferentialDrive : public RobotDriveBase,
|
||||
* Construct a DifferentialDrive.
|
||||
*
|
||||
* To pass multiple motors per side, use CAN motor controller followers or
|
||||
* PWMSpeedController::AddFollower(). If a motor needs to be inverted, do so
|
||||
* PWMMotorController::AddFollower(). If a motor needs to be inverted, do so
|
||||
* before passing it in.
|
||||
*
|
||||
* @param leftMotor Left motor setter.
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <wpi/deprecated.h>
|
||||
#include <wpi/sendable/Sendable.h>
|
||||
#include <wpi/sendable/SendableHelper.h>
|
||||
|
||||
#include "frc/DigitalOutput.h"
|
||||
#include "frc/MotorSafety.h"
|
||||
#include "frc/PWM.h"
|
||||
#include "frc/motorcontrol/MotorController.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
WPI_IGNORE_DEPRECATED
|
||||
|
||||
/**
|
||||
* Nidec Brushless Motor.
|
||||
*/
|
||||
class NidecBrushless : public MotorController,
|
||||
public MotorSafety,
|
||||
public wpi::Sendable,
|
||||
public wpi::SendableHelper<NidecBrushless> {
|
||||
public:
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param pwmChannel The PWM channel that the Nidec Brushless controller is
|
||||
* attached to. 0-9 are on-board, 10-19 are on the MXP port.
|
||||
* @param dioChannel The DIO channel that the Nidec Brushless controller is
|
||||
* attached to. 0-9 are on-board, 10-25 are on the MXP port.
|
||||
*/
|
||||
NidecBrushless(int pwmChannel, int dioChannel);
|
||||
|
||||
~NidecBrushless() override = default;
|
||||
|
||||
NidecBrushless(NidecBrushless&&) = default;
|
||||
NidecBrushless& operator=(NidecBrushless&&) = default;
|
||||
|
||||
// MotorController interface
|
||||
/**
|
||||
* Set the PWM value.
|
||||
*
|
||||
* The PWM value is set using a range of -1.0 to 1.0, appropriately scaling
|
||||
* the value for the FPGA.
|
||||
*
|
||||
* @param speed The speed value between -1.0 and 1.0 to set.
|
||||
*/
|
||||
void Set(double speed) override;
|
||||
|
||||
/**
|
||||
* Get the recently set value of the PWM.
|
||||
*
|
||||
* @return The most recently set value for the PWM between -1.0 and 1.0.
|
||||
*/
|
||||
double Get() const override;
|
||||
|
||||
void SetInverted(bool isInverted) override;
|
||||
|
||||
bool GetInverted() const override;
|
||||
|
||||
/**
|
||||
* Disable the motor. The Enable() function must be called to re-enable the
|
||||
* motor.
|
||||
*/
|
||||
void Disable() override;
|
||||
|
||||
/**
|
||||
* Re-enable the motor after Disable() has been called. The Set() function
|
||||
* must be called to set a new motor speed.
|
||||
*/
|
||||
void Enable();
|
||||
|
||||
// MotorSafety interface
|
||||
void StopMotor() override;
|
||||
std::string GetDescription() const override;
|
||||
|
||||
/**
|
||||
* Gets the channel number associated with the object.
|
||||
*
|
||||
* @return The channel number.
|
||||
*/
|
||||
int GetChannel() const;
|
||||
|
||||
// Sendable interface
|
||||
void InitSendable(wpi::SendableBuilder& builder) override;
|
||||
|
||||
private:
|
||||
bool m_isInverted = false;
|
||||
bool m_disabled = false;
|
||||
DigitalOutput m_dio;
|
||||
PWM m_pwm;
|
||||
double m_speed = 0.0;
|
||||
};
|
||||
|
||||
WPI_UNIGNORE_DEPRECATED
|
||||
|
||||
} // namespace frc
|
||||
@@ -204,14 +204,10 @@ enum class BuiltInWidgets {
|
||||
* The motor controller will be controllable from the dashboard when test mode
|
||||
* is enabled, but will otherwise be view-only. <br>Supported types: <ul>
|
||||
* <li>PWMMotorController</li>
|
||||
* <li>DMC60</li>
|
||||
* <li>Jaguar</li>
|
||||
* <li>PWMTalonSRX</li>
|
||||
* <li>PWMVictorSPX</li>
|
||||
* <li>SD540</li>
|
||||
* <li>Spark</li>
|
||||
* <li>Talon</li>
|
||||
* <li>Victor</li>
|
||||
* <li>VictorSP</li>
|
||||
* <li>MotorControllerGroup</li>
|
||||
* <li>Any custom subclass of {@code SpeedContorller}</li>
|
||||
|
||||
@@ -92,3 +92,15 @@ TEST(ElevatorSimTest, Stability) {
|
||||
frc::Vectord<1>{12.0}, 20_ms * 50)(0)},
|
||||
sim.GetPosition(), 1_cm);
|
||||
}
|
||||
|
||||
TEST(ElevatorSimTest, CurrentDraw) {
|
||||
auto const motor = frc::DCMotor::KrakenX60(2);
|
||||
frc::sim::ElevatorSim sim(motor, 20, 8_kg, 0.1_m, 0_m, 1_m, true, 0_m,
|
||||
{0.01, 0.0});
|
||||
|
||||
EXPECT_DOUBLE_EQ(0.0, sim.GetCurrentDraw().value());
|
||||
sim.SetInputVoltage(motor.Voltage(motor.Torque(60_A), 0_rad_per_s));
|
||||
sim.Update(100_ms);
|
||||
// current draw should start at 60 A and decrease as the back emf catches up
|
||||
EXPECT_TRUE(0_A < sim.GetCurrentDraw() && sim.GetCurrentDraw() < 60_A);
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ DriveSubsystem::DriveSubsystem()
|
||||
void DriveSubsystem::Periodic() {
|
||||
// Implementation of subsystem periodic method goes here.
|
||||
m_odometry.Update(m_gyro.GetRotation2d(),
|
||||
{m_frontLeft.GetPosition(), m_rearLeft.GetPosition(),
|
||||
m_frontRight.GetPosition(), m_rearRight.GetPosition()});
|
||||
{m_frontLeft.GetPosition(), m_frontRight.GetPosition(),
|
||||
m_rearLeft.GetPosition(), m_rearRight.GetPosition()});
|
||||
}
|
||||
|
||||
void DriveSubsystem::Drive(units::meters_per_second_t xSpeed,
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <frc/Encoder.h>
|
||||
#include <frc/TimedRobot.h>
|
||||
#include <frc/controller/ProfiledPIDController.h>
|
||||
#include <frc/controller/SimpleMotorFeedforward.h>
|
||||
#include <frc/motorcontrol/PWMSparkMax.h>
|
||||
#include <units/acceleration.h>
|
||||
#include <units/length.h>
|
||||
#include <units/velocity.h>
|
||||
#include <units/voltage.h>
|
||||
|
||||
/**
|
||||
* ProfiledPIDController with feedforward snippets for frc-docs.
|
||||
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/controllers/profiled-pidcontroller.html
|
||||
*/
|
||||
class Robot : public frc::TimedRobot {
|
||||
public:
|
||||
Robot() { m_encoder.SetDistancePerPulse(1.0 / 256.0); }
|
||||
|
||||
// Controls a simple motor's position using a SimpleMotorFeedforward
|
||||
// and a ProfiledPIDController
|
||||
void GoToPosition(units::meter_t goalPosition) {
|
||||
auto pidVal = m_controller.Calculate(
|
||||
units::meter_t{m_encoder.GetDistance()}, goalPosition);
|
||||
m_motor.SetVoltage(units::volt_t{pidVal} +
|
||||
m_feedforward.Calculate(
|
||||
m_lastSpeed, m_controller.GetSetpoint().velocity));
|
||||
m_lastSpeed = m_controller.GetSetpoint().velocity;
|
||||
}
|
||||
|
||||
void TeleopPeriodic() override {
|
||||
// Example usage: move to position 10.0 meters
|
||||
GoToPosition(10.0_m);
|
||||
}
|
||||
|
||||
private:
|
||||
frc::ProfiledPIDController<units::meters> m_controller{
|
||||
1.0, 0.0, 0.0, {5_mps, 10_mps_sq}};
|
||||
frc::SimpleMotorFeedforward<units::meters> m_feedforward{0.5_V, 1.5_V / 1_mps,
|
||||
0.3_V / 1_mps_sq};
|
||||
frc::Encoder m_encoder{0, 1};
|
||||
frc::PWMSparkMax m_motor{0};
|
||||
|
||||
units::meters_per_second_t m_lastSpeed = 0_mps;
|
||||
};
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() {
|
||||
return frc::StartRobot<Robot>();
|
||||
}
|
||||
#endif
|
||||
@@ -154,5 +154,15 @@
|
||||
],
|
||||
"foldername": "AccelerometerFilter",
|
||||
"gradlebase": "cpp"
|
||||
},
|
||||
{
|
||||
"name": "ProfiledPIDFeedforward",
|
||||
"description": "Snippets of ProfiledPIDController with feedforward for frc-docs.",
|
||||
"tags": [
|
||||
"PID",
|
||||
"Profiled PID"
|
||||
],
|
||||
"foldername": "ProfiledPIDFeedforward",
|
||||
"gradlebase": "cpp"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
|
||||
#include "TestBench.h"
|
||||
#include "frc/Timer.h"
|
||||
#include "frc/motorcontrol/Jaguar.h"
|
||||
#include "frc/motorcontrol/Talon.h"
|
||||
#include "frc/motorcontrol/Victor.h"
|
||||
|
||||
static constexpr auto kMotorDelay = 2.5_s;
|
||||
|
||||
@@ -23,8 +21,8 @@ class CounterTest : public testing::Test {
|
||||
frc::Counter m_victorCounter{TestBench::kVictorEncoderChannelA};
|
||||
frc::Counter m_jaguarCounter{TestBench::kJaguarEncoderChannelA};
|
||||
frc::Talon m_talon{TestBench::kVictorChannel};
|
||||
frc::Victor m_victor{TestBench::kTalonChannel};
|
||||
frc::Jaguar m_jaguar{TestBench::kJaguarChannel};
|
||||
frc::Talon m_victor{TestBench::kTalonChannel};
|
||||
frc::Talon m_jaguar{TestBench::kJaguarChannel};
|
||||
|
||||
void Reset() {
|
||||
m_talonCounter.Reset();
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "frc/DMASample.h"
|
||||
#include "frc/DigitalOutput.h"
|
||||
#include "frc/Timer.h"
|
||||
#include "frc/motorcontrol/Jaguar.h"
|
||||
#include "frc/motorcontrol/Talon.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
@@ -24,7 +24,7 @@ class DMATest : public testing::Test {
|
||||
AnalogInput m_analogInput{TestBench::kAnalogOutputChannel};
|
||||
AnalogOutput m_analogOutput{TestBench::kFakeAnalogOutputChannel};
|
||||
DigitalOutput m_manualTrigger{TestBench::kLoop1InputChannel};
|
||||
Jaguar m_pwm{TestBench::kFakePwmOutput};
|
||||
Talon m_pwm{TestBench::kFakePwmOutput};
|
||||
DMA m_dma;
|
||||
|
||||
void SetUp() override {
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#include "frc/Timer.h"
|
||||
#include "frc/controller/PIDController.h"
|
||||
#include "frc/filter/LinearFilter.h"
|
||||
#include "frc/motorcontrol/Jaguar.h"
|
||||
#include "frc/motorcontrol/Talon.h"
|
||||
#include "frc/motorcontrol/Victor.h"
|
||||
|
||||
enum MotorEncoderTestType { TEST_VICTOR, TEST_JAGUAR, TEST_TALON };
|
||||
|
||||
@@ -53,13 +51,13 @@ class MotorEncoderTest : public testing::TestWithParam<MotorEncoderTestType> {
|
||||
MotorEncoderTest() {
|
||||
switch (GetParam()) {
|
||||
case TEST_VICTOR:
|
||||
m_motorController = new frc::Victor(TestBench::kVictorChannel);
|
||||
m_motorController = new frc::Talon(TestBench::kVictorChannel);
|
||||
m_encoder = new frc::Encoder(TestBench::kVictorEncoderChannelA,
|
||||
TestBench::kVictorEncoderChannelB);
|
||||
break;
|
||||
|
||||
case TEST_JAGUAR:
|
||||
m_motorController = new frc::Jaguar(TestBench::kJaguarChannel);
|
||||
m_motorController = new frc::Talon(TestBench::kJaguarChannel);
|
||||
m_encoder = new frc::Encoder(TestBench::kJaguarEncoderChannelA,
|
||||
TestBench::kJaguarEncoderChannelB);
|
||||
break;
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
#include "TestBench.h"
|
||||
#include "frc/Encoder.h"
|
||||
#include "frc/Timer.h"
|
||||
#include "frc/motorcontrol/Jaguar.h"
|
||||
#include "frc/motorcontrol/Talon.h"
|
||||
#include "frc/motorcontrol/Victor.h"
|
||||
|
||||
enum MotorInvertingTestType { TEST_VICTOR, TEST_JAGUAR, TEST_TALON };
|
||||
|
||||
@@ -45,13 +43,13 @@ class MotorInvertingTest
|
||||
MotorInvertingTest() {
|
||||
switch (GetParam()) {
|
||||
case TEST_VICTOR:
|
||||
m_motorController = new frc::Victor(TestBench::kVictorChannel);
|
||||
m_motorController = new frc::Talon(TestBench::kVictorChannel);
|
||||
m_encoder = new frc::Encoder(TestBench::kVictorEncoderChannelA,
|
||||
TestBench::kVictorEncoderChannelB);
|
||||
break;
|
||||
|
||||
case TEST_JAGUAR:
|
||||
m_motorController = new frc::Jaguar(TestBench::kJaguarChannel);
|
||||
m_motorController = new frc::Talon(TestBench::kJaguarChannel);
|
||||
m_encoder = new frc::Encoder(TestBench::kJaguarEncoderChannelA,
|
||||
TestBench::kJaguarEncoderChannelB);
|
||||
break;
|
||||
|
||||
@@ -1,30 +1,4 @@
|
||||
[
|
||||
{
|
||||
"name": "DMC60",
|
||||
"Manufacturer": "Digilent",
|
||||
"DisplayName": "DMC 60",
|
||||
"ResourceName": "DigilentDMC60",
|
||||
"pulse_width_ms": {
|
||||
"max": 2.004,
|
||||
"deadbandMax": 1.520,
|
||||
"center": 1.500,
|
||||
"deadbandMin": 1.480,
|
||||
"min": 0.997
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Jaguar",
|
||||
"Manufacturer": "Luminary Micro / Vex Robotics",
|
||||
"DisplayName": "Jaguar",
|
||||
"ResourceName": "Jaguar",
|
||||
"pulse_width_ms": {
|
||||
"max": 2.310,
|
||||
"deadbandMax": 1.550,
|
||||
"center": 1.507,
|
||||
"deadbandMin": 1.454,
|
||||
"min": 0.697
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "PWMSparkFlex",
|
||||
"Manufacturer": "REV Robotics",
|
||||
@@ -103,19 +77,6 @@
|
||||
"min": 0.997
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SD540",
|
||||
"Manufacturer": "Mindsensors",
|
||||
"DisplayName": "SD540",
|
||||
"ResourceName": "MindsensorsSD540",
|
||||
"pulse_width_ms": {
|
||||
"max": 2.05,
|
||||
"deadbandMax": 1.55,
|
||||
"center": 1.50,
|
||||
"deadbandMin": 1.44,
|
||||
"min": 0.94
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Spark",
|
||||
"Manufacturer": "REV Robotics",
|
||||
@@ -142,20 +103,6 @@
|
||||
"min": 0.989
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Victor",
|
||||
"Manufacturer": "Vex Robotics",
|
||||
"DisplayName": "Victor 888",
|
||||
"ResourceName": "Victor",
|
||||
"PeriodMultiplier": 2,
|
||||
"pulse_width_ms": {
|
||||
"max": 2.027,
|
||||
"deadbandMax": 1.525,
|
||||
"center": 1.507,
|
||||
"deadbandMin": 1.490,
|
||||
"min": 1.026
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "VictorSP",
|
||||
"Manufacturer": "Vex Robotics",
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Digilent DMC 60 Motor Controller.
|
||||
*
|
||||
* <p>Note that the DMC 60 uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the DMC 60 User Manual available from
|
||||
* Digilent.
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.004ms = full "forward"
|
||||
* <li>1.520ms = the "high end" of the deadband range
|
||||
* <li>1.500ms = center of the deadband range (off)
|
||||
* <li>1.480ms = the "low end" of the deadband range
|
||||
* <li>0.997ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class DMC60 extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the DMC 60 is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DMC60(final int channel) {
|
||||
super("DMC60", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2004, 1520, 1500, 1480, 997);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_DigilentDMC60, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
package edu.wpi.first.wpilibj.motorcontrol;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.PWM;
|
||||
|
||||
/**
|
||||
* Luminary Micro / Vex Robotics Jaguar Motor Controller.
|
||||
*
|
||||
* <p>Note that the Jaguar uses the following bounds for PWM values. These values should work
|
||||
* reasonably well for most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Jaguar User Manual available from
|
||||
* Luminary Micro / Vex Robotics.
|
||||
*
|
||||
* <ul>
|
||||
* <li>2.310ms = full "forward"
|
||||
* <li>1.550ms = the "high end" of the deadband range
|
||||
* <li>1.507ms = center of the deadband range (off)
|
||||
* <li>1.454ms = the "low end" of the deadband range
|
||||
* <li>0.697ms = full "reverse"
|
||||
* </ul>
|
||||
*/
|
||||
public class Jaguar extends PWMMotorController {
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param channel The PWM channel that the Jaguar is attached to. 0-9 are on-board, 10-19
|
||||
* are on the MXP port
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Jaguar(final int channel) {
|
||||
super("Jaguar", channel);
|
||||
|
||||
m_pwm.setBoundsMicroseconds(2310, 1550, 1507, 1454, 697);
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
HAL.report(tResourceType.kResourceType_Jaguar, getChannel() + 1);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user