mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
[wpilib] Use misspell to find more spelling errors (NFC) (#2679)
This commit is contained in:
@@ -177,7 +177,7 @@ int32_t HAL_SetJoystickOutputs(int32_t joystickNum, int64_t outputs,
|
||||
* Warning: This is not an official time (so it cannot be used to dispute ref
|
||||
* calls or guarantee that a function will trigger before the match ends).
|
||||
*
|
||||
* The Practice Match function of the DS approximates the behaviour seen on
|
||||
* The Practice Match function of the DS approximates the behavior seen on
|
||||
* the field.
|
||||
*
|
||||
* @param status the error code, or 0 for success
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -158,7 +158,7 @@ void HAL_SetPWMPosition(HAL_DigitalHandle pwmPortHandle, double position,
|
||||
* Sets a PWM channel to be disabled.
|
||||
*
|
||||
* The channel is disabled until the next time it is set. Note this is different
|
||||
* from just setting a 0 speed, as this will actively stop all signalling on the
|
||||
* from just setting a 0 speed, as this will actively stop all signaling on the
|
||||
* channel.
|
||||
*
|
||||
* @param pwmPortHandle the PWM handle.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -83,7 +83,7 @@ class CallbackThread : public wpi::SafeThread {
|
||||
wpi::mutex poll_mutex;
|
||||
wpi::condition_variable poll_cond;
|
||||
bool terminating = false;
|
||||
bool cancelling = false;
|
||||
bool canceling = false;
|
||||
};
|
||||
wpi::UidVector<std::shared_ptr<Poller>, 64> m_pollers;
|
||||
|
||||
@@ -247,10 +247,10 @@ class CallbackManager {
|
||||
*timed_out = false;
|
||||
while (poller->poll_queue.empty()) {
|
||||
if (poller->terminating) return infos;
|
||||
if (poller->cancelling) {
|
||||
if (poller->canceling) {
|
||||
// Note: this only works if there's a single thread calling this
|
||||
// function for any particular poller, but that's the intended use.
|
||||
poller->cancelling = false;
|
||||
poller->canceling = false;
|
||||
return infos;
|
||||
}
|
||||
if (timeout == 0) {
|
||||
@@ -287,7 +287,7 @@ class CallbackManager {
|
||||
|
||||
{
|
||||
std::scoped_lock lock(poller->poll_mutex);
|
||||
poller->cancelling = true;
|
||||
poller->canceling = true;
|
||||
}
|
||||
poller->poll_cond.notify_one();
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ class Button : public Trigger {
|
||||
|
||||
/**
|
||||
* Binds a command to be started repeatedly while the button is pressed, and
|
||||
* cancelled when it is released. Takes a raw pointer, and so is non-owning;
|
||||
* canceled when it is released. Takes a raw pointer, and so is non-owning;
|
||||
* users are responsible for the lifespan of the command.
|
||||
*
|
||||
* @param command The command to bind.
|
||||
@@ -97,7 +97,7 @@ class Button : public Trigger {
|
||||
|
||||
/**
|
||||
* Binds a command to be started repeatedly while the button is pressed, and
|
||||
* cancelled when it is released. Transfers command ownership to the button
|
||||
* canceled when it is released. Transfers command ownership to the button
|
||||
* scheduler, so the user does not have to worry about lifespan - rvalue refs
|
||||
* will be *moved*, lvalue refs will be *copied.*
|
||||
*
|
||||
@@ -131,7 +131,7 @@ class Button : public Trigger {
|
||||
wpi::ArrayRef<Subsystem*> requirements = {});
|
||||
|
||||
/**
|
||||
* Binds a command to be started when the button is pressed, and cancelled
|
||||
* Binds a command to be started when the button is pressed, and canceled
|
||||
* when it is released. Takes a raw pointer, and so is non-owning; users are
|
||||
* responsible for the lifespan of the command.
|
||||
*
|
||||
@@ -142,7 +142,7 @@ class Button : public Trigger {
|
||||
Button WhenHeld(Command* command, bool interruptible = true);
|
||||
|
||||
/**
|
||||
* Binds a command to be started when the button is pressed, and cancelled
|
||||
* Binds a command to be started when the button is pressed, and canceled
|
||||
* when it is released. Transfers command ownership to the button scheduler,
|
||||
* so the user does not have to worry about lifespan - rvalue refs will be
|
||||
* *moved*, lvalue refs will be *copied.*
|
||||
@@ -205,7 +205,7 @@ class Button : public Trigger {
|
||||
wpi::ArrayRef<Subsystem*> requirements = {});
|
||||
|
||||
/**
|
||||
* Binds a command to start when the button is pressed, and be cancelled when
|
||||
* Binds a command to start when the button is pressed, and be canceled when
|
||||
* it is pressed again. Takes a raw pointer, and so is non-owning; users are
|
||||
* responsible for the lifespan of the command.
|
||||
*
|
||||
@@ -216,7 +216,7 @@ class Button : public Trigger {
|
||||
Button ToggleWhenPressed(Command* command, bool interruptible = true);
|
||||
|
||||
/**
|
||||
* Binds a command to start when the button is pressed, and be cancelled when
|
||||
* Binds a command to start when the button is pressed, and be canceled when
|
||||
* it is pessed again. Transfers command ownership to the button scheduler,
|
||||
* so the user does not have to worry about lifespan - rvalue refs will be
|
||||
* *moved*, lvalue refs will be *copied.*
|
||||
@@ -233,7 +233,7 @@ class Button : public Trigger {
|
||||
}
|
||||
|
||||
/**
|
||||
* Binds a command to be cancelled when the button is pressed. Takes a
|
||||
* Binds a command to be canceled when the button is pressed. Takes a
|
||||
* raw pointer, and so is non-owning; users are responsible for the lifespan
|
||||
* and scheduling of the command.
|
||||
*
|
||||
|
||||
@@ -108,7 +108,7 @@ class Trigger {
|
||||
|
||||
/**
|
||||
* Binds a command to be started repeatedly while the trigger is active, and
|
||||
* cancelled when it becomes inactive. Takes a raw pointer, and so is
|
||||
* canceled when it becomes inactive. Takes a raw pointer, and so is
|
||||
* non-owning; users are responsible for the lifespan of the command.
|
||||
*
|
||||
* @param command The command to bind.
|
||||
@@ -119,7 +119,7 @@ class Trigger {
|
||||
|
||||
/**
|
||||
* Binds a command to be started repeatedly while the trigger is active, and
|
||||
* cancelled when it becomes inactive. Transfers command ownership to the
|
||||
* canceled when it becomes inactive. Transfers command ownership to the
|
||||
* button scheduler, so the user does not have to worry about lifespan -
|
||||
* rvalue refs will be *moved*, lvalue refs will be *copied.*
|
||||
*
|
||||
@@ -168,7 +168,7 @@ class Trigger {
|
||||
|
||||
/**
|
||||
* Binds a command to be started when the trigger becomes active, and
|
||||
* cancelled when it becomes inactive. Takes a raw pointer, and so is
|
||||
* canceled when it becomes inactive. Takes a raw pointer, and so is
|
||||
* non-owning; users are responsible for the lifespan of the command.
|
||||
*
|
||||
* @param command The command to bind.
|
||||
@@ -179,7 +179,7 @@ class Trigger {
|
||||
|
||||
/**
|
||||
* Binds a command to be started when the trigger becomes active, and
|
||||
* cancelled when it becomes inactive. Transfers command ownership to the
|
||||
* canceled when it becomes inactive. Transfers command ownership to the
|
||||
* button scheduler, so the user does not have to worry about lifespan -
|
||||
* rvalue refs will be *moved*, lvalue refs will be *copied.*
|
||||
*
|
||||
@@ -267,7 +267,7 @@ class Trigger {
|
||||
wpi::ArrayRef<Subsystem*> requirements = {});
|
||||
|
||||
/**
|
||||
* Binds a command to start when the trigger becomes active, and be cancelled
|
||||
* Binds a command to start when the trigger becomes active, and be canceled
|
||||
* when it again becomes active. Takes a raw pointer, and so is non-owning;
|
||||
* users are responsible for the lifespan of the command.
|
||||
*
|
||||
@@ -278,7 +278,7 @@ class Trigger {
|
||||
Trigger ToggleWhenActive(Command* command, bool interruptible = true);
|
||||
|
||||
/**
|
||||
* Binds a command to start when the trigger becomes active, and be cancelled
|
||||
* Binds a command to start when the trigger becomes active, and be canceled
|
||||
* when it again becomes active. Transfers command ownership to the button
|
||||
* scheduler, so the user does not have to worry about lifespan - rvalue refs
|
||||
* will be *moved*, lvalue refs will be *copied.*
|
||||
@@ -311,7 +311,7 @@ class Trigger {
|
||||
}
|
||||
|
||||
/**
|
||||
* Binds a command to be cancelled when the trigger becomes active. Takes a
|
||||
* Binds a command to be canceled when the trigger becomes active. Takes a
|
||||
* raw pointer, and so is non-owning; users are responsible for the lifespan
|
||||
* and scheduling of the command.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -330,7 +330,7 @@ public abstract class Command implements Sendable, AutoCloseable {
|
||||
* method for time-sensitive commands.
|
||||
*
|
||||
* <p>Returning false will result in the command never ending automatically. It may still be
|
||||
* cancelled manually or interrupted by another command. Returning true will result in the
|
||||
* canceled manually or interrupted by another command. Returning true will result in the
|
||||
* command executing once and finishing immediately. We recommend using {@link InstantCommand}
|
||||
* for this.
|
||||
*
|
||||
@@ -447,7 +447,7 @@ public abstract class Command implements Sendable, AutoCloseable {
|
||||
|
||||
/**
|
||||
* Clears list of subsystem requirements. This is only used by
|
||||
* {@link ConditionalCommand} so cancelling the chosen command works properly
|
||||
* {@link ConditionalCommand} so canceling the chosen command works properly
|
||||
* in {@link CommandGroup}.
|
||||
*/
|
||||
protected void clearRequirements() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -141,7 +141,7 @@ public abstract class ConditionalCommand extends Command {
|
||||
|
||||
if (m_chosenCommand != null) {
|
||||
/*
|
||||
* This is a hack to make cancelling the chosen command inside a
|
||||
* This is a hack to make canceling the chosen command inside a
|
||||
* CommandGroup work properly
|
||||
*/
|
||||
m_chosenCommand.clearRequirements();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2011-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2011-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -137,7 +137,7 @@ void CommandGroup::_Execute() {
|
||||
// If command timed out, cancel it so it's removed from the Scheduler
|
||||
if (entry->IsTimedOut()) cmd->_Cancel();
|
||||
|
||||
// If command finished or was cancelled, remove it from Scheduler
|
||||
// If command finished or was canceled, remove it from Scheduler
|
||||
if (cmd->Run()) {
|
||||
break;
|
||||
} else {
|
||||
@@ -192,7 +192,7 @@ void CommandGroup::_Execute() {
|
||||
child->_Cancel();
|
||||
}
|
||||
|
||||
// If child finished or was cancelled, set it to nullptr. nullptr entries
|
||||
// If child finished or was canceled, set it to nullptr. nullptr entries
|
||||
// are removed later.
|
||||
if (!child->Run()) {
|
||||
child->Removed();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -46,7 +46,7 @@ void ConditionalCommand::_Initialize() {
|
||||
}
|
||||
|
||||
if (m_chosenCommand != nullptr) {
|
||||
// This is a hack to make cancelling the chosen command inside a
|
||||
// This is a hack to make canceling the chosen command inside a
|
||||
// CommandGroup work properly
|
||||
m_chosenCommand->ClearRequirements();
|
||||
|
||||
|
||||
@@ -171,8 +171,8 @@ void Scheduler::InitSendable(SendableBuilder& builder) {
|
||||
// Cancel commands whose cancel buttons were pressed on the SmartDashboard
|
||||
if (!toCancel.empty()) {
|
||||
for (auto& command : m_impl->commands) {
|
||||
for (const auto& cancelled : toCancel) {
|
||||
if (command->GetID() == cancelled) {
|
||||
for (const auto& canceled : toCancel) {
|
||||
if (command->GetID() == canceled) {
|
||||
command->Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2011-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2011-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -318,7 +318,7 @@ class Command : public ErrorBase,
|
||||
/**
|
||||
* Clears list of subsystem requirements.
|
||||
*
|
||||
* This is only used by ConditionalCommand so cancelling the chosen command
|
||||
* This is only used by ConditionalCommand so canceling the chosen command
|
||||
* works properly in CommandGroup.
|
||||
*/
|
||||
void ClearRequirements();
|
||||
@@ -344,7 +344,7 @@ class Command : public ErrorBase,
|
||||
* time-sensitive commands.
|
||||
*
|
||||
* Returning false will result in the command never ending automatically.
|
||||
* It may still be cancelled manually or interrupted by another command.
|
||||
* It may still be canceled manually or interrupted by another command.
|
||||
* Returning true will result in the command executing once and finishing
|
||||
* immediately. We recommend using InstantCommand for this.
|
||||
*
|
||||
|
||||
@@ -368,7 +368,7 @@ class DriverStation : public ErrorBase {
|
||||
* Warning: This is not an official time (so it cannot be used to dispute ref
|
||||
* calls or guarantee that a function will trigger before the match ends).
|
||||
*
|
||||
* The Practice Match function of the DS approximates the behaviour seen on
|
||||
* The Practice Match function of the DS approximates the behavior seen on
|
||||
* the field.
|
||||
*
|
||||
* @return Time remaining in current match period (auto or teleop)
|
||||
|
||||
@@ -36,7 +36,7 @@ class IterativeRobot : public IterativeRobotBase {
|
||||
/**
|
||||
* Provide an alternate "main loop" via StartCompetition().
|
||||
*
|
||||
* This specific StartCompetition() implements "main loop" behaviour synced
|
||||
* This specific StartCompetition() implements "main loop" behavior synced
|
||||
* with the DS packets.
|
||||
*/
|
||||
void StartCompetition() override;
|
||||
|
||||
@@ -936,7 +936,7 @@ public class DriverStation {
|
||||
* but does send an approximate match time. The value will count down the time remaining in the
|
||||
* current period (auto or teleop). Warning: This is not an official time (so it cannot be used to
|
||||
* dispute ref calls or guarantee that a function will trigger before the match ends) The
|
||||
* Practice Match function of the DS approximates the behaviour seen on the field.
|
||||
* Practice Match function of the DS approximates the behavior seen on the field.
|
||||
*
|
||||
* @return Time remaining in current match period (auto or teleop) in seconds
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ public class Timer {
|
||||
* but does send an approximate match time. The value will count down the time remaining in the
|
||||
* current period (auto or teleop). Warning: This is not an official time (so it cannot be used to
|
||||
* dispute ref calls or guarantee that a function will trigger before the match ends) The
|
||||
* Practice Match function of the DS approximates the behaviour seen on the field.
|
||||
* Practice Match function of the DS approximates the behavior seen on the field.
|
||||
*
|
||||
* @return Time remaining in current match period (auto or teleop) in seconds
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -17,7 +17,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SendableRegistry;
|
||||
*
|
||||
* <p>Note that the Victor uses the following bounds for PWM values. These values were determined
|
||||
* empirically and optimized for the Victor 888. These values should work reasonably well for
|
||||
* Victor 884 controllers also but if users experience issues such as asymmetric behaviour around
|
||||
* Victor 884 controllers also but if users experience issues such as asymmetric behavior around
|
||||
* the deadband or inability to saturate the controller in either direction, calibration is
|
||||
* recommended. The calibration procedure can be found in the Victor 884 User Manual available
|
||||
* from VEX Robotics: http://content.vexrobotics.com/docs/ifi-v884-users-manual-9-25-06.pdf
|
||||
|
||||
@@ -190,7 +190,7 @@ public enum BuiltInWidgets implements WidgetType {
|
||||
*/
|
||||
kSplitButtonChooser("Split Button Chooser"),
|
||||
/**
|
||||
* Displays an {@link edu.wpi.first.wpilibj.Encoder} displaying its speed, total travelled
|
||||
* Displays an {@link edu.wpi.first.wpilibj.Encoder} displaying its speed, total traveled
|
||||
* distance, and its distance per tick.
|
||||
* <br>Supported types:
|
||||
* <ul>
|
||||
|
||||
@@ -410,7 +410,7 @@ std::error_code openFileForRead(const Twine &Name, int &ResultFD,
|
||||
return std::error_code();
|
||||
RealPath->clear();
|
||||
#if defined(F_GETPATH)
|
||||
// When F_GETPATH is availble, it is the quickest way to get
|
||||
// When F_GETPATH is available, it is the quickest way to get
|
||||
// the real path name.
|
||||
char Buffer[MAXPATHLEN];
|
||||
if (::fcntl(ResultFD, F_GETPATH, Buffer) != -1)
|
||||
|
||||
@@ -46,7 +46,7 @@ class StringRef;
|
||||
void install_fatal_error_handler(fatal_error_handler_t handler,
|
||||
void *user_data = nullptr);
|
||||
|
||||
/// Restores default error handling behaviour.
|
||||
/// Restores default error handling behavior.
|
||||
void remove_fatal_error_handler();
|
||||
|
||||
/// ScopedFatalErrorHandler - This is a simple helper class which just
|
||||
|
||||
@@ -815,7 +815,7 @@ using Signal = SignalBase<detail::NullMutex, T...>;
|
||||
*
|
||||
* Beware of accidentally using recursive signal emission or cycles between
|
||||
* two or more signals in your code. Locking std::mutex more than once is
|
||||
* undefined behaviour, even if it "seems to work somehow". Use signal_r
|
||||
* undefined behavior, even if it "seems to work somehow". Use signal_r
|
||||
* instead for that use case.
|
||||
*/
|
||||
template <typename... T>
|
||||
|
||||
Reference in New Issue
Block a user