mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Upgrade wpiformat and use clang-format's include sorting (#8350)
This PR also uses the newly added -default-branch flag to generate the list of changed files with respect to the correct branch (2027).
This commit is contained in:
@@ -104,25 +104,52 @@ ForEachMacros:
|
||||
- BOOST_FOREACH
|
||||
IfMacros:
|
||||
- KJ_IF_MAYBE
|
||||
IncludeBlocks: Regroup
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
- Regex: '^<ext/.*\.h>'
|
||||
Priority: 2
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '^<.*\.h>'
|
||||
Priority: 1
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '^<.*'
|
||||
Priority: 2
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '.*'
|
||||
Priority: 3
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
IncludeIsMainRegex: '([-_](test|unittest))?$'
|
||||
# C standard library headers
|
||||
#
|
||||
# https://en.cppreference.com/w/cpp/header:
|
||||
# * C compatibility headers
|
||||
# * Special C compatibility headers
|
||||
# * Empty C headers
|
||||
# * Meaningless C headers
|
||||
# * Unsupported C headers
|
||||
- Regex: '^<(assert\.h|ctype\.h|errno\.h|fenv\.h|float\.h|inttypes\.h|limits\.h|locale\.h|math\.h|setjmp\.h|signal\.h|stdarg\.h|stddef\.h|stdint\.h|stdio\.h|stdlib\.h|string\.h|time\.h|uchar\.h|wchar\.h|wctype\.h|stdatomic\.h|ccomplex|complex\.h|ctgmath|tgmath\.h|ciso646|cstdalign|cstdbool|iso646\.h|stdalign\.h|stdbool\.h|stdatomic\.h|stdnoreturn\.h|threads\.h)>'
|
||||
Priority: 1
|
||||
SortPriority: 0
|
||||
# Linux system headers
|
||||
- Regex: '^<((arpa\/|linux\/|net/|netinet\/|sys\/).*|arm_neon\.h|dirent\.h|dlfcn\.h|fcntl\.h|ifaddrs\.h|jni\.h|libgen\.h|poll\.h|spawn\.h|termios\.h|unistd\.h)>'
|
||||
Priority: 1
|
||||
SortPriority: 1
|
||||
# winsock2.h
|
||||
- Regex: '^<winsock2\.h>'
|
||||
Priority: 1
|
||||
SortPriority: 2
|
||||
# windows.h
|
||||
- Regex: '^<windows.\h>'
|
||||
Priority: 1
|
||||
SortPriority: 3
|
||||
# Windows def.h headers
|
||||
- Regex: '^<(comdef\.h|ws2def\.h|ws2ipdef\.h)>'
|
||||
Priority: 1
|
||||
SortPriority: 4
|
||||
# Windows system headers
|
||||
- Regex: '^<(dbghelp\.h|dbt\.h|delayimp\.h|dshow\.h|io\.h|iphlpapi\.h|ks\.h|ksmedia\.h|memoryapi\.h|mfapi\.h|mferror\.h|mfidl\.h|mfreadwrite\.h|netioapi\.h|shellapi\.h|shlwapi\.h|sysinfoapi\.h|windns\.h|windowsx\.h|ws2tcpip\.h)>'
|
||||
Priority: 1
|
||||
SortPriority: 5
|
||||
# C++ standard library headers (lowercase and underscores with no .h suffix)
|
||||
- Regex: '^<([a-z_]+|cxxabi\.h)>'
|
||||
Priority: 2
|
||||
SortPriority: 6
|
||||
# Other library headers (angle brackets)
|
||||
- Regex: '^<.*'
|
||||
Priority: 3
|
||||
SortPriority: 7
|
||||
# Project headers (double quotes)
|
||||
- Regex: '^".*'
|
||||
Priority: 4
|
||||
SortPriority: 8
|
||||
IncludeIsMainRegex: '(Test|_bench|_test)?$'
|
||||
IncludeIsMainSourceRegex: ''
|
||||
IndentAccessModifiers: false
|
||||
IndentCaseBlocks: false
|
||||
@@ -213,7 +240,7 @@ RequiresClausePosition: OwnLine
|
||||
RequiresExpressionIndentation: OuterScope
|
||||
SeparateDefinitionBlocks: Leave
|
||||
ShortNamespaceLines: 1
|
||||
SortIncludes: false
|
||||
SortIncludes: true
|
||||
SortJavaStaticImport: Before
|
||||
SortUsingDeclarations: LexicographicNumeric
|
||||
SpaceAfterCStyleCast: false
|
||||
|
||||
18
.github/workflows/lint-format.yml
vendored
18
.github/workflows/lint-format.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
- name: Fetch all history and metadata
|
||||
run: |
|
||||
git checkout -b pr
|
||||
git branch -f main origin/main
|
||||
git branch -f 2027 origin/2027
|
||||
- name: Set up Python 3.12
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
@@ -36,9 +36,9 @@ jobs:
|
||||
- name: Install wpiformat
|
||||
run: |
|
||||
python -m venv ${{ runner.temp }}/wpiformat
|
||||
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.36
|
||||
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.48
|
||||
- name: Run
|
||||
run: ${{ runner.temp }}/wpiformat/bin/wpiformat
|
||||
run: ${{ runner.temp }}/wpiformat/bin/wpiformat -default-branch 2027
|
||||
- name: Check output
|
||||
run: git --no-pager diff --exit-code HEAD
|
||||
- name: Generate diff
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
run: |
|
||||
git config --global --add safe.directory /__w/allwpilib/allwpilib
|
||||
git checkout -b pr
|
||||
git branch -f main origin/main
|
||||
git branch -f 2027 origin/2027
|
||||
- name: Set up Python 3.12
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
@@ -78,18 +78,18 @@ jobs:
|
||||
- name: Install wpiformat
|
||||
run: |
|
||||
python -m venv ${{ runner.temp }}/wpiformat
|
||||
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.36
|
||||
${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2025.48
|
||||
- name: Create compile_commands.json
|
||||
run: |
|
||||
./gradlew generateCompileCommands -Ptoolchain-optional-roboRio
|
||||
./.github/workflows/fix_compile_commands.py build/TargetedCompileCommands/linuxx86-64release/compile_commands.json
|
||||
./.github/workflows/fix_compile_commands.py build/TargetedCompileCommands/linuxx86-64debug/compile_commands.json
|
||||
- name: List changed files
|
||||
run: ${{ runner.temp }}/wpiformat/bin/wpiformat -list-changed-files
|
||||
run: ${{ runner.temp }}/wpiformat/bin/wpiformat -default-branch 2027 -list-changed-files
|
||||
- name: Run clang-tidy release
|
||||
run: ${{ runner.temp }}/wpiformat/bin/wpiformat -no-format -tidy-changed -compile-commands=build/TargetedCompileCommands/linuxx86-64release
|
||||
run: ${{ runner.temp }}/wpiformat/bin/wpiformat -default-branch 2027 -no-format -tidy-changed -compile-commands=build/TargetedCompileCommands/linuxx86-64release
|
||||
- name: Run clang-tidy debug
|
||||
run: ${{ runner.temp }}/wpiformat/bin/wpiformat -no-format -tidy-changed -compile-commands=build/TargetedCompileCommands/linuxx86-64debug
|
||||
run: ${{ runner.temp }}/wpiformat/bin/wpiformat -default-branch 2027 -no-format -tidy-changed -compile-commands=build/TargetedCompileCommands/linuxx86-64debug
|
||||
javaformat:
|
||||
name: "Java format"
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -103,7 +103,7 @@ jobs:
|
||||
run: |
|
||||
git config --global --add safe.directory /__w/allwpilib/allwpilib
|
||||
git checkout -b pr
|
||||
git branch -f main origin/main
|
||||
git branch -f 2027 origin/2027
|
||||
- name: Run Java format
|
||||
run: ./gradlew javaFormat spotbugsMain spotbugsTest spotbugsDev
|
||||
- name: Check output
|
||||
|
||||
18
.styleguide
18
.styleguide
@@ -35,21 +35,3 @@ generatedFileExclude {
|
||||
repoRootNameOverride {
|
||||
wpilib
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^Eigen/
|
||||
^cameraserver/
|
||||
^cscore
|
||||
^fmt/
|
||||
^glass/
|
||||
^gtest/
|
||||
^imgui
|
||||
^implot
|
||||
^mockdata/
|
||||
^opencv2/
|
||||
^support/
|
||||
^units/
|
||||
^unsupported/
|
||||
^upb/
|
||||
^vision/
|
||||
}
|
||||
|
||||
@@ -8,13 +8,12 @@
|
||||
#include <cstring>
|
||||
|
||||
#define WPI_RAWFRAME_JNI
|
||||
#include "wpi/util/RawFrame.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "org_wpilib_vision_apriltag_jni_AprilTagJNI.h"
|
||||
#include "wpi/apriltag/AprilTag.hpp"
|
||||
#include "wpi/apriltag/AprilTagDetector.hpp"
|
||||
#include "wpi/apriltag/AprilTagPoseEstimator.hpp"
|
||||
#include "wpi/util/RawFrame.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace wpi::apriltag;
|
||||
using namespace wpi::util::java;
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// 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 <gtest/gtest.h>
|
||||
|
||||
#include "wpi/apriltag/AprilTagDetector.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
using namespace wpi::apriltag;
|
||||
|
||||
TEST(AprilTagDetectorTest, ConfigDefaults) {
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <benchmark/benchmark.h>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <sleipnir/optimization/problem.hpp>
|
||||
|
||||
#include "wpi/math/system/NumericalIntegration.hpp"
|
||||
|
||||
@@ -12,13 +12,6 @@ repoRootNameOverride {
|
||||
cameraserver
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^fmt/
|
||||
^gtest/
|
||||
^opencv2/
|
||||
^support/
|
||||
}
|
||||
|
||||
includeGuardRoots {
|
||||
cameraserver/src/main/native/include/
|
||||
}
|
||||
|
||||
@@ -15,14 +15,3 @@ repoRootNameOverride {
|
||||
generatedFileExclude {
|
||||
commandsv2/src/generated/
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^gtest/
|
||||
^imgui
|
||||
^mockdata/
|
||||
^networktables/
|
||||
^opencv2/
|
||||
^support/
|
||||
^units/
|
||||
^vision/
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
#include "wpi/commands2/ProxyCommand.hpp"
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "wpi/util/deprecated.hpp"
|
||||
#include "wpi/util/sendable/SendableBuilder.hpp"
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
// 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 "wpi/commands2/CommandPtr.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/CommandPtr.hpp"
|
||||
#include "wpi/commands2/CommandScheduler.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/system/Errors.hpp"
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
// 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 "wpi/commands2/ConditionalCommand.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/ConditionalCommand.hpp"
|
||||
#include "wpi/commands2/InstantCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
// 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 "wpi/commands2/DeferredCommand.hpp"
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/DeferredCommand.hpp"
|
||||
#include "wpi/commands2/FunctionalCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
// 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 "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/FunctionalCommand.hpp"
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
class FunctionalCommandTest : public CommandTestBase {};
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
// 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 "wpi/commands2/InstantCommand.hpp"
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/InstantCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
class InstantCommandTest : public CommandTestBase {};
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
// 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 "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/NotifierCommand.hpp"
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/commands2/button/POVButton.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/CommandScheduler.hpp"
|
||||
#include "wpi/commands2/RunCommand.hpp"
|
||||
#include "wpi/commands2/WaitUntilCommand.hpp"
|
||||
#include "wpi/commands2/button/POVButton.hpp"
|
||||
#include "wpi/driverstation/DriverStation.hpp"
|
||||
#include "wpi/driverstation/Joystick.hpp"
|
||||
#include "wpi/simulation/JoystickSim.hpp"
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/commands2/ParallelCommandGroup.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "CompositionTestBase.hpp"
|
||||
#include "wpi/commands2/InstantCommand.hpp"
|
||||
#include "wpi/commands2/ParallelCommandGroup.hpp"
|
||||
#include "wpi/commands2/WaitUntilCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "wpi/commands2/ParallelDeadlineGroup.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@@ -9,7 +11,6 @@
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "CompositionTestBase.hpp"
|
||||
#include "wpi/commands2/InstantCommand.hpp"
|
||||
#include "wpi/commands2/ParallelDeadlineGroup.hpp"
|
||||
#include "wpi/commands2/WaitUntilCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/commands2/ParallelRaceGroup.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "CompositionTestBase.hpp"
|
||||
#include "wpi/commands2/InstantCommand.hpp"
|
||||
#include "wpi/commands2/ParallelRaceGroup.hpp"
|
||||
#include "wpi/commands2/SequentialCommandGroup.hpp"
|
||||
#include "wpi/commands2/WaitUntilCommand.hpp"
|
||||
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
// 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 "wpi/commands2/PrintCommand.hpp"
|
||||
|
||||
#include <regex>
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/PrintCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
class PrintCommandTest : public CommandTestBase {};
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/commands2/ProxyCommand.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/CommandPtr.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/InstantCommand.hpp"
|
||||
#include "wpi/commands2/ProxyCommand.hpp"
|
||||
#include "wpi/commands2/WaitUntilCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
// 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 "wpi/commands2/RepeatCommand.hpp"
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "CompositionTestBase.hpp"
|
||||
#include "wpi/commands2/FunctionalCommand.hpp"
|
||||
#include "wpi/commands2/RepeatCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
class RepeatCommandTest : public CommandTestBase {};
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
// 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 "wpi/commands2/RunCommand.hpp"
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/RunCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
class RunCommandTest : public CommandTestBase {};
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
// 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 "wpi/commands2/ScheduleCommand.hpp"
|
||||
|
||||
#include <regex>
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/InstantCommand.hpp"
|
||||
#include "wpi/commands2/ScheduleCommand.hpp"
|
||||
#include "wpi/commands2/SequentialCommandGroup.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "wpi/commands2/SelectCommand.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@@ -9,7 +11,6 @@
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "CompositionTestBase.hpp"
|
||||
#include "wpi/commands2/InstantCommand.hpp"
|
||||
#include "wpi/commands2/SelectCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
class SelectCommandTest : public CommandTestBase {};
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/commands2/SequentialCommandGroup.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "CompositionTestBase.hpp"
|
||||
#include "wpi/commands2/InstantCommand.hpp"
|
||||
#include "wpi/commands2/SequentialCommandGroup.hpp"
|
||||
#include "wpi/commands2/WaitUntilCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
// 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 "wpi/commands2/StartEndCommand.hpp"
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/StartEndCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
class StartEndCommandTest : public CommandTestBase {};
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
// 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 "wpi/commands2/WaitCommand.hpp"
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/WaitCommand.hpp"
|
||||
#include "wpi/commands2/WaitUntilCommand.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
// 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 "wpi/commands2/WaitUntilCommand.hpp"
|
||||
|
||||
#include "CommandTestBase.hpp"
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/WaitUntilCommand.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
class WaitUntilCommandTest : public CommandTestBase {};
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/commands2/button/NetworkButton.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "../CommandTestBase.hpp"
|
||||
#include "wpi/commands2/CommandScheduler.hpp"
|
||||
#include "wpi/commands2/RunCommand.hpp"
|
||||
#include "wpi/commands2/WaitUntilCommand.hpp"
|
||||
#include "wpi/commands2/button/NetworkButton.hpp"
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
// 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 "../CommandTestBase.hpp"
|
||||
#include "wpi/commands2/button/RobotModeTriggers.hpp"
|
||||
|
||||
#include "../CommandTestBase.hpp"
|
||||
#include "wpi/commands2/button/Trigger.hpp"
|
||||
#include "wpi/driverstation/DriverStation.hpp"
|
||||
#include "wpi/simulation/DriverStationSim.hpp"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "wpi/commands2/button/Trigger.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
@@ -12,7 +14,6 @@
|
||||
#include "wpi/commands2/Commands.hpp"
|
||||
#include "wpi/commands2/RunCommand.hpp"
|
||||
#include "wpi/commands2/WaitUntilCommand.hpp"
|
||||
#include "wpi/commands2/button/Trigger.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
|
||||
using namespace wpi::cmd;
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/commands2/sysid/SysIdRoutine.hpp"
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/commands2/Subsystem.hpp"
|
||||
#include "wpi/commands2/sysid/SysIdRoutine.hpp"
|
||||
#include "wpi/simulation/SimHooks.hpp"
|
||||
#include "wpi/system/Timer.hpp"
|
||||
#include "wpi/units/math.hpp"
|
||||
|
||||
@@ -33,12 +33,3 @@ includeGuardRoots {
|
||||
repoRootNameOverride {
|
||||
cscore
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^fmt/
|
||||
^gtest/
|
||||
^opencv2/
|
||||
^imgui
|
||||
^support/
|
||||
^tcpsockets/
|
||||
}
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
// 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 "wpi/cs/cscore_c.h" // NOLINT(build/include_order)
|
||||
// clang-format off
|
||||
#include "wpi/cs/cscore_c.h"
|
||||
// clang-format on
|
||||
|
||||
#include "c_util.hpp"
|
||||
#include "wpi/cs/cscore_cpp.hpp"
|
||||
|
||||
@@ -9,14 +9,13 @@
|
||||
#include <fmt/format.h>
|
||||
|
||||
#define WPI_RAWFRAME_JNI
|
||||
#include "org_wpilib_vision_camera_CameraServerJNI.h"
|
||||
#include "wpi/cs/cscore_raw.h"
|
||||
#include "wpi/cs/cscore_runloop.hpp"
|
||||
#include "wpi/util/RawFrame.h"
|
||||
#include "wpi/util/SmallString.hpp"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "wpi/cs/cscore_raw.h"
|
||||
#include "wpi/cs/cscore_runloop.hpp"
|
||||
#include "org_wpilib_vision_camera_CameraServerJNI.h"
|
||||
|
||||
namespace cv {
|
||||
class Mat;
|
||||
} // namespace cv
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
// 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 "wpi/cs/cscore_cpp.hpp" // NOLINT(build/include_order)
|
||||
// clang-format off
|
||||
#include "wpi/cs/cscore_cpp.hpp"
|
||||
// clang-format on
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <ifaddrs.h>
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
// 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 <windows.h>
|
||||
#include <mfapi.h>
|
||||
#include <mfidl.h>
|
||||
#include <shlwapi.h>
|
||||
#include <windowsx.h>
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
#include "UsbCameraImpl.hpp"
|
||||
|
||||
// https://github.com/opencv/opencv/blob/master/modules/videoio/src/cap_msmf.cpp
|
||||
|
||||
@@ -4,17 +4,12 @@
|
||||
|
||||
#include "NetworkListener.hpp"
|
||||
|
||||
#include <winsock2.h> // NOLINT(build/include_order)
|
||||
|
||||
#include <windows.h> // NOLINT(build/include_order)
|
||||
|
||||
#include <ws2def.h> // NOLINT(build/include_order)
|
||||
|
||||
#include <ws2ipdef.h> // NOLINT(build/include_order)
|
||||
|
||||
#include <iphlpapi.h> // NOLINT(build/include_order)
|
||||
|
||||
#include <netioapi.h> // NOLINT(build/include_order)
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <ws2def.h>
|
||||
#include <ws2ipdef.h>
|
||||
#include <iphlpapi.h>
|
||||
#include <netioapi.h>
|
||||
|
||||
#include "Instance.hpp"
|
||||
#include "Log.hpp"
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
// 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 <uv.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
#include "wpi/cs/cscore_cpp.hpp"
|
||||
|
||||
#pragma comment(lib, "Ws2_32.lib")
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
#define _WINSOCKAPI_
|
||||
#include "UsbCameraImpl.hpp"
|
||||
|
||||
#include <windows.h>
|
||||
#include <dbt.h>
|
||||
#include <dshow.h>
|
||||
#include <ks.h>
|
||||
#include <ksmedia.h>
|
||||
#include <mfapi.h>
|
||||
@@ -19,10 +22,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <Dbt.h>
|
||||
#include <Dshow.h>
|
||||
#include <Windows.h>
|
||||
|
||||
#include "COMCreators.hpp"
|
||||
#include "ComPtr.hpp"
|
||||
#include "Handle.hpp"
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
#ifndef CSCORE_USBCAMERAIMPL_HPP_
|
||||
#define CSCORE_USBCAMERAIMPL_HPP_
|
||||
|
||||
#include <windows.h>
|
||||
#include <dbt.h>
|
||||
#include <ks.h>
|
||||
#include <ksmedia.h>
|
||||
#include <mfapi.h>
|
||||
#include <mfidl.h>
|
||||
#include <mfreadwrite.h>
|
||||
|
||||
#include <ks.h> // NOLINT(build/include_order)
|
||||
|
||||
#include <ksmedia.h> // NOLINT(build/include_order)
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -21,8 +21,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <Dbt.h>
|
||||
|
||||
#include "COMCreators.hpp"
|
||||
#include "ComPtr.hpp"
|
||||
#include "SourceImpl.hpp"
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
|
||||
#include "UsbCameraListener.hpp"
|
||||
|
||||
#include "Notifier.hpp"
|
||||
#include "WindowsMessagePump.hpp"
|
||||
|
||||
#include <dbt.h> // NOLINT(build/include_order)
|
||||
#include <windows.h>
|
||||
#include <dbt.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "Notifier.hpp"
|
||||
#include "WindowsMessagePump.hpp"
|
||||
|
||||
#define IDT_TIMER1 1001
|
||||
|
||||
using namespace wpi::cs;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <dshow.h>
|
||||
#include <mfapi.h>
|
||||
#include <mfidl.h>
|
||||
#include <mfreadwrite.h>
|
||||
@@ -11,8 +12,6 @@
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include <Dshow.h>
|
||||
|
||||
#include "PropertyImpl.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
|
||||
@@ -4,17 +4,16 @@
|
||||
|
||||
#include "WindowsMessagePump.hpp"
|
||||
|
||||
#include <windows.h>
|
||||
#include <dbt.h>
|
||||
#include <ks.h>
|
||||
#include <ksmedia.h>
|
||||
#include <mfapi.h>
|
||||
#include <mfidl.h>
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <Dbt.h>
|
||||
|
||||
#pragma comment(lib, "Mfplat.lib")
|
||||
#pragma comment(lib, "Mf.lib")
|
||||
#pragma comment(lib, "mfuuid.lib")
|
||||
|
||||
@@ -23,9 +23,3 @@ modifiableFileExclude {
|
||||
repoRootNameOverride {
|
||||
datalog
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^fmt/
|
||||
^gtest/
|
||||
^upb/
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#include <windows.h> // NOLINT(build/include_order)
|
||||
#include <windows.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h> // NOLINT
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// 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 "wpi/datalog/FileLogger.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/datalog/FileLogger.hpp"
|
||||
|
||||
TEST(FileLoggerTest, BufferSingleLine) {
|
||||
std::vector<std::string> buf;
|
||||
auto func = wpi::log::FileLogger::Buffer(
|
||||
|
||||
@@ -18,15 +18,3 @@ generatedFileExclude {
|
||||
repoRootNameOverride {
|
||||
glass
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^GLFW
|
||||
^fmt/
|
||||
^imgui
|
||||
^upb/
|
||||
}
|
||||
|
||||
includeProject {
|
||||
wpi/gui/portable-file-dialogs.h
|
||||
wpi/util/expected
|
||||
}
|
||||
|
||||
@@ -5,9 +5,12 @@
|
||||
#include "camerasupport.hpp"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "Windows.h"
|
||||
#include "delayimp.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <delayimp.h>
|
||||
|
||||
#pragma comment(lib, "delayimp.lib")
|
||||
|
||||
static int CheckDelayException(int exception_value) {
|
||||
if (exception_value ==
|
||||
VcppException(ERROR_SEVERITY_ERROR, ERROR_MOD_NOT_FOUND) ||
|
||||
@@ -16,9 +19,11 @@ static int CheckDelayException(int exception_value) {
|
||||
// This example just executes the handler.
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
|
||||
// Don't attempt to handle other errors
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
static bool TryDelayLoadAllImports(LPCSTR szDll) {
|
||||
__try {
|
||||
HRESULT hr = __HrLoadAllImportsForDll(szDll);
|
||||
@@ -30,7 +35,9 @@ static bool TryDelayLoadAllImports(LPCSTR szDll) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace wpi::glass {
|
||||
|
||||
bool HasCameraSupport() {
|
||||
bool hasCameraSupport = false;
|
||||
hasCameraSupport = TryDelayLoadAllImports("MF.dll");
|
||||
@@ -42,11 +49,17 @@ bool HasCameraSupport() {
|
||||
}
|
||||
return hasCameraSupport;
|
||||
}
|
||||
|
||||
} // namespace wpi::glass
|
||||
|
||||
#else
|
||||
|
||||
namespace wpi::glass {
|
||||
|
||||
bool HasCameraSupport() {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace wpi::glass
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,10 +27,6 @@
|
||||
#include <imgui_stdlib.h>
|
||||
#include <implot.h>
|
||||
#include <implot_internal.h>
|
||||
#include "wpi/util/Signal.h"
|
||||
#include "wpi/util/SmallString.hpp"
|
||||
#include "wpi/util/SmallVector.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
#include "wpi/glass/Context.hpp"
|
||||
#include "wpi/glass/DataSource.hpp"
|
||||
@@ -38,6 +34,10 @@
|
||||
#include "wpi/glass/support/ColorSetting.hpp"
|
||||
#include "wpi/glass/support/EnumSetting.hpp"
|
||||
#include "wpi/glass/support/ExtraGuiWidgets.hpp"
|
||||
#include "wpi/util/Signal.h"
|
||||
#include "wpi/util/SmallString.hpp"
|
||||
#include "wpi/util/SmallVector.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
using namespace wpi::glass;
|
||||
|
||||
|
||||
@@ -32,18 +32,3 @@ modifiableFileExclude {
|
||||
repoRootNameOverride {
|
||||
hal
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^fmt/
|
||||
^gtest/
|
||||
^i2clib/
|
||||
^llvm/
|
||||
^opencv2/
|
||||
^spilib/
|
||||
^support/
|
||||
}
|
||||
|
||||
includeProject {
|
||||
^ctre/
|
||||
^mockdata/
|
||||
}
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <stddef.h> //NOLINT
|
||||
|
||||
#include "wpi/hal/DriverStationTypes.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/util/Synchronization.h"
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
#ifdef __cplusplus
|
||||
#include <cstddef>
|
||||
#else
|
||||
|
||||
#include <stddef.h> // NOLINT(build/include_order)
|
||||
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#include "wpi/hal/Types.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#pragma comment(lib, "Winmm.lib")
|
||||
#pragma comment(lib, "ntdll.lib")
|
||||
extern "C" NTSYSAPI NTSTATUS NTAPI NtSetTimerResolution(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// 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 "wpi/hal/simulation/SimDeviceData.h" // NOLINT(build/include_order)
|
||||
#include "wpi/hal/simulation/SimDeviceData.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// 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 <gtest/gtest.h>
|
||||
|
||||
#include "wpi/hal/HAL.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace wpi::hal {
|
||||
TEST(HALTest, RuntimeType) {
|
||||
EXPECT_EQ(HAL_RuntimeType::HAL_Runtime_Simulation, HAL_GetRuntimeType());
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "wpi/hal/simulation/AnalogInData.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
@@ -9,7 +11,6 @@
|
||||
#include "wpi/hal/AnalogInput.h"
|
||||
#include "wpi/hal/HAL.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/simulation/AnalogInData.h"
|
||||
|
||||
namespace wpi::hal {
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "wpi/hal/simulation/DIOData.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
@@ -9,7 +11,6 @@
|
||||
#include "wpi/hal/DIO.h"
|
||||
#include "wpi/hal/HAL.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/simulation/DIOData.h"
|
||||
|
||||
namespace wpi::hal {
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/hal/simulation/DriverStationData.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/hal/HAL.h"
|
||||
#include "wpi/hal/simulation/DriverStationData.h"
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
|
||||
namespace wpi::hal {
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
// 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 "wpi/hal/simulation/I2CData.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/hal/I2C.h"
|
||||
#include "wpi/hal/simulation/I2CData.h"
|
||||
|
||||
namespace wpi::hal {
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "wpi/hal/simulation/PWMData.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
@@ -9,7 +11,6 @@
|
||||
#include "wpi/hal/HAL.h"
|
||||
#include "wpi/hal/PWM.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/simulation/PWMData.h"
|
||||
|
||||
namespace wpi::hal {
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
// 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 "wpi/hal/simulation/SimDeviceData.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/hal/SimDevice.h"
|
||||
#include "wpi/hal/simulation/SimDeviceData.h"
|
||||
|
||||
namespace wpi::hal {
|
||||
|
||||
|
||||
@@ -31,9 +31,3 @@ includeGuardRoots {
|
||||
ntcore/src/main/native/include/
|
||||
ntcore/src/test/native/cpp/
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^fmt/
|
||||
^gtest/
|
||||
^support/
|
||||
}
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
// 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 "LocalStorage.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "LocalStorage.hpp"
|
||||
#include "MockListenerStorage.hpp"
|
||||
#include "MockLogger.hpp"
|
||||
#include "PubSubOptionsMatcher.hpp"
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/nt/NetworkTable.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "TestPrinters.hpp"
|
||||
#include "wpi/nt/NetworkTable.hpp"
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
|
||||
class NetworkTableTest : public ::testing::Test {};
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/util/struct/Struct.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
#include "wpi/nt/StructArrayTopic.hpp"
|
||||
#include "wpi/nt/StructTopic.hpp"
|
||||
#include "wpi/util/SpanMatcher.hpp"
|
||||
#include "wpi/util/struct/Struct.hpp"
|
||||
|
||||
namespace {
|
||||
struct Inner {
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "net/WireDecoder.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
@@ -13,7 +15,6 @@
|
||||
#include "PubSubOptions.hpp"
|
||||
#include "gmock/gmock.h"
|
||||
#include "net/MessageHandler.hpp"
|
||||
#include "net/WireDecoder.hpp"
|
||||
#include "wpi/nt/NetworkTableValue.hpp"
|
||||
#include "wpi/util/SmallString.hpp"
|
||||
#include "wpi/util/raw_ostream.hpp"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "net/WireEncoder.hpp"
|
||||
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
@@ -14,7 +16,6 @@
|
||||
#include "PubSubOptions.hpp"
|
||||
#include "gmock/gmock-matchers.h"
|
||||
#include "net/Message.hpp"
|
||||
#include "net/WireEncoder.hpp"
|
||||
#include "wpi/nt/NetworkTableValue.hpp"
|
||||
#include "wpi/util/SpanMatcher.hpp"
|
||||
#include "wpi/util/json.hpp"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "server/ServerImpl.hpp"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <concepts>
|
||||
@@ -23,7 +25,6 @@
|
||||
#include "gmock/gmock.h"
|
||||
#include "net/Message.hpp"
|
||||
#include "net/WireEncoder.hpp"
|
||||
#include "server/ServerImpl.hpp"
|
||||
#include "wpi/nt/ntcore_c.h"
|
||||
#include "wpi/nt/ntcore_cpp.hpp"
|
||||
#include "wpi/util/SpanMatcher.hpp"
|
||||
|
||||
@@ -15,12 +15,6 @@ repoRootNameOverride {
|
||||
ntcoreffi
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^fmt/
|
||||
^gmock/
|
||||
^gtest/
|
||||
}
|
||||
|
||||
includeGuardRoots {
|
||||
ntcoreffi/src/main/native/include/
|
||||
}
|
||||
|
||||
@@ -16,12 +16,3 @@ generatedFileExclude {
|
||||
repoRootNameOverride {
|
||||
wpilib
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^fmt/
|
||||
^gtest/
|
||||
^imgui
|
||||
^mockdata/
|
||||
^opencv2/
|
||||
^support/
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// 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 <gtest/gtest.h>
|
||||
|
||||
#include "wpi/halsim/ds_socket/DSCommPacket.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
class DSCommPacketTest : public ::testing::Test {
|
||||
public:
|
||||
DSCommPacketTest() = default;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "wpi/hal/Main.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
@@ -26,7 +28,6 @@
|
||||
#include "wpi/glass/other/Plot.hpp"
|
||||
#include "wpi/gui/wpigui.hpp"
|
||||
#include "wpi/hal/Extensions.h"
|
||||
#include "wpi/hal/Main.h"
|
||||
#include "wpi/halsim/gui/HALSimGui.hpp"
|
||||
#include "wpi/halsim/gui/HALSimGuiExt.hpp"
|
||||
#include "wpi/halsim/gui/SimDeviceGui.hpp"
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
// 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 "wpi/hal/Main.h"
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include "wpi/hal/DriverStation.h"
|
||||
#include "wpi/hal/HALBase.h"
|
||||
#include "wpi/hal/Main.h"
|
||||
#include "wpi/util/print.hpp"
|
||||
|
||||
extern "C" int HALSIM_InitExtension(void);
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
// 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 "wpi/hal/Main.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <thread>
|
||||
|
||||
#include "wpi/hal/DriverStation.h"
|
||||
#include "wpi/hal/HALBase.h"
|
||||
#include "wpi/hal/Main.h"
|
||||
#include "wpi/util/print.hpp"
|
||||
|
||||
extern "C" int HALSIM_InitExtension(void);
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
#include "wpi/halsim/ws_server/HALSimHttpConnection.hpp"
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
#include "wpi/net/MimeTypes.hpp"
|
||||
#include "wpi/net/UrlParser.hpp"
|
||||
#include "wpi/net/raw_uv_ostream.hpp"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "wpi/hal/Main.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
@@ -11,7 +13,6 @@
|
||||
#include "WebServerClientTest.hpp"
|
||||
#include "wpi/hal/DriverStation.h"
|
||||
#include "wpi/hal/HALBase.h"
|
||||
#include "wpi/hal/Main.h"
|
||||
#include "wpi/hal/simulation/DIOData.h"
|
||||
#include "wpi/halsim/ws_server/HALSimWSServer.hpp"
|
||||
#include "wpi/net/uv/Loop.hpp"
|
||||
|
||||
@@ -18,10 +18,3 @@ generatedFileExclude {
|
||||
repoRootNameOverride {
|
||||
datalogtool
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^GLFW
|
||||
^fmt/
|
||||
^imgui
|
||||
^libssh/
|
||||
}
|
||||
|
||||
@@ -18,11 +18,3 @@ generatedFileExclude {
|
||||
repoRootNameOverride {
|
||||
outlineviewer
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^GLFW
|
||||
^fmt/
|
||||
^gtest/
|
||||
^imgui
|
||||
^implot\.h$
|
||||
}
|
||||
|
||||
@@ -18,11 +18,3 @@ generatedFileExclude {
|
||||
repoRootNameOverride {
|
||||
sysid
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^GLFW
|
||||
^fmt/
|
||||
^gtest/
|
||||
^imgui
|
||||
^implot\.h$
|
||||
}
|
||||
|
||||
@@ -9,8 +9,10 @@
|
||||
#include <filesystem>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
#include "wpi/glass/Context.hpp"
|
||||
#include "wpi/glass/MainMenuBar.hpp"
|
||||
@@ -18,16 +20,14 @@
|
||||
#include "wpi/glass/Window.hpp"
|
||||
#include "wpi/glass/WindowManager.hpp"
|
||||
#include "wpi/glass/other/Log.hpp"
|
||||
#include <imgui.h>
|
||||
#include "wpi/util/Logger.hpp"
|
||||
#include "wpi/util/print.hpp"
|
||||
#include "wpi/gui/wpigui.hpp"
|
||||
#include "wpi/gui/wpigui_openurl.hpp"
|
||||
|
||||
#include "wpi/sysid/view/Analyzer.hpp"
|
||||
#include "wpi/sysid/view/DataSelector.hpp"
|
||||
#include "wpi/sysid/view/LogLoader.hpp"
|
||||
#include "wpi/sysid/view/UILayout.hpp"
|
||||
#include "wpi/util/Logger.hpp"
|
||||
#include "wpi/util/print.hpp"
|
||||
|
||||
namespace gui = wpi::gui;
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// 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 <gtest/gtest.h>
|
||||
|
||||
#include "wpi/sysid/analysis/AnalysisType.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(AnalysisTypeTest, FromName) {
|
||||
EXPECT_EQ(sysid::analysis::kElevator, sysid::analysis::FromName("Elevator"));
|
||||
EXPECT_EQ(sysid::analysis::kArm, sysid::analysis::FromName("Arm"));
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
// 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 "wpi/sysid/analysis/FeedbackAnalysis.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/sysid/analysis/FeedbackAnalysis.hpp"
|
||||
#include "wpi/sysid/analysis/FeedbackControllerPreset.hpp"
|
||||
|
||||
TEST(FeedbackAnalysisTest, VelocitySystem1) {
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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 "wpi/sysid/analysis/FeedforwardAnalysis.hpp"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <bitset>
|
||||
@@ -14,7 +16,6 @@
|
||||
#include "wpi/sysid/analysis/AnalysisType.hpp"
|
||||
#include "wpi/sysid/analysis/ArmSim.hpp"
|
||||
#include "wpi/sysid/analysis/ElevatorSim.hpp"
|
||||
#include "wpi/sysid/analysis/FeedforwardAnalysis.hpp"
|
||||
#include "wpi/sysid/analysis/SimpleMotorSim.hpp"
|
||||
#include "wpi/units/time.hpp"
|
||||
#include "wpi/units/voltage.hpp"
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// 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 <gtest/gtest.h>
|
||||
|
||||
#include "wpi/sysid/analysis/OLS.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(OLSTest, TwoVariablesTwoPoints) {
|
||||
// (1, 3) and (2, 5). Should produce y = 2x + 1.
|
||||
Eigen::MatrixXd X{{1.0, 1.0}, {1.0, 2.0}};
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// 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 <gtest/gtest.h>
|
||||
|
||||
#include "wpi/sysid/analysis/TrackwidthAnalysis.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(TrackwidthAnalysisTest, Calculate) {
|
||||
double result = sysid::CalculateTrackwidth(-0.5386, 0.5386, 90_deg);
|
||||
EXPECT_NEAR(result, 0.6858, 1E-4);
|
||||
|
||||
@@ -20,14 +20,3 @@ generatedFileExclude {
|
||||
repoRootNameOverride {
|
||||
wpical
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^GLFW
|
||||
^ceres/
|
||||
^fmt/
|
||||
^gtest/
|
||||
^imgui
|
||||
^implot\.h$
|
||||
^mrcal_wrapper\.h$
|
||||
^opencv2\.h$
|
||||
}
|
||||
|
||||
@@ -23,9 +23,3 @@ includeGuardRoots {
|
||||
wpigui/src/main/native/metal/
|
||||
wpigui/src/main/native/opengl3/
|
||||
}
|
||||
|
||||
includeOtherLibs {
|
||||
^imgui
|
||||
^implot
|
||||
^stb
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
#define GLFW_EXPOSE_NATIVE_WIN32
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <GLFW/glfw3native.h>
|
||||
|
||||
#include <imgui.h>
|
||||
#include <imgui_impl_glfw.h>
|
||||
#include <imgui_impl_dx11.h>
|
||||
#include <imgui_impl_glfw.h>
|
||||
|
||||
#include "wpi/gui/wpigui.hpp"
|
||||
#include "wpi/gui/wpigui_internal.hpp"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include "wpi/driverstation/DriverStation.hpp"
|
||||
#include "wpi/hal/DriverStation.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -17,6 +16,7 @@
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "wpi/datalog/DataLog.hpp"
|
||||
#include "wpi/hal/DriverStation.h"
|
||||
#include "wpi/hal/DriverStationTypes.h"
|
||||
#include "wpi/hal/HALBase.h"
|
||||
#include "wpi/hal/Power.h"
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// 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 "wpi/hal/CAN.h"
|
||||
#include "wpi/hardware/bus/CAN.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/hal/CAN.h"
|
||||
#include "wpi/hal/CANAPI.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/UsageReporting.h"
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// 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 "wpi/hal/I2C.h"
|
||||
#include "wpi/hardware/bus/I2C.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "wpi/hal/I2C.h"
|
||||
#include "wpi/hal/UsageReporting.h"
|
||||
#include "wpi/system/Errors.hpp"
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// 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 "wpi/hal/SerialPort.h"
|
||||
#include "wpi/hardware/bus/SerialPort.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "wpi/hal/SerialPort.h"
|
||||
#include "wpi/hal/UsageReporting.h"
|
||||
#include "wpi/system/Errors.hpp"
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// 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 "wpi/hal/AnalogInput.h"
|
||||
#include "wpi/hardware/discrete/AnalogInput.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "wpi/hal/AnalogInput.h"
|
||||
#include "wpi/hal/HALBase.h"
|
||||
#include "wpi/hal/Ports.h"
|
||||
#include "wpi/hal/UsageReporting.h"
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// 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 "wpi/hal/PWM.h"
|
||||
#include "wpi/hardware/discrete/PWM.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/hal/HALBase.h"
|
||||
#include "wpi/hal/PWM.h"
|
||||
#include "wpi/hal/Ports.h"
|
||||
#include "wpi/hal/UsageReporting.h"
|
||||
#include "wpi/system/Errors.hpp"
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// 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 "wpi/hal/AddressableLED.h"
|
||||
#include "wpi/hardware/led/AddressableLED.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "wpi/hal/AddressableLED.h"
|
||||
#include "wpi/hal/HALBase.h"
|
||||
#include "wpi/hal/PWM.h"
|
||||
#include "wpi/hal/Ports.h"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// 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 "wpi/hal/PowerDistribution.h"
|
||||
#include "wpi/hardware/power/PowerDistribution.hpp"
|
||||
|
||||
#include <vector>
|
||||
@@ -10,6 +9,7 @@
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "wpi/hal/Ports.h"
|
||||
#include "wpi/hal/PowerDistribution.h"
|
||||
#include "wpi/hal/UsageReporting.h"
|
||||
#include "wpi/system/Errors.hpp"
|
||||
#include "wpi/util/StackTrace.hpp"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user