From 0cec78a7580f59749ee82b1e9e85ac725059e5d1 Mon Sep 17 00:00:00 2001
From: Gold856 <117957790+Gold856@users.noreply.github.com>
Date: Tue, 14 May 2024 23:47:12 -0400
Subject: [PATCH 1/4] Fix typos
---
README-CMAKE.md | 2 +-
.../edu/wpi/first/cscore/VideoListener.java | 2 +-
cscore/src/main/native/include/cscore_cv.h | 2 +-
cscore/src/main/native/include/cscore_oo.h | 4 +-
.../edu/wpi/first/hal/AddressableLEDJNI.java | 2 +-
.../java/edu/wpi/first/hal/AnalogGyroJNI.java | 2 +-
.../java/edu/wpi/first/hal/AnalogJNI.java | 2 +-
.../edu/wpi/first/hal/DriverStationJNI.java | 2 +-
.../main/java/edu/wpi/first/hal/REVPHJNI.java | 2 +-
.../hal/util/CheckedAllocationException.java | 2 +-
hal/src/main/native/athena/DMA.cpp | 6 +--
hal/src/main/native/athena/HAL.cpp | 2 +-
hal/src/main/native/include/hal/AnalogGyro.h | 2 +-
.../main/native/include/hal/AnalogTrigger.h | 2 +-
ntcore/doc/networktables4.adoc | 2 +-
.../main/java/NetworkTablesJNI.java.jinja | 4 +-
.../first/networktables/NetworkTablesJNI.java | 4 +-
.../src/test/native/cpp/LocalStorageTest.cpp | 4 +-
.../include/sysid/analysis/AnalysisManager.h | 4 +-
.../main/native/include/sysid/analysis/OLS.h | 2 +-
.../wpi/first/wpilibj2/command/Commands.java | 2 +-
wpilibc/src/main/native/cpp/PneumaticHub.cpp | 4 +-
.../native/include/frc/AnalogTriggerOutput.h | 2 +-
wpilibc/src/main/native/include/frc/Counter.h | 6 +--
.../src/main/native/include/frc/SerialPort.h | 2 +-
.../cpp/simulation/AccelerometerSimTest.cpp | 10 ++---
.../native/cpp/simulation/RelaySimTest.cpp | 2 +-
.../FlywheelBangBangController/cpp/Robot.cpp | 8 ++--
wpilibj/CMakeLists.txt | 2 +-
.../java/edu/wpi/first/wpilibj/Counter.java | 4 +-
.../edu/wpi/first/wpilibj/SerialPort.java | 2 +-
.../first/wpilibj/drive/RobotDriveBase.java | 2 +-
.../simulation/DifferentialDrivetrainSim.java | 2 +-
.../flywheelbangbangcontroller/Robot.java | 8 ++--
.../first/wpilibj/examples/gyro/Robot.java | 2 +-
.../estimator/MerweScaledSigmaPoints.java | 2 +-
.../java/edu/wpi/first/math/jni/DAREJNI.java | 2 +-
.../first/math/kinematics/ChassisSpeeds.java | 2 +-
.../DifferentialDriveWheelPositions.java | 4 +-
.../math/system/NumericalIntegration.java | 2 +-
.../math/trajectory/ExponentialProfile.java | 2 +-
.../math/trajectory/TrapezoidProfile.java | 38 +++++++++----------
.../DifferentialDriveAccelerationLimiter.h | 2 +-
.../KalmanFilterLatencyCompensator.h | 2 +-
.../frc/estimator/MerweScaledSigmaPoints.h | 2 +-
.../frc/estimator/SteadyStateKalmanFilter.h | 2 +-
.../frc/estimator/UnscentedTransform.h | 2 +-
.../include/frc/kinematics/ChassisSpeeds.h | 4 +-
.../frc/trajectory/ExponentialProfile.h | 2 +-
.../include/frc/trajectory/TrapezoidProfile.h | 4 +-
.../frc/trajectory/TrapezoidProfile.inc | 36 +++++++++---------
.../math/controller/ArmFeedforwardTest.java | 4 +-
...ferentialDriveAccelerationLimiterTest.java | 2 +-
.../controller/ElevatorFeedforwardTest.java | 4 +-
.../DifferentialDrivePoseEstimatorTest.java | 2 +-
.../MecanumDrivePoseEstimatorTest.java | 2 +-
.../SwerveDrivePoseEstimatorTest.java | 2 +-
.../wpi/first/math/geometry/Twist2dTest.java | 2 +-
.../wpi/first/math/geometry/Twist3dTest.java | 2 +-
...fferentialDriveAccelerationLimiterTest.cpp | 2 +-
.../DifferentialDrivePoseEstimatorTest.cpp | 2 +-
.../MecanumDrivePoseEstimatorTest.cpp | 2 +-
.../SwerveDrivePoseEstimatorTest.cpp | 2 +-
.../native/cpp/filter/SlewRateLimiterTest.cpp | 2 +-
.../cpp/trajectory/ExponentialProfileTest.cpp | 4 +-
.../cpp/trajectory/TrapezoidProfileTest.cpp | 2 +-
.../main/native/include/wpinet/UrlParser.h | 2 +-
.../src/main/native/include/wpinet/uv/Async.h | 4 +-
.../src/main/native/include/wpinet/uv/Loop.h | 2 +-
.../java/edu/wpi/first/units/Current.java | 2 +-
wpiutil/doc/struct.adoc | 2 +-
.../java/edu/wpi/first/util/WPIUtilJNI.java | 2 +-
.../edu/wpi/first/util/protobuf/Protobuf.java | 4 +-
.../edu/wpi/first/util/struct/Struct.java | 4 +-
.../main/native/include/wpi/Synchronization.h | 6 +--
wpiutil/src/main/native/include/wpi/string.h | 2 +-
76 files changed, 143 insertions(+), 143 deletions(-)
diff --git a/README-CMAKE.md b/README-CMAKE.md
index 33602cded93..b6204d3b9af 100644
--- a/README-CMAKE.md
+++ b/README-CMAKE.md
@@ -176,7 +176,7 @@ After that, run `cmake --build .` to create your JAR file. To execute the JAR fi
## Using vendordeps
-Vendordeps are not included as part of the `wpilib` CMake package. However, if you want to use a vendordep, you need to use `find_package(VENDORDEP)`, where `VENDORDEP` is the name of the vendordep (case-sensitive), like `xrpVendordep` or `romiVenderdep`. Note that wpilibNewCommands, while a vendordep in normal robot projects, is not built as a vendordep in CMake, and is instead included as part of the `wpilib` CMake package. After you used `find_package`, you can reference the vendordep library like normal, either by using `target_link_libraries` for C++ or `add_jar` for Java.
+Vendordeps are not included as part of the `wpilib` CMake package. However, if you want to use a vendordep, you need to use `find_package(VENDORDEP)`, where `VENDORDEP` is the name of the vendordep (case-sensitive), like `xrpVendordep` or `romiVendordep`. Note that wpilibNewCommands, while a vendordep in normal robot projects, is not built as a vendordep in CMake, and is instead included as part of the `wpilib` CMake package. After you used `find_package`, you can reference the vendordep library like normal, either by using `target_link_libraries` for C++ or `add_jar` for Java.
## Troubleshooting
Below are some common issues that are run into when building.
diff --git a/cscore/src/main/java/edu/wpi/first/cscore/VideoListener.java b/cscore/src/main/java/edu/wpi/first/cscore/VideoListener.java
index e7697cdae27..752f2a69dd3 100644
--- a/cscore/src/main/java/edu/wpi/first/cscore/VideoListener.java
+++ b/cscore/src/main/java/edu/wpi/first/cscore/VideoListener.java
@@ -11,7 +11,7 @@
import java.util.function.Consumer;
/**
- * An event listener. This calls back to a desigated callback function when an event matching the
+ * An event listener. This calls back to a designated callback function when an event matching the
* specified mask is generated by the library.
*/
public class VideoListener implements AutoCloseable {
diff --git a/cscore/src/main/native/include/cscore_cv.h b/cscore/src/main/native/include/cscore_cv.h
index aec10d4a55c..237c3946afa 100644
--- a/cscore/src/main/native/include/cscore_cv.h
+++ b/cscore/src/main/native/include/cscore_cv.h
@@ -230,7 +230,7 @@ inline void CvSource::PutFrame(cv::Mat& image) {
int channels = finalImage.channels();
VideoMode::PixelFormat format;
if (channels == 1) {
- // 1 channel is assumed Graysacle
+ // 1 channel is assumed Grayscale
format = VideoMode::PixelFormat::kGray;
} else if (channels == 2) {
// 2 channels is assumed YUYV
diff --git a/cscore/src/main/native/include/cscore_oo.h b/cscore/src/main/native/include/cscore_oo.h
index 950fa688eee..8fb8f4be32f 100644
--- a/cscore/src/main/native/include/cscore_oo.h
+++ b/cscore/src/main/native/include/cscore_oo.h
@@ -524,7 +524,7 @@ class VideoCamera : public VideoSource {
void SetWhiteBalanceManual(int value);
/**
- * Set the exposure to auto aperature.
+ * Set the exposure to auto aperture.
*/
void SetExposureAuto();
@@ -1148,7 +1148,7 @@ class VideoEvent : public RawEvent {
};
/**
- * An event listener. This calls back to a desigated callback function when
+ * An event listener. This calls back to a designated callback function when
* an event matching the specified mask is generated by the library.
*/
class VideoListener {
diff --git a/hal/src/main/java/edu/wpi/first/hal/AddressableLEDJNI.java b/hal/src/main/java/edu/wpi/first/hal/AddressableLEDJNI.java
index a7a355237b0..c9a2185bf03 100644
--- a/hal/src/main/java/edu/wpi/first/hal/AddressableLEDJNI.java
+++ b/hal/src/main/java/edu/wpi/first/hal/AddressableLEDJNI.java
@@ -7,7 +7,7 @@
/**
* Addressable LED HAL JNI Methods.
*
- * @see "hal/AdressableLED.h"
+ * @see "hal/AddressableLED.h"
*/
public class AddressableLEDJNI extends JNIWrapper {
/**
diff --git a/hal/src/main/java/edu/wpi/first/hal/AnalogGyroJNI.java b/hal/src/main/java/edu/wpi/first/hal/AnalogGyroJNI.java
index 5d483f9c8a9..f1a4c5ecf2c 100644
--- a/hal/src/main/java/edu/wpi/first/hal/AnalogGyroJNI.java
+++ b/hal/src/main/java/edu/wpi/first/hal/AnalogGyroJNI.java
@@ -111,7 +111,7 @@ public static native void setAnalogGyroVoltsPerDegreePerSecond(
*
Can be used to not repeat a calibration but reconstruct the gyro object.
*
* @param handle the gyro handle
- * @return the gryo offset
+ * @return the gyro offset
* @see "HAL_GetAnalogGyroOffset"
*/
public static native double getAnalogGyroOffset(int handle);
diff --git a/hal/src/main/java/edu/wpi/first/hal/AnalogJNI.java b/hal/src/main/java/edu/wpi/first/hal/AnalogJNI.java
index 2884b8c95f0..f2996f60c2f 100644
--- a/hal/src/main/java/edu/wpi/first/hal/AnalogJNI.java
+++ b/hal/src/main/java/edu/wpi/first/hal/AnalogJNI.java
@@ -514,7 +514,7 @@ public static native void setAnalogTriggerFiltered(
public static native boolean getAnalogTriggerOutput(int analogTriggerHandle, int type);
/**
- * Get the FPGA index for the AnlogTrigger.
+ * Get the FPGA index for the AnalogTrigger.
*
* @param analogTriggerHandle the trigger handle
* @return the FPGA index
diff --git a/hal/src/main/java/edu/wpi/first/hal/DriverStationJNI.java b/hal/src/main/java/edu/wpi/first/hal/DriverStationJNI.java
index 33cbac62fcb..580dcd1d328 100644
--- a/hal/src/main/java/edu/wpi/first/hal/DriverStationJNI.java
+++ b/hal/src/main/java/edu/wpi/first/hal/DriverStationJNI.java
@@ -243,7 +243,7 @@ public static AllianceStationID getAllianceStation() {
* @param rawAxesArray all joystick axes as int
* @param povsArray all povs
* @param buttonsAndMetadata array of long joystick axes count, long joystick povs count, long
- * jostick buttons count, long joystick buttons values
+ * joystick buttons count, long joystick buttons values
* @see "HAL_GetAllJoystickData"
*/
public static native void getAllJoystickData(
diff --git a/hal/src/main/java/edu/wpi/first/hal/REVPHJNI.java b/hal/src/main/java/edu/wpi/first/hal/REVPHJNI.java
index e0ee27eb2e3..29d33664f89 100644
--- a/hal/src/main/java/edu/wpi/first/hal/REVPHJNI.java
+++ b/hal/src/main/java/edu/wpi/first/hal/REVPHJNI.java
@@ -27,7 +27,7 @@ public class REVPHJNI extends JNIWrapper {
*
* @param module the CAN ID to initialize
* @return the created PH handle
- * @see "HAL_InitializeREVP"
+ * @see "HAL_InitializeREVPH"
*/
public static native int initialize(int module);
diff --git a/hal/src/main/java/edu/wpi/first/hal/util/CheckedAllocationException.java b/hal/src/main/java/edu/wpi/first/hal/util/CheckedAllocationException.java
index 81de150a05a..e4301abe88c 100644
--- a/hal/src/main/java/edu/wpi/first/hal/util/CheckedAllocationException.java
+++ b/hal/src/main/java/edu/wpi/first/hal/util/CheckedAllocationException.java
@@ -5,7 +5,7 @@
package edu.wpi.first.hal.util;
/**
- * Exception indicating that the resource is already allocated This is meant to be thrown by the
+ * Exception indicating that the resource is already allocated. This is meant to be thrown by the
* resource class.
*/
public class CheckedAllocationException extends Exception {
diff --git a/hal/src/main/native/athena/DMA.cpp b/hal/src/main/native/athena/DMA.cpp
index f46969d4fb5..259281fa8cc 100644
--- a/hal/src/main/native/athena/DMA.cpp
+++ b/hal/src/main/native/athena/DMA.cpp
@@ -159,8 +159,8 @@ void HAL_SetDMAPause(HAL_DMAHandle handle, HAL_Bool pause, int32_t* status) {
void HAL_SetDMATimedTrigger(HAL_DMAHandle handle, double seconds,
int32_t* status) {
- constexpr double baseMultipler = kSystemClockTicksPerMicrosecond * 1000000;
- uint32_t cycles = static_cast(baseMultipler * seconds);
+ constexpr double baseMultiplier = kSystemClockTicksPerMicrosecond * 1000000;
+ uint32_t cycles = static_cast(baseMultiplier * seconds);
HAL_SetDMATimedTriggerCycles(handle, cycles, status);
}
@@ -564,7 +564,7 @@ int32_t HAL_SetDMAExternalTrigger(HAL_DMAHandle handle,
if (!success) {
*status = PARAMETER_OUT_OF_RANGE;
hal::SetLastError(status,
- "Digital Source unabled to be mapped properly. Likely "
+ "Digital Source unable to be mapped properly. Likely "
"invalid handle passed.");
return 0;
}
diff --git a/hal/src/main/native/athena/HAL.cpp b/hal/src/main/native/athena/HAL.cpp
index 91bb93be1f9..7c5f1f64a97 100644
--- a/hal/src/main/native/athena/HAL.cpp
+++ b/hal/src/main/native/athena/HAL.cpp
@@ -479,7 +479,7 @@ HAL_Bool HAL_GetSystemTimeValid(int32_t* status) {
static bool killExistingProgram(int timeout, int mode) {
// Kill any previous robot programs
std::fstream fs;
- // By making this both in/out, it won't give us an error if it doesnt exist
+ // By making this both in/out, it won't give us an error if it doesn't exist
fs.open("/var/lock/frc.pid", std::fstream::in | std::fstream::out);
if (fs.bad()) {
return false;
diff --git a/hal/src/main/native/include/hal/AnalogGyro.h b/hal/src/main/native/include/hal/AnalogGyro.h
index 6dd948a3268..4f5f73331c6 100644
--- a/hal/src/main/native/include/hal/AnalogGyro.h
+++ b/hal/src/main/native/include/hal/AnalogGyro.h
@@ -129,7 +129,7 @@ double HAL_GetAnalogGyroRate(HAL_GyroHandle handle, int32_t* status);
*
* @param[in] handle the gyro handle
* @param[out] status Error status variable. 0 on success.
- * @return the gryo offset
+ * @return the gyro offset
*/
double HAL_GetAnalogGyroOffset(HAL_GyroHandle handle, int32_t* status);
diff --git a/hal/src/main/native/include/hal/AnalogTrigger.h b/hal/src/main/native/include/hal/AnalogTrigger.h
index e678b6864ef..1a35eea4aa1 100644
--- a/hal/src/main/native/include/hal/AnalogTrigger.h
+++ b/hal/src/main/native/include/hal/AnalogTrigger.h
@@ -172,7 +172,7 @@ HAL_Bool HAL_GetAnalogTriggerOutput(HAL_AnalogTriggerHandle analogTriggerHandle,
int32_t* status);
/**
- * Get the FPGA index for the AnlogTrigger.
+ * Get the FPGA index for the AnalogTrigger.
*
* @param[in] analogTriggerHandle the trigger handle
* @param[out] status Error status variable. 0 on success.
diff --git a/ntcore/doc/networktables4.adoc b/ntcore/doc/networktables4.adoc
index 29e74a14e64..318afac7f85 100644
--- a/ntcore/doc/networktables4.adoc
+++ b/ntcore/doc/networktables4.adoc
@@ -12,7 +12,7 @@ A pub/sub WebSockets protocol based on NetworkTables concepts.
While NetworkTables 4.0 made a large number of improvements to the 3.0 protocol, a few weaknesses have been discovered in "real world" use:
-* Keep alives are not required. This can result in very long timeframes before a disconnect is detected.
+* Keepalives are not required. This can result in very long timeframes before a disconnect is detected.
* Periodic synchronization of timestamps is impacted by high variability of round trip time measurements on a stream connection shared with other data (due to network queueing in adverse network connections), resulting in values being "too old" even if actually more recent due to a change in base time
* Disconnect loops can be caused by large amounts of data values being sent in response to a "subscribe all" type of message (e.g. subscribe with empty or `$` prefix), resulting in data transmission being blocked for an excessive amount of time
* Publishing operations are not clearly subscriber-driven; the information is available via metatopics but not automatically sent to clients when clients publish
diff --git a/ntcore/src/generate/main/java/NetworkTablesJNI.java.jinja b/ntcore/src/generate/main/java/NetworkTablesJNI.java.jinja
index 17d15c17540..628006c264c 100644
--- a/ntcore/src/generate/main/java/NetworkTablesJNI.java.jinja
+++ b/ntcore/src/generate/main/java/NetworkTablesJNI.java.jinja
@@ -448,7 +448,7 @@ public final class NetworkTablesJNI {
public static native void releaseEntry(int entry);
/**
- * Relesaes pubsub entry.
+ * Releases pubsub entry.
*
* @param pubsubentry Pubsub entry handle.
*/
@@ -1002,7 +1002,7 @@ public final class NetworkTablesJNI {
/**
* Returns the current timestamp in microseconds.
*
- * @return The current timestsamp in microseconds.
+ * @return The current timestamp in microseconds.
*/
public static native long now();
diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/NetworkTablesJNI.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/NetworkTablesJNI.java
index 4741f7642a7..d47add60463 100644
--- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/NetworkTablesJNI.java
+++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/NetworkTablesJNI.java
@@ -448,7 +448,7 @@ public static int publishEx(
public static native void releaseEntry(int entry);
/**
- * Relesaes pubsub entry.
+ * Releases pubsub entry.
*
* @param pubsubentry Pubsub entry handle.
*/
@@ -1542,7 +1542,7 @@ public static native void startServer(
/**
* Returns the current timestamp in microseconds.
*
- * @return The current timestsamp in microseconds.
+ * @return The current timestamp in microseconds.
*/
public static native long now();
diff --git a/ntcore/src/test/native/cpp/LocalStorageTest.cpp b/ntcore/src/test/native/cpp/LocalStorageTest.cpp
index cdb52727d8e..5ea4ec5c8ee 100644
--- a/ntcore/src/test/native/cpp/LocalStorageTest.cpp
+++ b/ntcore/src/test/native/cpp/LocalStorageTest.cpp
@@ -759,7 +759,7 @@ TEST_F(LocalStorageNumberVariantsTest, GetEntryPubAfter) {
EXPECT_EQ(storage.GetEntryValue(sub2), Value::MakeInteger(1, 50));
EXPECT_EQ(storage.GetEntryValue(sub3), Value::MakeFloat(1.0, 50));
EXPECT_EQ(storage.GetEntryValue(sub4), Value{});
- // entrys just get whatever the value is
+ // entries just get whatever the value is
EXPECT_EQ(storage.GetEntryValue(entry), Value::MakeDouble(1.0, 50));
}
@@ -781,7 +781,7 @@ TEST_F(LocalStorageNumberVariantsTest, GetEntryPubBefore) {
EXPECT_EQ(storage.GetEntryValue(sub2), Value::MakeInteger(1, 50));
EXPECT_EQ(storage.GetEntryValue(sub3), Value::MakeFloat(1.0, 50));
EXPECT_EQ(storage.GetEntryValue(sub4), Value{});
- // entrys just get whatever the value is
+ // entries just get whatever the value is
EXPECT_EQ(storage.GetEntryValue(entry), Value::MakeDouble(1.0, 50));
}
diff --git a/sysid/src/main/native/include/sysid/analysis/AnalysisManager.h b/sysid/src/main/native/include/sysid/analysis/AnalysisManager.h
index 6dfe51cb358..766b8b78f63 100644
--- a/sysid/src/main/native/include/sysid/analysis/AnalysisManager.h
+++ b/sysid/src/main/native/include/sysid/analysis/AnalysisManager.h
@@ -254,7 +254,7 @@ class AnalysisManager {
std::string_view GetUnit() const { return m_data.distanceUnit; }
/**
- * Returns a reference to the iterator of the currently selected raw datset.
+ * Returns a reference to the iterator of the currently selected raw dataset.
* Unfortunately, due to ImPlot internals, the reference cannot be const so
* the user should be careful not to change any data.
*
@@ -264,7 +264,7 @@ class AnalysisManager {
/**
* Returns a reference to the iterator of the currently selected filtered
- * datset. Unfortunately, due to ImPlot internals, the reference cannot be
+ * dataset. Unfortunately, due to ImPlot internals, the reference cannot be
* const so the user should be careful not to change any data.
*
* @return A reference to the filtered internal data.
diff --git a/sysid/src/main/native/include/sysid/analysis/OLS.h b/sysid/src/main/native/include/sysid/analysis/OLS.h
index 43f447a8033..28b6d5704ae 100644
--- a/sysid/src/main/native/include/sysid/analysis/OLS.h
+++ b/sysid/src/main/native/include/sysid/analysis/OLS.h
@@ -12,7 +12,7 @@
namespace sysid {
struct OLSResult {
- /// Regression coeficients.
+ /// Regression coefficients.
std::vector coeffs;
/// R² (coefficient of determination)
diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Commands.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Commands.java
index 0d2178f6b57..3632c1100ad 100644
--- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Commands.java
+++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Commands.java
@@ -200,7 +200,7 @@ public static Command defer(Supplier supplier, Set requireme
* @param supplier the command supplier
* @return the command
* @deprecated The ProxyCommand supplier constructor has been deprecated in favor of directly
- * proxying a {@link DeferredCommand}, see ProxyCommand documentaion for more details. As a
+ * proxying a {@link DeferredCommand}, see ProxyCommand documentation for more details. As a
* replacement, consider using `defer(supplier).asProxy()`.
* @see ProxyCommand
*/
diff --git a/wpilibc/src/main/native/cpp/PneumaticHub.cpp b/wpilibc/src/main/native/cpp/PneumaticHub.cpp
index ab402ed37ab..06e37a4a3aa 100644
--- a/wpilibc/src/main/native/cpp/PneumaticHub.cpp
+++ b/wpilibc/src/main/native/cpp/PneumaticHub.cpp
@@ -148,7 +148,7 @@ void PneumaticHub::EnableCompressorAnalog(
units::pounds_per_square_inch_t maxPressure) {
if (minPressure >= maxPressure) {
throw FRC_MakeError(err::InvalidParameter,
- "maxPressure must be greater than minPresure");
+ "maxPressure must be greater than minPressure");
}
if (minPressure < 0_psi || minPressure > 120_psi) {
throw FRC_MakeError(err::ParameterOutOfRange,
@@ -178,7 +178,7 @@ void PneumaticHub::EnableCompressorHybrid(
units::pounds_per_square_inch_t maxPressure) {
if (minPressure >= maxPressure) {
throw FRC_MakeError(err::InvalidParameter,
- "maxPressure must be greater than minPresure");
+ "maxPressure must be greater than minPressure");
}
if (minPressure < 0_psi || minPressure > 120_psi) {
throw FRC_MakeError(err::ParameterOutOfRange,
diff --git a/wpilibc/src/main/native/include/frc/AnalogTriggerOutput.h b/wpilibc/src/main/native/include/frc/AnalogTriggerOutput.h
index 88bd6c3cab8..fe22403efb1 100644
--- a/wpilibc/src/main/native/include/frc/AnalogTriggerOutput.h
+++ b/wpilibc/src/main/native/include/frc/AnalogTriggerOutput.h
@@ -35,7 +35,7 @@ class AnalogTrigger;
* / down counter or to interrupts. Because the outputs generate a pulse, they
* cannot be read directly. To help ensure that a rollover condition is not
* missed, there is an average rejection filter available that operates on the
- * upper 8 bits of a 12 bit number and selects the nearest outlyer of 3 samples.
+ * upper 8 bits of a 12 bit number and selects the nearest outlier of 3 samples.
* This will reject a sample that is (due to averaging or sampling) errantly
* between the two limits. This filter will fail if more than one sample in a
* row is errantly in between the two limits. You may see this problem if
diff --git a/wpilibc/src/main/native/include/frc/Counter.h b/wpilibc/src/main/native/include/frc/Counter.h
index 3720dde31b3..3f79a707f45 100644
--- a/wpilibc/src/main/native/include/frc/Counter.h
+++ b/wpilibc/src/main/native/include/frc/Counter.h
@@ -47,8 +47,8 @@ class Counter : public CounterBase,
/**
* Create an instance of a counter where no sources are selected.
*
- * They all must be selected by calling functions to specify the upsource and
- * the downsource independently.
+ * They all must be selected by calling functions to specify the up source and
+ * the down source independently.
*
* This creates a ChipObject counter and initializes status variables
* appropriately.
@@ -148,7 +148,7 @@ class Counter : public CounterBase,
Counter& operator=(Counter&&) = default;
/**
- * Set the upsource for the counter as a digital input channel.
+ * Set the up source for the counter as a digital input channel.
*
* @param channel The DIO channel to use as the up source. 0-9 are on-board,
* 10-25 are on the MXP
diff --git a/wpilibc/src/main/native/include/frc/SerialPort.h b/wpilibc/src/main/native/include/frc/SerialPort.h
index b7784da794b..a504a1e5103 100644
--- a/wpilibc/src/main/native/include/frc/SerialPort.h
+++ b/wpilibc/src/main/native/include/frc/SerialPort.h
@@ -34,7 +34,7 @@ class SerialPort {
kOnboard = 0,
/// MXP (roboRIO MXP) serial port.
kMXP = 1,
- /// USB serial port (same as KUSB1).
+ /// USB serial port (same as kUSB1).
kUSB = 2,
/// USB serial port 1.
kUSB1 = 2,
diff --git a/wpilibc/src/test/native/cpp/simulation/AccelerometerSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/AccelerometerSimTest.cpp
index 328645d25de..6a29b800dfb 100644
--- a/wpilibc/src/test/native/cpp/simulation/AccelerometerSimTest.cpp
+++ b/wpilibc/src/test/native/cpp/simulation/AccelerometerSimTest.cpp
@@ -13,7 +13,7 @@
namespace frc::sim {
-TEST(AcclerometerSimTest, ActiveCallback) {
+TEST(AccelerometerSimTest, ActiveCallback) {
HAL_Initialize(500, 0);
BuiltInAccelerometerSim sim;
@@ -39,7 +39,7 @@ TEST(AcclerometerSimTest, ActiveCallback) {
EXPECT_TRUE(sim.GetActive());
}
-TEST(AcclerometerSimTest, SetX) {
+TEST(AccelerometerSimTest, SetX) {
HAL_Initialize(500, 0);
BuiltInAccelerometerSim sim;
sim.ResetData();
@@ -56,7 +56,7 @@ TEST(AcclerometerSimTest, SetX) {
EXPECT_EQ(kTestValue, callback.GetLastValue());
}
-TEST(AcclerometerSimTest, SetY) {
+TEST(AccelerometerSimTest, SetY) {
HAL_Initialize(500, 0);
BuiltInAccelerometerSim sim;
sim.ResetData();
@@ -73,7 +73,7 @@ TEST(AcclerometerSimTest, SetY) {
EXPECT_EQ(kTestValue, callback.GetLastValue());
}
-TEST(AcclerometerSimTest, SetZ) {
+TEST(AccelerometerSimTest, SetZ) {
HAL_Initialize(500, 0);
BuiltInAccelerometer accel;
@@ -91,7 +91,7 @@ TEST(AcclerometerSimTest, SetZ) {
EXPECT_EQ(kTestValue, callback.GetLastValue());
}
-TEST(AcclerometerSimTest, SetRange) {
+TEST(AccelerometerSimTest, SetRange) {
HAL_Initialize(500, 0);
BuiltInAccelerometerSim sim;
diff --git a/wpilibc/src/test/native/cpp/simulation/RelaySimTest.cpp b/wpilibc/src/test/native/cpp/simulation/RelaySimTest.cpp
index 200ce111e39..c48515bc2bf 100644
--- a/wpilibc/src/test/native/cpp/simulation/RelaySimTest.cpp
+++ b/wpilibc/src/test/native/cpp/simulation/RelaySimTest.cpp
@@ -12,7 +12,7 @@
namespace frc::sim {
-TEST(RelaySimTest, InitializationBidrectional) {
+TEST(RelaySimTest, InitializationBidirectional) {
HAL_Initialize(500, 0);
RelaySim sim(0);
diff --git a/wpilibcExamples/src/main/cpp/examples/FlywheelBangBangController/cpp/Robot.cpp b/wpilibcExamples/src/main/cpp/examples/FlywheelBangBangController/cpp/Robot.cpp
index fd5b2a2e37f..5a4e18d6285 100644
--- a/wpilibcExamples/src/main/cpp/examples/FlywheelBangBangController/cpp/Robot.cpp
+++ b/wpilibcExamples/src/main/cpp/examples/FlywheelBangBangController/cpp/Robot.cpp
@@ -30,7 +30,7 @@ class Robot : public frc::TimedRobot {
// Set setpoint and measurement of the bang-bang controller
units::volt_t bangOutput =
- m_bangBangControler.Calculate(m_encoder.GetRate(), setpoint.value()) *
+ m_bangBangController.Calculate(m_encoder.GetRate(), setpoint.value()) *
12_V;
// Controls a motor with the output of the BangBang controller and a
@@ -41,8 +41,8 @@ class Robot : public frc::TimedRobot {
}
Robot() {
- // Add bang-bang controler to SmartDashboard and networktables.
- frc::SmartDashboard::PutData("BangBangControler", &m_bangBangControler);
+ // Add bang-bang controller to SmartDashboard and networktables.
+ frc::SmartDashboard::PutData("BangBangController", &m_bangBangController);
}
/**
@@ -72,7 +72,7 @@ class Robot : public frc::TimedRobot {
frc::PWMSparkMax m_flywheelMotor{kMotorPort};
frc::Encoder m_encoder{kEncoderAChannel, kEncoderBChannel};
- frc::BangBangController m_bangBangControler;
+ frc::BangBangController m_bangBangController;
// Gains are for example purposes only - must be determined for your own
// robot!
diff --git a/wpilibj/CMakeLists.txt b/wpilibj/CMakeLists.txt
index 440f7585592..5ea91bdee0f 100644
--- a/wpilibj/CMakeLists.txt
+++ b/wpilibj/CMakeLists.txt
@@ -58,7 +58,7 @@ if(WITH_JAVA_SOURCE)
# Generate version file if it wasn't generated already
if(NOT WITH_JAVA)
configure_file(
- src/generate/WPILi1bVersion.java.in
+ src/generate/WPILibVersion.java.in
generated/main/java/edu/wpi/first/wpilibj/WPILibVersion.java
)
endif()
diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Counter.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Counter.java
index eca3dd5a8ff..c4bc1738777 100644
--- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Counter.java
+++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Counter.java
@@ -90,7 +90,7 @@ public Counter(final Mode mode) {
/**
* Create an instance of a counter where no sources are selected. Then they all must be selected
- * by calling functions to specify the upsource and the downsource independently.
+ * by calling functions to specify the up source and the down source independently.
*
* The counter will start counting immediately.
*/
@@ -212,7 +212,7 @@ public int getFPGAIndex() {
}
/**
- * Set the upsource for the counter as a digital input channel.
+ * Set the up source for the counter as a digital input channel.
*
* @param channel the DIO channel to count 0-9 are on-board, 10-25 are on the MXP
*/
diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java
index d978d783daf..92f835d3da8 100644
--- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java
+++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java
@@ -19,7 +19,7 @@ public enum Port {
kOnboard(0),
/** MXP (roboRIO MXP) serial port. */
kMXP(1),
- /** USB serial port (same as KUSB1). */
+ /** USB serial port (same as kUSB1). */
kUSB(2),
/** USB serial port 1. */
kUSB1(2),
diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/RobotDriveBase.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/RobotDriveBase.java
index a952b2ecaa6..5250d321e6a 100644
--- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/RobotDriveBase.java
+++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/RobotDriveBase.java
@@ -32,7 +32,7 @@ public enum MotorType {
kFrontRight(1),
/** Rear left motor. */
kRearLeft(2),
- /** Reat right motor. */
+ /** Rear right motor. */
kRearRight(3),
/** Left motor. */
kLeft(0),
diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DifferentialDrivetrainSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DifferentialDrivetrainSim.java
index a1216598f25..6e25b344393 100644
--- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DifferentialDrivetrainSim.java
+++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/DifferentialDrivetrainSim.java
@@ -102,7 +102,7 @@ public DifferentialDrivetrainSim(
* @param driveMotor A {@link DCMotor} representing the drivetrain.
* @param gearing The gearingRatio ratio of the robot, as output over input. This must be the same
* ratio as the ratio used to identify or create the drivetrainPlant.
- * @param trackWidthMeters The distance between the two sides of the drivetrian. Can be found with
+ * @param trackWidthMeters The distance between the two sides of the drivetrain. Can be found with
* SysId.
* @param wheelRadiusMeters The radius of the wheels on the drivetrain, in meters.
* @param measurementStdDevs Standard deviations for measurements, in the form [x, y, heading,
diff --git a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/flywheelbangbangcontroller/Robot.java b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/flywheelbangbangcontroller/Robot.java
index b62c90077af..abba8a7365c 100644
--- a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/flywheelbangbangcontroller/Robot.java
+++ b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/flywheelbangbangcontroller/Robot.java
@@ -41,7 +41,7 @@ public class Robot extends TimedRobot {
private final PWMSparkMax m_flywheelMotor = new PWMSparkMax(kMotorPort);
private final Encoder m_encoder = new Encoder(kEncoderAChannel, kEncoderBChannel);
- private final BangBangController m_bangBangControler = new BangBangController();
+ private final BangBangController m_bangBangController = new BangBangController();
// Gains are for example purposes only - must be determined for your own robot!
public static final double kFlywheelKs = 0.0001; // V
@@ -69,8 +69,8 @@ public class Robot extends TimedRobot {
private final EncoderSim m_encoderSim = new EncoderSim(m_encoder);
public Robot() {
- // Add bang-bang controler to SmartDashboard and networktables.
- SmartDashboard.putData(m_bangBangControler);
+ // Add bang-bang controller to SmartDashboard and networktables.
+ SmartDashboard.putData(m_bangBangController);
}
/** Controls flywheel to a set speed (RPM) controlled by a joystick. */
@@ -84,7 +84,7 @@ public void teleopPeriodic() {
* Units.rotationsPerMinuteToRadiansPerSecond(kMaxSetpointValue));
// Set setpoint and measurement of the bang-bang controller
- double bangOutput = m_bangBangControler.calculate(m_encoder.getRate(), setpoint) * 12.0;
+ double bangOutput = m_bangBangController.calculate(m_encoder.getRate(), setpoint) * 12.0;
// Controls a motor with the output of the BangBang controller and a
// feedforward. The feedforward is reduced slightly to avoid overspeeding
diff --git a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/gyro/Robot.java b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/gyro/Robot.java
index 66a0e6c487c..bb7b913b650 100644
--- a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/gyro/Robot.java
+++ b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/gyro/Robot.java
@@ -18,7 +18,7 @@
*/
public class Robot extends TimedRobot {
private static final double kAngleSetpoint = 0.0;
- private static final double kP = 0.005; // propotional turning constant
+ private static final double kP = 0.005; // proportional turning constant
// gyro calibration constant, may need to be adjusted;
// gyro value of 360 is set to correspond to one full revolution
diff --git a/wpimath/src/main/java/edu/wpi/first/math/estimator/MerweScaledSigmaPoints.java b/wpimath/src/main/java/edu/wpi/first/math/estimator/MerweScaledSigmaPoints.java
index 24fa771f339..7c378dff47f 100644
--- a/wpimath/src/main/java/edu/wpi/first/math/estimator/MerweScaledSigmaPoints.java
+++ b/wpimath/src/main/java/edu/wpi/first/math/estimator/MerweScaledSigmaPoints.java
@@ -19,7 +19,7 @@
*
*
States is the dimensionality of the state. 2*States+1 weights will be generated.
*
- *
[1] R. Van der Merwe "Sigma-Point Kalman Filters for Probabilitic Inference in Dynamic
+ *
[1] R. Van der Merwe "Sigma-Point Kalman Filters for Probabilistic Inference in Dynamic
* State-Space Models" (Doctoral dissertation)
*
* @param The dimensionality of the state. 2 * States + 1 weights will be generated.
diff --git a/wpimath/src/main/java/edu/wpi/first/math/jni/DAREJNI.java b/wpimath/src/main/java/edu/wpi/first/math/jni/DAREJNI.java
index 644250f6118..72f3db7171e 100644
--- a/wpimath/src/main/java/edu/wpi/first/math/jni/DAREJNI.java
+++ b/wpimath/src/main/java/edu/wpi/first/math/jni/DAREJNI.java
@@ -22,7 +22,7 @@ public final class DAREJNI extends WPIMathJNI {
*
*
*
Only use this function if you're sure the preconditions are met. Solves the discrete
- * alegebraic Riccati equation.
+ * algebraic Riccati equation.
*
* @param A Array containing elements of A in row-major order.
* @param B Array containing elements of B in row-major order.
diff --git a/wpimath/src/main/java/edu/wpi/first/math/kinematics/ChassisSpeeds.java b/wpimath/src/main/java/edu/wpi/first/math/kinematics/ChassisSpeeds.java
index 5ad8f36c5bb..44628733e32 100644
--- a/wpimath/src/main/java/edu/wpi/first/math/kinematics/ChassisSpeeds.java
+++ b/wpimath/src/main/java/edu/wpi/first/math/kinematics/ChassisSpeeds.java
@@ -159,7 +159,7 @@ public static ChassisSpeeds discretize(
/**
* Discretizes a continuous-time chassis speed.
*
- *
This function converts a continous-time chassis speed into a discrete-time one such that
+ *
This function converts a continuous-time chassis speed into a discrete-time one such that
* when the discrete-time chassis speed is applied for one timestep, the robot moves as if the
* velocity components are independent (i.e., the robot moves v_x * dt along the x-axis, v_y * dt
* along the y-axis, and omega * dt around the z-axis).
diff --git a/wpimath/src/main/java/edu/wpi/first/math/kinematics/DifferentialDriveWheelPositions.java b/wpimath/src/main/java/edu/wpi/first/math/kinematics/DifferentialDriveWheelPositions.java
index d97285f646b..24f3070847d 100644
--- a/wpimath/src/main/java/edu/wpi/first/math/kinematics/DifferentialDriveWheelPositions.java
+++ b/wpimath/src/main/java/edu/wpi/first/math/kinematics/DifferentialDriveWheelPositions.java
@@ -23,11 +23,11 @@ public class DifferentialDriveWheelPositions
/** Distance measured by the right side. */
public double rightMeters;
- /** DifferentialDriveWheelPostions struct for serialization. */
+ /** DifferentialDriveWheelPositions struct for serialization. */
public static final DifferentialDriveWheelPositionsStruct struct =
new DifferentialDriveWheelPositionsStruct();
- /** DifferentialDriveWheelPostions struct for serialization. */
+ /** DifferentialDriveWheelPositions struct for serialization. */
public static final DifferentialDriveWheelPositionsProto proto =
new DifferentialDriveWheelPositionsProto();
diff --git a/wpimath/src/main/java/edu/wpi/first/math/system/NumericalIntegration.java b/wpimath/src/main/java/edu/wpi/first/math/system/NumericalIntegration.java
index 36d7bcb7a74..feddf66e0a5 100644
--- a/wpimath/src/main/java/edu/wpi/first/math/system/NumericalIntegration.java
+++ b/wpimath/src/main/java/edu/wpi/first/math/system/NumericalIntegration.java
@@ -88,7 +88,7 @@ public static Matrix rk4(
/**
* Performs 4th order Runge-Kutta integration of dx/dt = f(x) for dt.
*
- * @param A Num prepresenting the states of the system.
+ * @param A Num representing the states of the system.
* @param f The function to integrate. It must take one argument x.
* @param x The initial value of x.
* @param dtSeconds The time over which to integrate.
diff --git a/wpimath/src/main/java/edu/wpi/first/math/trajectory/ExponentialProfile.java b/wpimath/src/main/java/edu/wpi/first/math/trajectory/ExponentialProfile.java
index 896ba6bdc51..db6f8f7a1cb 100644
--- a/wpimath/src/main/java/edu/wpi/first/math/trajectory/ExponentialProfile.java
+++ b/wpimath/src/main/java/edu/wpi/first/math/trajectory/ExponentialProfile.java
@@ -96,7 +96,7 @@ private Constraints(double maxInput, double A, double B) {
/**
* Computes the max achievable velocity for an Exponential Profile.
*
- * @return The seady-state velocity achieved by this profile.
+ * @return The steady-state velocity achieved by this profile.
*/
public double maxVelocity() {
return -maxInput * B / A;
diff --git a/wpimath/src/main/java/edu/wpi/first/math/trajectory/TrapezoidProfile.java b/wpimath/src/main/java/edu/wpi/first/math/trajectory/TrapezoidProfile.java
index 355981ed2be..c18f1e19d3b 100644
--- a/wpimath/src/main/java/edu/wpi/first/math/trajectory/TrapezoidProfile.java
+++ b/wpimath/src/main/java/edu/wpi/first/math/trajectory/TrapezoidProfile.java
@@ -50,7 +50,7 @@ public class TrapezoidProfile {
private double m_endAccel;
private double m_endFullSpeed;
- private double m_endDeccel;
+ private double m_endDecel;
/** Profile constraints. */
public static class Constraints {
@@ -185,7 +185,7 @@ public State calculate(double t, State current, State goal) {
m_endAccel = accelerationTime - cutoffBegin;
m_endFullSpeed = m_endAccel + fullSpeedDist / m_constraints.maxVelocity;
- m_endDeccel = m_endFullSpeed + accelerationTime - cutoffEnd;
+ m_endDecel = m_endFullSpeed + accelerationTime - cutoffEnd;
State result = new State(m_current.position, m_current.velocity);
if (t < m_endAccel) {
@@ -196,9 +196,9 @@ public State calculate(double t, State current, State goal) {
result.position +=
(m_current.velocity + m_endAccel * m_constraints.maxAcceleration / 2.0) * m_endAccel
+ m_constraints.maxVelocity * (t - m_endAccel);
- } else if (t <= m_endDeccel) {
- result.velocity = goal.velocity + (m_endDeccel - t) * m_constraints.maxAcceleration;
- double timeLeft = m_endDeccel - t;
+ } else if (t <= m_endDecel) {
+ result.velocity = goal.velocity + (m_endDecel - t) * m_constraints.maxAcceleration;
+ double timeLeft = m_endDecel - t;
result.position =
goal.position
- (goal.velocity + timeLeft * m_constraints.maxAcceleration / 2.0) * timeLeft;
@@ -232,7 +232,7 @@ public double timeLeftUntil(double target) {
endFullSpeed = Math.max(endFullSpeed, 0);
final double acceleration = m_constraints.maxAcceleration;
- final double decceleration = -m_constraints.maxAcceleration;
+ final double deceleration = -m_constraints.maxAcceleration;
double distToTarget = Math.abs(target - position);
if (distToTarget < 1e-6) {
@@ -241,40 +241,40 @@ public double timeLeftUntil(double target) {
double accelDist = velocity * endAccel + 0.5 * acceleration * endAccel * endAccel;
- double deccelVelocity;
+ double decelVelocity;
if (endAccel > 0) {
- deccelVelocity = Math.sqrt(Math.abs(velocity * velocity + 2 * acceleration * accelDist));
+ decelVelocity = Math.sqrt(Math.abs(velocity * velocity + 2 * acceleration * accelDist));
} else {
- deccelVelocity = velocity;
+ decelVelocity = velocity;
}
double fullSpeedDist = m_constraints.maxVelocity * endFullSpeed;
- double deccelDist;
+ double decelDist;
if (accelDist > distToTarget) {
accelDist = distToTarget;
fullSpeedDist = 0;
- deccelDist = 0;
+ decelDist = 0;
} else if (accelDist + fullSpeedDist > distToTarget) {
fullSpeedDist = distToTarget - accelDist;
- deccelDist = 0;
+ decelDist = 0;
} else {
- deccelDist = distToTarget - fullSpeedDist - accelDist;
+ decelDist = distToTarget - fullSpeedDist - accelDist;
}
double accelTime =
(-velocity + Math.sqrt(Math.abs(velocity * velocity + 2 * acceleration * accelDist)))
/ acceleration;
- double deccelTime =
- (-deccelVelocity
+ double decelTime =
+ (-decelVelocity
+ Math.sqrt(
- Math.abs(deccelVelocity * deccelVelocity + 2 * decceleration * deccelDist)))
- / decceleration;
+ Math.abs(decelVelocity * decelVelocity + 2 * deceleration * decelDist)))
+ / deceleration;
double fullSpeedTime = fullSpeedDist / m_constraints.maxVelocity;
- return accelTime + fullSpeedTime + deccelTime;
+ return accelTime + fullSpeedTime + decelTime;
}
/**
@@ -283,7 +283,7 @@ public double timeLeftUntil(double target) {
* @return The total time the profile takes to reach the goal.
*/
public double totalTime() {
- return m_endDeccel;
+ return m_endDecel;
}
/**
diff --git a/wpimath/src/main/native/include/frc/controller/DifferentialDriveAccelerationLimiter.h b/wpimath/src/main/native/include/frc/controller/DifferentialDriveAccelerationLimiter.h
index d84e3cee8d6..108d590b9bc 100644
--- a/wpimath/src/main/native/include/frc/controller/DifferentialDriveAccelerationLimiter.h
+++ b/wpimath/src/main/native/include/frc/controller/DifferentialDriveAccelerationLimiter.h
@@ -59,7 +59,7 @@ class WPILIB_DLLEXPORT DifferentialDriveAccelerationLimiter {
units::radians_per_second_squared_t maxAngularAccel);
/**
- * Returns the next voltage pair subject to acceleraiton constraints.
+ * Returns the next voltage pair subject to acceleration constraints.
*
* @param leftVelocity The left wheel velocity.
* @param rightVelocity The right wheel velocity.
diff --git a/wpimath/src/main/native/include/frc/estimator/KalmanFilterLatencyCompensator.h b/wpimath/src/main/native/include/frc/estimator/KalmanFilterLatencyCompensator.h
index b93d614f016..faa67f6274b 100644
--- a/wpimath/src/main/native/include/frc/estimator/KalmanFilterLatencyCompensator.h
+++ b/wpimath/src/main/native/include/frc/estimator/KalmanFilterLatencyCompensator.h
@@ -59,7 +59,7 @@ class KalmanFilterLatencyCompensator {
* @param observer The observer.
* @param u The input at the timestamp.
* @param localY The local output at the timestamp
- * @param timestamp The timesnap of the state.
+ * @param timestamp The timestamp of the state.
*/
void AddObserverState(const KalmanFilterType& observer, Vectord u,
Vectord localY, units::second_t timestamp) {
diff --git a/wpimath/src/main/native/include/frc/estimator/MerweScaledSigmaPoints.h b/wpimath/src/main/native/include/frc/estimator/MerweScaledSigmaPoints.h
index 6395d8d3f1e..ffc65eee854 100644
--- a/wpimath/src/main/native/include/frc/estimator/MerweScaledSigmaPoints.h
+++ b/wpimath/src/main/native/include/frc/estimator/MerweScaledSigmaPoints.h
@@ -18,7 +18,7 @@ namespace frc {
* version seen in most publications. Unless you know better, this should be
* your default choice.
*
- * [1] R. Van der Merwe "Sigma-Point Kalman Filters for Probabilitic
+ * [1] R. Van der Merwe "Sigma-Point Kalman Filters for Probabilistic
* Inference in Dynamic State-Space Models" (Doctoral dissertation)
*
* @tparam States The dimensionality of the state. 2 * States + 1 weights will
diff --git a/wpimath/src/main/native/include/frc/estimator/SteadyStateKalmanFilter.h b/wpimath/src/main/native/include/frc/estimator/SteadyStateKalmanFilter.h
index 0604541561b..c63e5802c60 100644
--- a/wpimath/src/main/native/include/frc/estimator/SteadyStateKalmanFilter.h
+++ b/wpimath/src/main/native/include/frc/estimator/SteadyStateKalmanFilter.h
@@ -48,7 +48,7 @@ class SteadyStateKalmanFilter {
using OutputArray = wpi::array;
/**
- * Constructs a staeady-state Kalman filter with the given plant.
+ * Constructs a steady-state Kalman filter with the given plant.
*
* See
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-observers.html#process-and-measurement-noise-covariance-matrices
diff --git a/wpimath/src/main/native/include/frc/estimator/UnscentedTransform.h b/wpimath/src/main/native/include/frc/estimator/UnscentedTransform.h
index bec3bc841da..4a99e90157d 100644
--- a/wpimath/src/main/native/include/frc/estimator/UnscentedTransform.h
+++ b/wpimath/src/main/native/include/frc/estimator/UnscentedTransform.h
@@ -30,7 +30,7 @@ namespace frc {
* vectors using a given set of weights.
* @param residualFunc A function that computes the residual of two state
* vectors (i.e. it subtracts them.)
- * @param squareRootR Square-root of the noise covaraince of the sigma points.
+ * @param squareRootR Square-root of the noise covariance of the sigma points.
*
* @return Tuple of x, mean of sigma points; S, square-root covariance of
* sigmas.
diff --git a/wpimath/src/main/native/include/frc/kinematics/ChassisSpeeds.h b/wpimath/src/main/native/include/frc/kinematics/ChassisSpeeds.h
index dc490e9b414..299e18a28b2 100644
--- a/wpimath/src/main/native/include/frc/kinematics/ChassisSpeeds.h
+++ b/wpimath/src/main/native/include/frc/kinematics/ChassisSpeeds.h
@@ -50,7 +50,7 @@ struct WPILIB_DLLEXPORT ChassisSpeeds {
}
/**
- * Disretizes a continuous-time chassis speed.
+ * Discretizes a continuous-time chassis speed.
*
* This function converts a continuous-time chassis speed into a discrete-time
* one such that when the discrete-time chassis speed is applied for one
@@ -85,7 +85,7 @@ struct WPILIB_DLLEXPORT ChassisSpeeds {
}
/**
- * Disretizes a continuous-time chassis speed.
+ * Discretizes a continuous-time chassis speed.
*
* This function converts a continuous-time chassis speed into a discrete-time
* one such that when the discrete-time chassis speed is applied for one
diff --git a/wpimath/src/main/native/include/frc/trajectory/ExponentialProfile.h b/wpimath/src/main/native/include/frc/trajectory/ExponentialProfile.h
index 9f836c10363..b5e8952b689 100644
--- a/wpimath/src/main/native/include/frc/trajectory/ExponentialProfile.h
+++ b/wpimath/src/main/native/include/frc/trajectory/ExponentialProfile.h
@@ -103,7 +103,7 @@ class ExponentialProfile {
/**
* Computes the max achievable velocity for an Exponential Profile.
*
- * @return The seady-state velocity achieved by this profile.
+ * @return The steady-state velocity achieved by this profile.
*/
Velocity_t MaxVelocity() const { return -maxInput * B / A; }
diff --git a/wpimath/src/main/native/include/frc/trajectory/TrapezoidProfile.h b/wpimath/src/main/native/include/frc/trajectory/TrapezoidProfile.h
index 0f4c65ec884..08df10c8d94 100644
--- a/wpimath/src/main/native/include/frc/trajectory/TrapezoidProfile.h
+++ b/wpimath/src/main/native/include/frc/trajectory/TrapezoidProfile.h
@@ -132,7 +132,7 @@ class TrapezoidProfile {
*
* @return The total time the profile takes to reach the goal.
*/
- units::second_t TotalTime() const { return m_endDeccel; }
+ units::second_t TotalTime() const { return m_endDecel; }
/**
* Returns true if the profile has reached the goal.
@@ -174,7 +174,7 @@ class TrapezoidProfile {
units::second_t m_endAccel;
units::second_t m_endFullSpeed;
- units::second_t m_endDeccel;
+ units::second_t m_endDecel;
};
} // namespace frc
diff --git a/wpimath/src/main/native/include/frc/trajectory/TrapezoidProfile.inc b/wpimath/src/main/native/include/frc/trajectory/TrapezoidProfile.inc
index 75e76d9eeed..4b1eff72b69 100644
--- a/wpimath/src/main/native/include/frc/trajectory/TrapezoidProfile.inc
+++ b/wpimath/src/main/native/include/frc/trajectory/TrapezoidProfile.inc
@@ -58,7 +58,7 @@ TrapezoidProfile::Calculate(units::second_t t, State current,
m_endAccel = accelerationTime - cutoffBegin;
m_endFullSpeed = m_endAccel + fullSpeedDist / m_constraints.maxVelocity;
- m_endDeccel = m_endFullSpeed + accelerationTime - cutoffEnd;
+ m_endDecel = m_endFullSpeed + accelerationTime - cutoffEnd;
State result = m_current;
if (t < m_endAccel) {
@@ -71,10 +71,10 @@ TrapezoidProfile::Calculate(units::second_t t, State current,
m_endAccel * m_constraints.maxAcceleration / 2.0) *
m_endAccel +
m_constraints.maxVelocity * (t - m_endAccel);
- } else if (t <= m_endDeccel) {
+ } else if (t <= m_endDecel) {
result.velocity =
- goal.velocity + (m_endDeccel - t) * m_constraints.maxAcceleration;
- units::second_t timeLeft = m_endDeccel - t;
+ goal.velocity + (m_endDecel - t) * m_constraints.maxAcceleration;
+ units::second_t timeLeft = m_endDecel - t;
result.position =
goal.position -
(goal.velocity + timeLeft * m_constraints.maxAcceleration / 2.0) *
@@ -105,7 +105,7 @@ units::second_t TrapezoidProfile::TimeLeftUntil(
endFullSpeed = units::math::max(endFullSpeed, 0_s);
const Acceleration_t acceleration = m_constraints.maxAcceleration;
- const Acceleration_t decceleration = -m_constraints.maxAcceleration;
+ const Acceleration_t deceleration = -m_constraints.maxAcceleration;
Distance_t distToTarget = units::math::abs(target - position);
@@ -116,26 +116,26 @@ units::second_t TrapezoidProfile::TimeLeftUntil(
Distance_t accelDist =
velocity * endAccel + 0.5 * acceleration * endAccel * endAccel;
- Velocity_t deccelVelocity;
+ Velocity_t decelVelocity;
if (endAccel > 0_s) {
- deccelVelocity = units::math::sqrt(
+ decelVelocity = units::math::sqrt(
units::math::abs(velocity * velocity + 2 * acceleration * accelDist));
} else {
- deccelVelocity = velocity;
+ decelVelocity = velocity;
}
Distance_t fullSpeedDist = m_constraints.maxVelocity * endFullSpeed;
- Distance_t deccelDist;
+ Distance_t decelDist;
if (accelDist > distToTarget) {
accelDist = distToTarget;
fullSpeedDist = Distance_t{0};
- deccelDist = Distance_t{0};
+ decelDist = Distance_t{0};
} else if (accelDist + fullSpeedDist > distToTarget) {
fullSpeedDist = distToTarget - accelDist;
- deccelDist = Distance_t{0};
+ decelDist = Distance_t{0};
} else {
- deccelDist = distToTarget - fullSpeedDist - accelDist;
+ decelDist = distToTarget - fullSpeedDist - accelDist;
}
units::second_t accelTime =
@@ -143,14 +143,14 @@ units::second_t TrapezoidProfile::TimeLeftUntil(
velocity * velocity + 2 * acceleration * accelDist))) /
acceleration;
- units::second_t deccelTime =
- (-deccelVelocity +
- units::math::sqrt(units::math::abs(deccelVelocity * deccelVelocity +
- 2 * decceleration * deccelDist))) /
- decceleration;
+ units::second_t decelTime =
+ (-decelVelocity +
+ units::math::sqrt(units::math::abs(decelVelocity * decelVelocity +
+ 2 * deceleration * decelDist))) /
+ deceleration;
units::second_t fullSpeedTime = fullSpeedDist / m_constraints.maxVelocity;
- return accelTime + fullSpeedTime + deccelTime;
+ return accelTime + fullSpeedTime + decelTime;
}
} // namespace frc
diff --git a/wpimath/src/test/java/edu/wpi/first/math/controller/ArmFeedforwardTest.java b/wpimath/src/test/java/edu/wpi/first/math/controller/ArmFeedforwardTest.java
index b553fb0da37..d33af05d33f 100644
--- a/wpimath/src/test/java/edu/wpi/first/math/controller/ArmFeedforwardTest.java
+++ b/wpimath/src/test/java/edu/wpi/first/math/controller/ArmFeedforwardTest.java
@@ -90,13 +90,13 @@ void testCalculate() {
}
@Test
- void testAcheviableVelocity() {
+ void testAchievableVelocity() {
assertEquals(6, m_armFF.maxAchievableVelocity(12, Math.PI / 3, 1), 0.002);
assertEquals(-9, m_armFF.minAchievableVelocity(11.5, Math.PI / 3, 1), 0.002);
}
@Test
- void testAcheviableAcceleration() {
+ void testAchievableAcceleration() {
assertEquals(4.75, m_armFF.maxAchievableAcceleration(12, Math.PI / 3, 1), 0.002);
assertEquals(6.75, m_armFF.maxAchievableAcceleration(12, Math.PI / 3, -1), 0.002);
assertEquals(-7.25, m_armFF.minAchievableAcceleration(12, Math.PI / 3, 1), 0.002);
diff --git a/wpimath/src/test/java/edu/wpi/first/math/controller/DifferentialDriveAccelerationLimiterTest.java b/wpimath/src/test/java/edu/wpi/first/math/controller/DifferentialDriveAccelerationLimiterTest.java
index 4ec558d4e77..f67136faed9 100644
--- a/wpimath/src/test/java/edu/wpi/first/math/controller/DifferentialDriveAccelerationLimiterTest.java
+++ b/wpimath/src/test/java/edu/wpi/first/math/controller/DifferentialDriveAccelerationLimiterTest.java
@@ -171,7 +171,7 @@ void testHighLimits() {
}
@Test
- void testSeperateMinMaxLowLimits() {
+ void testSeparateMinMaxLowLimits() {
final double trackwidth = 0.9;
final double dt = 0.005;
final double minA = -1.0;
diff --git a/wpimath/src/test/java/edu/wpi/first/math/controller/ElevatorFeedforwardTest.java b/wpimath/src/test/java/edu/wpi/first/math/controller/ElevatorFeedforwardTest.java
index 90344937b3e..a963d507bde 100644
--- a/wpimath/src/test/java/edu/wpi/first/math/controller/ElevatorFeedforwardTest.java
+++ b/wpimath/src/test/java/edu/wpi/first/math/controller/ElevatorFeedforwardTest.java
@@ -43,13 +43,13 @@ void testCalculate() {
}
@Test
- void testAcheviableVelocity() {
+ void testAchievableVelocity() {
assertEquals(5, m_elevatorFF.maxAchievableVelocity(11, 1), 0.002);
assertEquals(-9, m_elevatorFF.minAchievableVelocity(11, 1), 0.002);
}
@Test
- void testAcheviableAcceleration() {
+ void testAchievableAcceleration() {
assertEquals(3.75, m_elevatorFF.maxAchievableAcceleration(12, 2), 0.002);
assertEquals(7.25, m_elevatorFF.maxAchievableAcceleration(12, -2), 0.002);
assertEquals(-8.25, m_elevatorFF.minAchievableAcceleration(12, 2), 0.002);
diff --git a/wpimath/src/test/java/edu/wpi/first/math/estimator/DifferentialDrivePoseEstimatorTest.java b/wpimath/src/test/java/edu/wpi/first/math/estimator/DifferentialDrivePoseEstimatorTest.java
index 0fdcfc3114f..221c98be03d 100644
--- a/wpimath/src/test/java/edu/wpi/first/math/estimator/DifferentialDrivePoseEstimatorTest.java
+++ b/wpimath/src/test/java/edu/wpi/first/math/estimator/DifferentialDrivePoseEstimatorTest.java
@@ -220,7 +220,7 @@ void testFollowTrajectory(
@Test
void testSimultaneousVisionMeasurements() {
- // This tests for multiple vision measurements appled at the same time. The expected behavior
+ // This tests for multiple vision measurements applied at the same time. The expected behavior
// is that all measurements affect the estimated pose. The alternative result is that only one
// vision measurement affects the outcome. If that were the case, after 1000 measurements, the
// estimated pose would converge to that measurement.
diff --git a/wpimath/src/test/java/edu/wpi/first/math/estimator/MecanumDrivePoseEstimatorTest.java b/wpimath/src/test/java/edu/wpi/first/math/estimator/MecanumDrivePoseEstimatorTest.java
index d65cf25675e..0dba2bbe679 100644
--- a/wpimath/src/test/java/edu/wpi/first/math/estimator/MecanumDrivePoseEstimatorTest.java
+++ b/wpimath/src/test/java/edu/wpi/first/math/estimator/MecanumDrivePoseEstimatorTest.java
@@ -229,7 +229,7 @@ void testFollowTrajectory(
@Test
void testSimultaneousVisionMeasurements() {
- // This tests for multiple vision measurements appled at the same time. The expected behavior
+ // This tests for multiple vision measurements applied at the same time. The expected behavior
// is that all measurements affect the estimated pose. The alternative result is that only one
// vision measurement affects the outcome. If that were the case, after 1000 measurements, the
// estimated pose would converge to that measurement.
diff --git a/wpimath/src/test/java/edu/wpi/first/math/estimator/SwerveDrivePoseEstimatorTest.java b/wpimath/src/test/java/edu/wpi/first/math/estimator/SwerveDrivePoseEstimatorTest.java
index 0abdd5de6a8..54398902f7b 100644
--- a/wpimath/src/test/java/edu/wpi/first/math/estimator/SwerveDrivePoseEstimatorTest.java
+++ b/wpimath/src/test/java/edu/wpi/first/math/estimator/SwerveDrivePoseEstimatorTest.java
@@ -245,7 +245,7 @@ void testFollowTrajectory(
@Test
void testSimultaneousVisionMeasurements() {
- // This tests for multiple vision measurements appled at the same time. The expected behavior
+ // This tests for multiple vision measurements applied at the same time. The expected behavior
// is that all measurements affect the estimated pose. The alternative result is that only one
// vision measurement affects the outcome. If that were the case, after 1000 measurements, the
// estimated pose would converge to that measurement.
diff --git a/wpimath/src/test/java/edu/wpi/first/math/geometry/Twist2dTest.java b/wpimath/src/test/java/edu/wpi/first/math/geometry/Twist2dTest.java
index c055f9bd311..22d8f33e8f2 100644
--- a/wpimath/src/test/java/edu/wpi/first/math/geometry/Twist2dTest.java
+++ b/wpimath/src/test/java/edu/wpi/first/math/geometry/Twist2dTest.java
@@ -20,7 +20,7 @@ void testStraight() {
}
@Test
- void testQuarterCirle() {
+ void testQuarterCircle() {
var quarterCircle = new Twist2d(5.0 / 2.0 * Math.PI, 0, Math.PI / 2.0);
var quarterCirclePose = Pose2d.kZero.exp(quarterCircle);
diff --git a/wpimath/src/test/java/edu/wpi/first/math/geometry/Twist3dTest.java b/wpimath/src/test/java/edu/wpi/first/math/geometry/Twist3dTest.java
index c7ef7877243..03ac6100dc4 100644
--- a/wpimath/src/test/java/edu/wpi/first/math/geometry/Twist3dTest.java
+++ b/wpimath/src/test/java/edu/wpi/first/math/geometry/Twist3dTest.java
@@ -40,7 +40,7 @@ void testStraightZ() {
}
@Test
- void testQuarterCirle() {
+ void testQuarterCircle() {
var zAxis = VecBuilder.fill(0.0, 0.0, 1.0);
var quarterCircle = new Twist3d(5.0 / 2.0 * Math.PI, 0.0, 0.0, 0.0, 0.0, Math.PI / 2.0);
diff --git a/wpimath/src/test/native/cpp/controller/DifferentialDriveAccelerationLimiterTest.cpp b/wpimath/src/test/native/cpp/controller/DifferentialDriveAccelerationLimiterTest.cpp
index ab8359c6ed9..452e017eccb 100644
--- a/wpimath/src/test/native/cpp/controller/DifferentialDriveAccelerationLimiterTest.cpp
+++ b/wpimath/src/test/native/cpp/controller/DifferentialDriveAccelerationLimiterTest.cpp
@@ -171,7 +171,7 @@ TEST(DifferentialDriveAccelerationLimiterTest, HighLimits) {
}
}
-TEST(DifferentialDriveAccelerationLimiterTest, SeperateMinMaxLowLimits) {
+TEST(DifferentialDriveAccelerationLimiterTest, SeparateMinMaxLowLimits) {
constexpr auto trackwidth = 0.9_m;
constexpr auto dt = 5_ms;
constexpr auto minA = -1_mps_sq;
diff --git a/wpimath/src/test/native/cpp/estimator/DifferentialDrivePoseEstimatorTest.cpp b/wpimath/src/test/native/cpp/estimator/DifferentialDrivePoseEstimatorTest.cpp
index 3fb42f9c9c2..fbc2d212331 100644
--- a/wpimath/src/test/native/cpp/estimator/DifferentialDrivePoseEstimatorTest.cpp
+++ b/wpimath/src/test/native/cpp/estimator/DifferentialDrivePoseEstimatorTest.cpp
@@ -212,7 +212,7 @@ TEST(DifferentialDrivePoseEstimatorTest, BadInitialPose) {
}
TEST(DifferentialDrivePoseEstimatorTest, SimultaneousVisionMeasurements) {
- // This tests for multiple vision measurements appled at the same time.
+ // This tests for multiple vision measurements applied at the same time.
// The expected behavior is that all measurements affect the estimated pose.
// The alternative result is that only one vision measurement affects the
// outcome. If that were the case, after 1000 measurements, the estimated
diff --git a/wpimath/src/test/native/cpp/estimator/MecanumDrivePoseEstimatorTest.cpp b/wpimath/src/test/native/cpp/estimator/MecanumDrivePoseEstimatorTest.cpp
index 1132866b778..8ba38c23256 100644
--- a/wpimath/src/test/native/cpp/estimator/MecanumDrivePoseEstimatorTest.cpp
+++ b/wpimath/src/test/native/cpp/estimator/MecanumDrivePoseEstimatorTest.cpp
@@ -211,7 +211,7 @@ TEST(MecanumDrivePoseEstimatorTest, BadInitialPose) {
}
TEST(MecanumDrivePoseEstimatorTest, SimultaneousVisionMeasurements) {
- // This tests for multiple vision measurements appled at the same time.
+ // This tests for multiple vision measurements applied at the same time.
// The expected behavior is that all measurements affect the estimated pose.
// The alternative result is that only one vision measurement affects the
// outcome. If that were the case, after 1000 measurements, the estimated
diff --git a/wpimath/src/test/native/cpp/estimator/SwerveDrivePoseEstimatorTest.cpp b/wpimath/src/test/native/cpp/estimator/SwerveDrivePoseEstimatorTest.cpp
index 6296ee36d10..9619e6a30f3 100644
--- a/wpimath/src/test/native/cpp/estimator/SwerveDrivePoseEstimatorTest.cpp
+++ b/wpimath/src/test/native/cpp/estimator/SwerveDrivePoseEstimatorTest.cpp
@@ -220,7 +220,7 @@ TEST(SwerveDrivePoseEstimatorTest, BadInitialPose) {
}
TEST(SwerveDrivePoseEstimatorTest, SimultaneousVisionMeasurements) {
- // This tests for multiple vision measurements appled at the same time.
+ // This tests for multiple vision measurements applied at the same time.
// The expected behavior is that all measurements affect the estimated pose.
// The alternative result is that only one vision measurement affects the
// outcome. If that were the case, after 1000 measurements, the estimated
diff --git a/wpimath/src/test/native/cpp/filter/SlewRateLimiterTest.cpp b/wpimath/src/test/native/cpp/filter/SlewRateLimiterTest.cpp
index 9657543de45..aabd6ad0c34 100644
--- a/wpimath/src/test/native/cpp/filter/SlewRateLimiterTest.cpp
+++ b/wpimath/src/test/native/cpp/filter/SlewRateLimiterTest.cpp
@@ -39,7 +39,7 @@ TEST_F(SlewRateLimiterTest, SlewRateNoLimit) {
EXPECT_EQ(limiter.Calculate(0.5_m), 0.5_m);
}
-TEST_F(SlewRateLimiterTest, SlewRatePositveNegativeLimit) {
+TEST_F(SlewRateLimiterTest, SlewRatePositiveNegativeLimit) {
frc::SlewRateLimiter limiter(1_mps, -0.5_mps);
now += 1_s;
diff --git a/wpimath/src/test/native/cpp/trajectory/ExponentialProfileTest.cpp b/wpimath/src/test/native/cpp/trajectory/ExponentialProfileTest.cpp
index e4ecb518730..8bb39cecdb8 100644
--- a/wpimath/src/test/native/cpp/trajectory/ExponentialProfileTest.cpp
+++ b/wpimath/src/test/native/cpp/trajectory/ExponentialProfileTest.cpp
@@ -65,7 +65,7 @@ TEST(ExponentialProfileTest, ReachesGoal) {
// Tests that decreasing the maximum velocity in the middle when it is already
// moving faster than the new max is handled correctly
-TEST(ExponentialProfileTest, PosContinousUnderVelChange) {
+TEST(ExponentialProfileTest, PosContinuousUnderVelChange) {
frc::ExponentialProfile::Constraints constraints{
12_V, -kV / kA, 1 / kA};
frc::ExponentialProfile profile{constraints};
@@ -88,7 +88,7 @@ TEST(ExponentialProfileTest, PosContinousUnderVelChange) {
// Tests that decreasing the maximum velocity in the middle when it is already
// moving faster than the new max is handled correctly
-TEST(ExponentialProfileTest, PosContinousUnderVelChangeBackward) {
+TEST(ExponentialProfileTest, PosContinuousUnderVelChangeBackward) {
frc::ExponentialProfile::Constraints constraints{
12_V, -kV / kA, 1 / kA};
frc::ExponentialProfile profile{constraints};
diff --git a/wpimath/src/test/native/cpp/trajectory/TrapezoidProfileTest.cpp b/wpimath/src/test/native/cpp/trajectory/TrapezoidProfileTest.cpp
index 09c1ed54bd6..39cbc3b0ea9 100644
--- a/wpimath/src/test/native/cpp/trajectory/TrapezoidProfileTest.cpp
+++ b/wpimath/src/test/native/cpp/trajectory/TrapezoidProfileTest.cpp
@@ -41,7 +41,7 @@ TEST(TrapezoidProfileTest, ReachesGoal) {
// Tests that decreasing the maximum velocity in the middle when it is already
// moving faster than the new max is handled correctly
-TEST(TrapezoidProfileTest, PosContinousUnderVelChange) {
+TEST(TrapezoidProfileTest, PosContinuousUnderVelChange) {
frc::TrapezoidProfile::Constraints constraints{1.75_mps,
0.75_mps_sq};
frc::TrapezoidProfile::State goal{12_m, 0_mps};
diff --git a/wpinet/src/main/native/include/wpinet/UrlParser.h b/wpinet/src/main/native/include/wpinet/UrlParser.h
index 92fd330ce70..1a962e2cffd 100644
--- a/wpinet/src/main/native/include/wpinet/UrlParser.h
+++ b/wpinet/src/main/native/include/wpinet/UrlParser.h
@@ -14,7 +14,7 @@
namespace wpi {
/**
- * Parses a URL into its constiuent components.
+ * Parses a URL into its constituent components.
* `schema://userinfo@host:port/the/path?query#fragment`
*/
class UrlParser {
diff --git a/wpinet/src/main/native/include/wpinet/uv/Async.h b/wpinet/src/main/native/include/wpinet/uv/Async.h
index 2eb13d73085..56a735dfb63 100644
--- a/wpinet/src/main/native/include/wpinet/uv/Async.h
+++ b/wpinet/src/main/native/include/wpinet/uv/Async.h
@@ -30,7 +30,7 @@ namespace wpi::uv {
* template parameters. If data parameters are used, the async callback will
* be called once for every call to Send(). If no data parameters are used,
* the async callback may or may not be called for every call to Send() (e.g.
- * the calls may be coaleasced).
+ * the calls may be coalesced).
*/
template
class Async final : public HandleImpl, uv_async_t> {
@@ -132,7 +132,7 @@ class Async final : public HandleImpl, uv_async_t> {
/**
* Async specialization for no data parameters. The async callback may or may
- * not be called for every call to Send() (e.g. the calls may be coaleasced).
+ * not be called for every call to Send() (e.g. the calls may be coalesced).
*/
template <>
class Async<> final : public HandleImpl, uv_async_t> {
diff --git a/wpinet/src/main/native/include/wpinet/uv/Loop.h b/wpinet/src/main/native/include/wpinet/uv/Loop.h
index 0897c87f2be..2c885d3c241 100644
--- a/wpinet/src/main/native/include/wpinet/uv/Loop.h
+++ b/wpinet/src/main/native/include/wpinet/uv/Loop.h
@@ -102,7 +102,7 @@ class Loop final : public std::enable_shared_from_this {
* * `Loop::kDefault`: Run the event loop until there are no
* active and referenced handles or requests.
* * `Loop::kOnce`: Run a single event loop iteration. Note that this
- * function blocksif there are no pending callbacks.
+ * function blocks if there are no pending callbacks.
* * `Loop::kNoWait`: Run a single event loop iteration, but don't block
* if there are no pending callbacks.
*
diff --git a/wpiunits/src/main/java/edu/wpi/first/units/Current.java b/wpiunits/src/main/java/edu/wpi/first/units/Current.java
index b5d25ac0709..244144fb47e 100644
--- a/wpiunits/src/main/java/edu/wpi/first/units/Current.java
+++ b/wpiunits/src/main/java/edu/wpi/first/units/Current.java
@@ -7,7 +7,7 @@
import static edu.wpi.first.units.Units.Watts;
/**
- * Unit of electic current dimension.
+ * Unit of electric current dimension.
*
* This is the base type for units of current dimension. It is also used to specify the dimension
* for {@link Measure}: Measure<Current>
.
diff --git a/wpiutil/doc/struct.adoc b/wpiutil/doc/struct.adoc
index cac4d4a9674..8a55e9bfac9 100644
--- a/wpiutil/doc/struct.adoc
+++ b/wpiutil/doc/struct.adoc
@@ -202,7 +202,7 @@ results in a 5-byte encoding:
[[layout-bit-field]]
=== Bit-Field Data Layout
-Multiple adjacant bit-fields of the same integer type width are packed together to fit in the minimum number of multiples of that type. The bit-fields are packed, starting from the least significant bit, in the order they appear in the schema. Individual bit-fields must not span across multiple underlying types; if a bit-field is larger than the remaining space in the data type, a new element of that type is started and the bit-field starts from the least significant bit of the new element. Unused bits should be set to 0 during serialization and must be ignored during deserialization.
+Multiple adjacent bit-fields of the same integer type width are packed together to fit in the minimum number of multiples of that type. The bit-fields are packed, starting from the least significant bit, in the order they appear in the schema. Individual bit-fields must not span across multiple underlying types; if a bit-field is larger than the remaining space in the data type, a new element of that type is started and the bit-field starts from the least significant bit of the new element. Unused bits should be set to 0 during serialization and must be ignored during deserialization.
Boolean bit-fields are always a single bit wide. The underlying data type is by default uint8, but if a boolean bit-field immediately follows a bit-field of another integer type (and fits), it is packed into that type.
diff --git a/wpiutil/src/main/java/edu/wpi/first/util/WPIUtilJNI.java b/wpiutil/src/main/java/edu/wpi/first/util/WPIUtilJNI.java
index 58e69c34bc2..bc04257091a 100644
--- a/wpiutil/src/main/java/edu/wpi/first/util/WPIUtilJNI.java
+++ b/wpiutil/src/main/java/edu/wpi/first/util/WPIUtilJNI.java
@@ -138,7 +138,7 @@ public static synchronized void forceLoad() throws IOException {
* multiple-consumer scenario.
*
* @param initialCount initial value for the semaphore's internal counter
- * @param maximumCount maximum value for the samephore's internal counter
+ * @param maximumCount maximum value for the semaphore's internal counter
* @return Semaphore handle
*/
public static native int createSemaphore(int initialCount, int maximumCount);
diff --git a/wpiutil/src/main/java/edu/wpi/first/util/protobuf/Protobuf.java b/wpiutil/src/main/java/edu/wpi/first/util/protobuf/Protobuf.java
index e834d8e3241..e6fda0bee0f 100644
--- a/wpiutil/src/main/java/edu/wpi/first/util/protobuf/Protobuf.java
+++ b/wpiutil/src/main/java/edu/wpi/first/util/protobuf/Protobuf.java
@@ -103,10 +103,10 @@ default boolean isImmutable() {
}
/**
- * Returns whether or not objects are cloneable using the clone() method. Clonable objects must
+ * Returns whether or not objects are cloneable using the clone() method. Cloneable objects must
* also be comparable using the equals() method. Default implementation returns false.
*
- * @return True if object is clonable
+ * @return True if object is cloneable
*/
default boolean isCloneable() {
return false;
diff --git a/wpiutil/src/main/java/edu/wpi/first/util/struct/Struct.java b/wpiutil/src/main/java/edu/wpi/first/util/struct/Struct.java
index 763d61e829e..8e408ceb31a 100644
--- a/wpiutil/src/main/java/edu/wpi/first/util/struct/Struct.java
+++ b/wpiutil/src/main/java/edu/wpi/first/util/struct/Struct.java
@@ -203,10 +203,10 @@ default boolean isImmutable() {
}
/**
- * Returns whether or not objects are cloneable using the clone() method. Clonable objects must
+ * Returns whether or not objects are cloneable using the clone() method. Cloneable objects must
* also be comparable using the equals() method. Default implementation returns false.
*
- * @return True if object is clonable
+ * @return True if object is cloneable
*/
default boolean isCloneable() {
return false;
diff --git a/wpiutil/src/main/native/include/wpi/Synchronization.h b/wpiutil/src/main/native/include/wpi/Synchronization.h
index 62a79efd989..7b983221398 100644
--- a/wpiutil/src/main/native/include/wpi/Synchronization.h
+++ b/wpiutil/src/main/native/include/wpi/Synchronization.h
@@ -90,7 +90,7 @@ void ResetEvent(WPI_EventHandle handle);
* multiple-consumer scenario.
*
* @param initialCount initial value for the semaphore's internal counter
- * @param maximumCount maximum value for the samephore's internal counter
+ * @param maximumCount maximum value for the semaphore's internal counter
* @return Semaphore handle
*/
WPI_SemaphoreHandle CreateSemaphore(int initialCount = 0,
@@ -318,7 +318,7 @@ class Semaphore final {
* Constructor.
*
* @param initialCount initial value for the semaphore's internal counter
- * @param maximumCount maximum value for the samephore's internal counter
+ * @param maximumCount maximum value for the semaphore's internal counter
*/
explicit Semaphore(int initialCount = 0, int maximumCount = INT_MAX)
: m_handle{CreateSemaphore(initialCount, maximumCount)} {}
@@ -491,7 +491,7 @@ void WPI_ResetEvent(WPI_EventHandle handle);
* multiple-consumer scenario.
*
* @param initial_count initial value for the semaphore's internal counter
- * @param maximum_count maximum value for the samephore's internal counter
+ * @param maximum_count maximum value for the semaphore's internal counter
* @return Semaphore handle
*/
WPI_SemaphoreHandle WPI_CreateSemaphore(int initial_count, int maximum_count);
diff --git a/wpiutil/src/main/native/include/wpi/string.h b/wpiutil/src/main/native/include/wpi/string.h
index a001b7be179..b84fdd439cc 100644
--- a/wpiutil/src/main/native/include/wpi/string.h
+++ b/wpiutil/src/main/native/include/wpi/string.h
@@ -55,7 +55,7 @@ void WPI_InitString(struct WPI_String* wpiString, const char* utf8String);
/**
* Initializes a WPI_String from a UTF-8 string and length.
- * If input string is null or 0 length, initilizes output to 0 length.
+ * If input string is null or 0 length, initializes output to 0 length.
* The input string does not need to be null terminated.
*
* The lifetime of the output string is the lifetime of the input string.
From f45df8cf71a0b5e87210d470bc5a24c48afcc896 Mon Sep 17 00:00:00 2001
From: Gold856 <117957790+Gold856@users.noreply.github.com>
Date: Sat, 1 Jun 2024 23:20:01 -0400
Subject: [PATCH 2/4] Fix HAL function names
---
hal/src/main/native/athena/DigitalInternal.cpp | 2 +-
hal/src/main/native/athena/mockdata/SPIAccelerometerData.cpp | 2 +-
hal/src/main/native/include/hal/cpp/UnsafeDIO.h | 4 ++--
.../main/native/include/hal/simulation/SPIAccelerometerData.h | 2 +-
hal/src/main/native/sim/mockdata/SPIAccelerometerData.cpp | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/hal/src/main/native/athena/DigitalInternal.cpp b/hal/src/main/native/athena/DigitalInternal.cpp
index fb0cf980835..13fa560d197 100644
--- a/hal/src/main/native/athena/DigitalInternal.cpp
+++ b/hal/src/main/native/athena/DigitalInternal.cpp
@@ -47,7 +47,7 @@ namespace detail {
wpi::mutex& UnsafeGetDIOMutex() {
return digitalDIOMutex;
}
-tDIO* UnsafeGetDigialSystem() {
+tDIO* UnsafeGetDigitalSystem() {
return digitalSystem.get();
}
int32_t ComputeDigitalMask(HAL_DigitalHandle handle, int32_t* status) {
diff --git a/hal/src/main/native/athena/mockdata/SPIAccelerometerData.cpp b/hal/src/main/native/athena/mockdata/SPIAccelerometerData.cpp
index c938abf55f6..d0aa97f1de3 100644
--- a/hal/src/main/native/athena/mockdata/SPIAccelerometerData.cpp
+++ b/hal/src/main/native/athena/mockdata/SPIAccelerometerData.cpp
@@ -18,7 +18,7 @@ DEFINE_CAPI(double, X, 0)
DEFINE_CAPI(double, Y, 0)
DEFINE_CAPI(double, Z, 0)
-void HALSIM_RegisterSPIAccelerometerAllCallbcaks(int32_t index,
+void HALSIM_RegisterSPIAccelerometerAllCallbacks(int32_t index,
HAL_NotifyCallback callback,
void* param,
HAL_Bool initialNotify) {}
diff --git a/hal/src/main/native/include/hal/cpp/UnsafeDIO.h b/hal/src/main/native/include/hal/cpp/UnsafeDIO.h
index e7f286bb54f..d79265ec92f 100644
--- a/hal/src/main/native/include/hal/cpp/UnsafeDIO.h
+++ b/hal/src/main/native/include/hal/cpp/UnsafeDIO.h
@@ -57,7 +57,7 @@ struct DIOSetProxy {
};
namespace detail {
wpi::mutex& UnsafeGetDIOMutex();
-tDIO* UnsafeGetDigialSystem();
+tDIO* UnsafeGetDigitalSystem();
int32_t ComputeDigitalMask(HAL_DigitalHandle handle, int32_t* status);
} // namespace detail
@@ -81,7 +81,7 @@ void UnsafeManipulateDIO(HAL_DigitalHandle handle, int32_t* status,
return;
}
wpi::mutex& dioMutex = detail::UnsafeGetDIOMutex();
- tDIO* dSys = detail::UnsafeGetDigialSystem();
+ tDIO* dSys = detail::UnsafeGetDigitalSystem();
auto mask = detail::ComputeDigitalMask(handle, status);
if (*status != 0) {
return;
diff --git a/hal/src/main/native/include/hal/simulation/SPIAccelerometerData.h b/hal/src/main/native/include/hal/simulation/SPIAccelerometerData.h
index 406798f1255..2018a40023b 100644
--- a/hal/src/main/native/include/hal/simulation/SPIAccelerometerData.h
+++ b/hal/src/main/native/include/hal/simulation/SPIAccelerometerData.h
@@ -50,7 +50,7 @@ void HALSIM_CancelSPIAccelerometerZCallback(int32_t index, int32_t uid);
double HALSIM_GetSPIAccelerometerZ(int32_t index);
void HALSIM_SetSPIAccelerometerZ(int32_t index, double z);
-void HALSIM_RegisterSPIAccelerometerAllCallbcaks(int32_t index,
+void HALSIM_RegisterSPIAccelerometerAllCallbacks(int32_t index,
HAL_NotifyCallback callback,
void* param,
HAL_Bool initialNotify);
diff --git a/hal/src/main/native/sim/mockdata/SPIAccelerometerData.cpp b/hal/src/main/native/sim/mockdata/SPIAccelerometerData.cpp
index 0ec10cf8a28..fa445006518 100644
--- a/hal/src/main/native/sim/mockdata/SPIAccelerometerData.cpp
+++ b/hal/src/main/native/sim/mockdata/SPIAccelerometerData.cpp
@@ -42,7 +42,7 @@ DEFINE_CAPI(double, Z, z)
SimSPIAccelerometerData[index].NAME.RegisterCallback(callback, param, \
initialNotify)
-void HALSIM_RegisterSPIAccelerometerAllCallbcaks(int32_t index,
+void HALSIM_RegisterSPIAccelerometerAllCallbacks(int32_t index,
HAL_NotifyCallback callback,
void* param,
HAL_Bool initialNotify) {
From 0005c383ff2e0aefdb221d2bb48dcd8cc348e93c Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Fri, 16 Aug 2024 02:54:41 +0000
Subject: [PATCH 3/4] Formatting fixes
---
.../java/edu/wpi/first/math/trajectory/TrapezoidProfile.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/wpimath/src/main/java/edu/wpi/first/math/trajectory/TrapezoidProfile.java b/wpimath/src/main/java/edu/wpi/first/math/trajectory/TrapezoidProfile.java
index c18f1e19d3b..234d725f003 100644
--- a/wpimath/src/main/java/edu/wpi/first/math/trajectory/TrapezoidProfile.java
+++ b/wpimath/src/main/java/edu/wpi/first/math/trajectory/TrapezoidProfile.java
@@ -268,8 +268,7 @@ public double timeLeftUntil(double target) {
double decelTime =
(-decelVelocity
- + Math.sqrt(
- Math.abs(decelVelocity * decelVelocity + 2 * deceleration * decelDist)))
+ + Math.sqrt(Math.abs(decelVelocity * decelVelocity + 2 * deceleration * decelDist)))
/ deceleration;
double fullSpeedTime = fullSpeedDist / m_constraints.maxVelocity;
From fa37880eacfc6bff923a5b6c045d887f041bbd1c Mon Sep 17 00:00:00 2001
From: Gold856 <117957790+Gold856@users.noreply.github.com>
Date: Fri, 16 Aug 2024 00:15:23 -0400
Subject: [PATCH 4/4] Few more
---
.../src/main/java/edu/wpi/first/wpilibj2/command/Command.java | 2 +-
wpiutil/src/main/native/include/wpi/struct/Struct.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java
index e64044cab35..7d71676ce41 100644
--- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java
+++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java
@@ -319,7 +319,7 @@ public ParallelDeadlineGroup deadlineWith(Command... parallel) {
* commands with {@link CommandScheduler#removeComposedCommand(Command)}. The command composition
* returned from this method can be further decorated without issue.
*
- * @param parallel the commands to run in parallel. Note the parallel commands will be interupted
+ * @param parallel the commands to run in parallel. Note the parallel commands will be interrupted
* when the deadline command ends
* @return the decorated command
*/
diff --git a/wpiutil/src/main/native/include/wpi/struct/Struct.h b/wpiutil/src/main/native/include/wpi/struct/Struct.h
index 0de507e7433..3070ac5746c 100644
--- a/wpiutil/src/main/native/include/wpi/struct/Struct.h
+++ b/wpiutil/src/main/native/include/wpi/struct/Struct.h
@@ -166,7 +166,7 @@ inline T UnpackStruct(std::span data, const I&... info) {
* @tparam Offset starting offset
* @tparam N number of objects
* @param data raw struct data
- * @return Desrialized array
+ * @return Deserialized array
*/
template
inline wpi::array UnpackStructArray(std::span data) {