Skip to content

Commit

Permalink
Merge branch 'wpilibsuite:main' into ScheduledCommand-decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
narmstro2020 committed Sep 21, 2024
2 parents 3e58989 + f93bacc commit 6e7f396
Show file tree
Hide file tree
Showing 476 changed files with 1,043 additions and 288 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/comment-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Install wpiformat
run: pip3 install wpiformat==2024.40
run: pip3 install wpiformat==2024.41
- name: Run wpiformat
run: wpiformat
- name: Run spotlessApply
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
python-version: '3.10'
- name: Install wpiformat
run: pip3 install wpiformat==2024.40
run: pip3 install wpiformat==2024.41
- name: Run
run: wpiformat
- name: Check output
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
with:
python-version: '3.10'
- name: Install wpiformat
run: pip3 install wpiformat==2024.40
run: pip3 install wpiformat==2024.41
- name: Create compile_commands.json
run: |
./gradlew generateCompileCommands -Ptoolchain-optional-roboRio
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
image: wpilib/roborio-cross-ubuntu:2024-22.04
options: -v ${{ github.workspace }}:/work -w /work -e GITHUB_REF -e CI -e DISPLAY
run: df . && rm -f semicolon_delimited_script && ./gradlew :wpilibc:publish :wpilibj:publish :wpilibNewCommands:publish :hal:publish :cameraserver:publish :ntcore:publish :cscore:publish :wpimath:publish :wpinet:publish :wpiutil:publish :apriltag:publish :wpiunits:publish :simulation:halsim_gui:publish :simulation:halsim_ds_socket:publish :fieldImages:publish -x test -x Javadoc -x doxygen --build-cache && cp -r /root/releases/maven/development /work
run: df . && rm -f semicolon_delimited_script && ./gradlew :wpilibc:publish :wpilibj:publish :wpilibNewCommands:publish :hal:publish :cameraserver:publish :ntcore:publish :cscore:publish :wpimath:publish :wpinet:publish :wpiutil:publish :apriltag:publish :wpiunits:publish :simulation:halsim_gui:publish :simulation:halsim_ds_socket:publish :fieldImages:publish :epilogue-processor:publish :epilogue-runtime:publish :thirdparty:googletest:publish -x test -x Javadoc -x doxygen --build-cache && cp -r /root/releases/maven/development /work
- uses: actions/upload-artifact@v4
with:
name: MavenArtifacts
Expand Down
3 changes: 2 additions & 1 deletion .styleguide
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ includeOtherLibs {
^cameraserver/
^cscore
^fmt/
^gtest/
^glass/
^google/
^gtest/
^hal/
^imgui
^implot
Expand Down
2 changes: 1 addition & 1 deletion apriltag/src/main/native/cpp/AprilTagDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "frc/apriltag/AprilTagDetector.h"

#include <cmath>
#include <numbers>
#include <utility>

#ifdef _WIN32
#pragma warning(disable : 4200)
Expand Down
2 changes: 2 additions & 0 deletions apriltag/src/main/native/cpp/AprilTagFieldLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include "frc/apriltag/AprilTagFieldLayout.h"

#include <system_error>
#include <utility>
#include <vector>

#include <units/angle.h>
#include <units/length.h>
Expand Down
2 changes: 2 additions & 0 deletions apriltag/src/test/native/cpp/LoadConfigTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <vector>

#include <gtest/gtest.h>

#include "frc/apriltag/AprilTagFieldLayout.h"
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ repositories {
}
}
dependencies {
implementation "edu.wpi.first:native-utils:2025.2.0"
implementation "edu.wpi.first:native-utils:2025.3.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <string>
#include <string_view>
#include <thread>
#include <utility>
#include <vector>

#include <networktables/NetworkTableInstance.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include "cameraserver/CameraServer.h"

#include <atomic>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include <fmt/format.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "cameraserver/CameraServerShared.h"

#include <memory>
#include <utility>

#include <wpi/mutex.h>

namespace {
Expand Down
1 change: 1 addition & 0 deletions cameraserver/src/main/native/cpp/vision/VisionRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "vision/VisionRunner.h"

#include <memory>
#include <thread>

#include <opencv2/core/mat.hpp>
Expand Down
1 change: 1 addition & 0 deletions crossConnIntegrationTests/src/main/native/cpp/PWMTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <atomic>
#include <thread>
#include <utility>

#include <gtest/gtest.h>
#include <hal/DMA.h>
Expand Down
4 changes: 3 additions & 1 deletion cscore/src/main/native/cpp/ConfigurableSourceImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

#include "ConfigurableSourceImpl.h"

#include <memory>
#include <string>

#include <wpi/timestamp.h>

#include "Handle.h"
#include "Instance.h"
#include "Log.h"
#include "Notifier.h"

using namespace cs;
Expand Down
2 changes: 1 addition & 1 deletion cscore/src/main/native/cpp/Frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#include "Frame.h"

#include <cstdlib>
#include <memory>

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>

#include "Instance.h"
#include "Log.h"
#include "SourceImpl.h"

using namespace cs;
Expand Down
6 changes: 5 additions & 1 deletion cscore/src/main/native/cpp/HttpCameraImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@

#include "HttpCameraImpl.h"

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include <wpi/MemAlloc.h>
#include <wpi/StringExtras.h>
#include <wpi/timestamp.h>
#include <wpinet/TCPConnector.h>

#include "Handle.h"
#include "Instance.h"
#include "JpegUtil.h"
#include "Log.h"
Expand Down
3 changes: 3 additions & 0 deletions cscore/src/main/native/cpp/Instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

#include "Instance.h"

#include <memory>
#include <string_view>
#include <utility>

#include <fmt/format.h>
#include <wpi/fs.h>
Expand All @@ -30,6 +32,7 @@ static void def_log_func(unsigned int level, const char* file,
return;
}
wpi::print(stderr, "CS: {}: {} ({}:{})\n", levelmsg, msg,
// NOLINTNEXTLINE(build/include_what_you_use)
fs::path{file}.filename().string(), line);
}

Expand Down
2 changes: 2 additions & 0 deletions cscore/src/main/native/cpp/JpegUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "JpegUtil.h"

#include <string>

#include <wpi/StringExtras.h>
#include <wpi/raw_istream.h>

Expand Down
4 changes: 3 additions & 1 deletion cscore/src/main/native/cpp/MjpegServerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include "MjpegServerImpl.h"

#include <chrono>
#include <memory>
#include <string>
#include <utility>

#include <wpi/SmallString.h>
#include <wpi/StringExtras.h>
Expand All @@ -15,7 +18,6 @@
#include <wpinet/raw_socket_istream.h>
#include <wpinet/raw_socket_ostream.h>

#include "Handle.h"
#include "Instance.h"
#include "JpegUtil.h"
#include "Log.h"
Expand Down
2 changes: 0 additions & 2 deletions cscore/src/main/native/cpp/Notifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

#include "Notifier.h"

#include <queue>
#include <utility>
#include <vector>

#include "Handle.h"
#include "Instance.h"
Expand Down
4 changes: 4 additions & 0 deletions cscore/src/main/native/cpp/PropertyContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

#include "PropertyContainer.h"

#include <memory>
#include <string>
#include <vector>

#include <wpi/Logger.h>
#include <wpi/SmallString.h>
#include <wpi/SmallVector.h>
Expand Down
4 changes: 3 additions & 1 deletion cscore/src/main/native/cpp/RawSinkImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

#include "RawSinkImpl.h"

#include <algorithm>
#include <memory>

#include "Instance.h"
#include "cscore.h"
#include "cscore_raw.h"

using namespace cs;
Expand Down
4 changes: 2 additions & 2 deletions cscore/src/main/native/cpp/RawSourceImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

#include "RawSourceImpl.h"

#include <memory>

#include <wpi/timestamp.h>

#include "Handle.h"
#include "Instance.h"
#include "Log.h"
#include "Notifier.h"
#include "cscore_raw.h"

Expand Down
2 changes: 2 additions & 0 deletions cscore/src/main/native/cpp/SinkImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "SinkImpl.h"

#include <string>

#include <wpi/SmallString.h>
#include <wpi/json.h>

Expand Down
3 changes: 3 additions & 0 deletions cscore/src/main/native/cpp/SourceImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
#include <algorithm>
#include <cstring>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include <wpi/StringExtras.h>
#include <wpi/json.h>
Expand Down
3 changes: 1 addition & 2 deletions cscore/src/main/native/cpp/Telemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "Telemetry.h"

#include <chrono>
#include <limits>
#include <utility>

#include <wpi/DenseMap.h>
#include <wpi/timestamp.h>
Expand All @@ -14,7 +14,6 @@
#include "Instance.h"
#include "Notifier.h"
#include "SourceImpl.h"
#include "cscore_cpp.h"

using namespace cs;

Expand Down
4 changes: 3 additions & 1 deletion cscore/src/main/native/cpp/cscore_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@

#include "cscore_c.h"

#include <algorithm>
#include <cstddef>
#include <cstdlib>
#include <utility>
#include <vector>

#include <wpi/MemAlloc.h>
#include <wpi/SmallString.h>

#include "c_util.h"
#include "cscore_cpp.h"
#include "cscore_raw.h"

static CS_Event ConvertToC(const cs::RawEvent& rawEvent) {
CS_Event event;
Expand Down
5 changes: 4 additions & 1 deletion cscore/src/main/native/cpp/cscore_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@

#include "cscore_cpp.h"

#include <memory>
#include <string>
#include <vector>

#include <wpi/SmallString.h>
#include <wpi/json.h>
#include <wpinet/hostname.h>

#include "Handle.h"
#include "Instance.h"
#include "Log.h"
#include "NetworkListener.h"
#include "Notifier.h"
#include "PropertyContainer.h"
Expand Down
3 changes: 3 additions & 0 deletions cscore/src/main/native/cpp/cscore_oo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "cscore_oo.h"

#include <string>
#include <vector>

#include <fmt/format.h>
#include <wpi/json.h>

Expand Down
3 changes: 2 additions & 1 deletion cscore/src/main/native/cpp/jni/CameraServerJNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <exception>
#include <memory>
#include <span>
#include <string>

#include <fmt/format.h>

Expand Down
1 change: 1 addition & 0 deletions cscore/src/main/native/linux/NetworkListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <sys/types.h>
#include <unistd.h>

#include <algorithm>
#include <cerrno>

#include <wpi/SafeThread.h>
Expand Down
3 changes: 3 additions & 0 deletions cscore/src/main/native/linux/NetworkUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#include <sys/types.h>
#include <unistd.h>

#include <string>
#include <vector>

namespace cs {

std::vector<std::string> GetNetworkInterfaces() {
Expand Down
4 changes: 3 additions & 1 deletion cscore/src/main/native/linux/UsbCameraImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include <fmt/format.h>
#include <wpi/MemAlloc.h>
Expand All @@ -30,7 +33,6 @@
#include <wpi/raw_ostream.h>
#include <wpi/timestamp.h>

#include "Handle.h"
#include "Instance.h"
#include "JpegUtil.h"
#include "Log.h"
Expand Down
Loading

0 comments on commit 6e7f396

Please sign in to comment.