diff --git a/ntcore/src/main/native/include/networktables/NetworkTableEntry.h b/ntcore/src/main/native/include/networktables/NetworkTableEntry.h index b9d509aed1..31fe9a68bd 100644 --- a/ntcore/src/main/native/include/networktables/NetworkTableEntry.h +++ b/ntcore/src/main/native/include/networktables/NetworkTableEntry.h @@ -13,8 +13,6 @@ #include #include -#include - #include "networktables/NetworkTableType.h" #include "networktables/NetworkTableValue.h" #include "ntcore_c.h" @@ -101,7 +99,7 @@ class NetworkTableEntry final { * @return the flags (bitmask) * @deprecated Use IsPersistent() or topic properties instead */ - WPI_DEPRECATED("Use IsPersistent() or topic properties instead") + [[deprecated("Use IsPersistent() or topic properties instead")]] unsigned int GetFlags() const; /** @@ -468,7 +466,7 @@ class NetworkTableEntry final { * @param flags the flags to set (bitmask) * @deprecated Use SetPersistent() or topic properties instead */ - WPI_DEPRECATED("Use SetPersistent() or topic properties instead") + [[deprecated("Use SetPersistent() or topic properties instead")]] void SetFlags(unsigned int flags); /** @@ -477,7 +475,7 @@ class NetworkTableEntry final { * @param flags the flags to clear (bitmask) * @deprecated Use SetPersistent() or topic properties instead */ - WPI_DEPRECATED("Use SetPersistent() or topic properties instead") + [[deprecated("Use SetPersistent() or topic properties instead")]] void ClearFlags(unsigned int flags); /** @@ -506,7 +504,7 @@ class NetworkTableEntry final { * Deletes the entry. * @deprecated Use Unpublish() instead. */ - WPI_DEPRECATED("Use Unpublish() instead") + [[deprecated("Use Unpublish() instead")]] void Delete(); /** diff --git a/wpilibNewCommands/src/main/native/cpp/frc2/command/button/Button.cpp b/wpilibNewCommands/src/main/native/cpp/frc2/command/button/Button.cpp index 787fc09cd0..fdb64599d4 100644 --- a/wpilibNewCommands/src/main/native/cpp/frc2/command/button/Button.cpp +++ b/wpilibNewCommands/src/main/native/cpp/frc2/command/button/Button.cpp @@ -4,6 +4,8 @@ #include "frc2/command/button/Button.h" +#include + using namespace frc2; Button::Button(std::function isPressed) : Trigger(isPressed) {} diff --git a/wpilibNewCommands/src/main/native/cpp/frc2/command/button/Trigger.cpp b/wpilibNewCommands/src/main/native/cpp/frc2/command/button/Trigger.cpp index 3908daf13b..5b0b36efce 100644 --- a/wpilibNewCommands/src/main/native/cpp/frc2/command/button/Trigger.cpp +++ b/wpilibNewCommands/src/main/native/cpp/frc2/command/button/Trigger.cpp @@ -5,6 +5,7 @@ #include "frc2/command/button/Trigger.h" #include +#include #include "frc2/command/InstantCommand.h" diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/Command.h b/wpilibNewCommands/src/main/native/include/frc2/command/Command.h index c064fa39b5..3cf0e5a28b 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/Command.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/Command.h @@ -13,7 +13,6 @@ #include #include #include -#include #include "frc2/command/Subsystem.h" @@ -161,8 +160,7 @@ class Command { * @return the command with the interrupt condition added * @deprecated Replace with Until() */ - WPI_DEPRECATED("Replace with Until()") - [[nodiscard]] + [[deprecated("Replace with Until()")]] [[nodiscard]] CommandPtr WithInterrupt(std::function condition) &&; /** @@ -220,13 +218,13 @@ valid. This was unsafe/undefined behavior from the start, and RepeatCommand provides an easy way to achieve similar end results with slightly different (and safe) semantics. */ - WPI_DEPRECATED( + [[deprecated( "PerpetualCommand violates the assumption that execute() doesn't get " "called after isFinished() returns true -- an assumption that should be " "valid." "This was unsafe/undefined behavior from the start, and RepeatCommand " "provides an easy way to achieve similar end results with slightly " - "different (and safe) semantics.") + "different (and safe) semantics.")]] PerpetualCommand Perpetually() &&; /** @@ -373,7 +371,7 @@ safe) semantics. * * @deprecated Moved to IsComposed() */ - WPI_DEPRECATED("Moved to IsComposed()") + [[deprecated("Moved to IsComposed()")]] bool IsGrouped() const; /** @@ -383,7 +381,7 @@ safe) semantics. * * @deprecated Moved to SetComposed() */ - WPI_DEPRECATED("Moved to SetComposed()") + [[deprecated("Moved to SetComposed()")]] void SetGrouped(bool grouped); /** diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/CommandGroupBase.h b/wpilibNewCommands/src/main/native/include/frc2/command/CommandGroupBase.h index 9fe65fa37a..e607bf139a 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/CommandGroupBase.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/CommandGroupBase.h @@ -7,8 +7,6 @@ #include #include -#include - #include "frc2/command/CommandBase.h" namespace frc2 { diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/CommandScheduler.h b/wpilibNewCommands/src/main/native/include/frc2/command/CommandScheduler.h index 1ccc157429..fcf2852488 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/CommandScheduler.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/CommandScheduler.h @@ -16,7 +16,6 @@ #include #include #include -#include #include namespace frc2 { @@ -81,7 +80,7 @@ class CommandScheduler final : public nt::NTSendable, /** * Removes all button bindings from the scheduler. */ - WPI_DEPRECATED("Call Clear on the EventLoop instance directly!") + [[deprecated("Call Clear on the EventLoop instance directly!")]] void ClearButtons(); /** diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/PerpetualCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/PerpetualCommand.h index a0052d84be..107f08ddf2 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/PerpetualCommand.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/PerpetualCommand.h @@ -13,6 +13,7 @@ #include #include +#include #include "frc2/command/CommandBase.h" #include "frc2/command/CommandHelper.h" diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h index 286851479a..ab37fba9c3 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h @@ -16,6 +16,7 @@ #include #include +#include #include #include "frc2/command/CommandBase.h" diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/button/Button.h b/wpilibNewCommands/src/main/native/include/frc2/command/button/Button.h index d2a68de810..978251c7f7 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/button/Button.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/button/Button.h @@ -41,8 +41,7 @@ class Button : public Trigger { * can be further determined by subclass code. * @deprecated Replace with Trigger */ - WPI_DEPRECATED("Replace with Trigger") - Button() = default; + [[deprecated("Replace with Trigger")]] Button() = default; /** * Binds a command to start when the button is pressed. Takes a @@ -53,7 +52,7 @@ class Button : public Trigger { * @return The trigger, for chained calls. * @deprecated Replace with Trigger::OnTrue() */ - WPI_DEPRECATED("Replace with Trigger#OnTrue()") + [[deprecated("Replace with Trigger#OnTrue()")]] Button WhenPressed(Command* command); /** @@ -67,7 +66,7 @@ class Button : public Trigger { * @deprecated Replace with Trigger::OnTrue() */ template T> - WPI_DEPRECATED("Replace with Trigger#OnTrue()") + [[deprecated("Replace with Trigger#OnTrue()")]] Button WhenPressed(T&& command) { WhenActive(std::forward(command)); return *this; @@ -80,7 +79,7 @@ class Button : public Trigger { * @param requirements the required subsystems. * @deprecated Replace with Trigger::OnTrue(cmd::RunOnce()) */ - WPI_DEPRECATED("Replace with Trigger#OnTrue(cmd::RunOnce())") + [[deprecated("Replace with Trigger#OnTrue(cmd::RunOnce())")]] Button WhenPressed(std::function toRun, std::initializer_list requirements); @@ -91,7 +90,7 @@ class Button : public Trigger { * @param requirements the required subsystems. * @deprecated Replace with Trigger::OnTrue(cmd::RunOnce()) */ - WPI_DEPRECATED("Replace with Trigger#OnTrue(cmd::RunOnce())") + [[deprecated("Replace with Trigger#OnTrue(cmd::RunOnce())")]] Button WhenPressed(std::function toRun, std::span requirements = {}); @@ -104,7 +103,7 @@ class Button : public Trigger { * @return The button, for chained calls. * @deprecated Replace with Trigger::WhileTrue(command.Repeatedly()) */ - WPI_DEPRECATED("Replace with Trigger#WhileTrue(command.Repeatedly())") + [[deprecated("Replace with Trigger#WhileTrue(command.Repeatedly())")]] Button WhileHeld(Command* command); /** @@ -118,7 +117,7 @@ class Button : public Trigger { * @deprecated Replace with Trigger::WhileTrue(command.Repeatedly()) */ template T> - WPI_DEPRECATED("Replace with Trigger#WhileTrue(command.Repeatedly())") + [[deprecated("Replace with Trigger#WhileTrue(command.Repeatedly())")]] Button WhileHeld(T&& command) { WhileActiveContinous(std::forward(command)); return *this; @@ -131,7 +130,7 @@ class Button : public Trigger { * @param requirements the required subsystems. * @deprecated Replace with Trigger::WhileTrue(cmd::Run()) */ - WPI_DEPRECATED("Replace with Trigger#WhileTrue(cmd::Run())") + [[deprecated("Replace with Trigger#WhileTrue(cmd::Run())")]] Button WhileHeld(std::function toRun, std::initializer_list requirements); @@ -142,7 +141,7 @@ class Button : public Trigger { * @param requirements the required subsystems. * @deprecated Replace with Trigger::WhileTrue(cmd::Run()) */ - WPI_DEPRECATED("Replace with Trigger#WhileTrue(cmd::Run())") + [[deprecated("Replace with Trigger#WhileTrue(cmd::Run())")]] Button WhileHeld(std::function toRun, std::span requirements = {}); @@ -155,7 +154,7 @@ class Button : public Trigger { * @return The button, for chained calls. * @deprecated Replace with Trigger::WhileTrue() */ - WPI_DEPRECATED("Replace with Trigger#WhileTrue()") + [[deprecated("Replace with Trigger#WhileTrue()")]] Button WhenHeld(Command* command); /** @@ -169,7 +168,7 @@ class Button : public Trigger { * @deprecated Replace with Trigger::WhileTrue() */ template T> - WPI_DEPRECATED("Replace with Trigger#WhileTrue()") + [[deprecated("Replace with Trigger#WhileTrue()")]] Button WhenHeld(T&& command) { WhileActiveOnce(std::forward(command)); return *this; @@ -184,7 +183,7 @@ class Button : public Trigger { * @return The button, for chained calls. * @deprecated Replace with Trigger::OnFalse() */ - WPI_DEPRECATED("Replace with Trigger#OnFalse()") + [[deprecated("Replace with Trigger#OnFalse()")]] Button WhenReleased(Command* command); /** @@ -198,7 +197,7 @@ class Button : public Trigger { * @deprecated Replace with Trigger::OnFalse() */ template T> - WPI_DEPRECATED("Replace with Trigger#OnFalse()") + [[deprecated("Replace with Trigger#OnFalse()")]] Button WhenReleased(T&& command) { WhenInactive(std::forward(command)); return *this; @@ -211,7 +210,7 @@ class Button : public Trigger { * @param requirements the required subsystems. * @deprecated Replace with Trigger::OnFalse(cmd::RunOnce()) */ - WPI_DEPRECATED("Replace with Trigger#OnFalse(cmd::RunOnce())") + [[deprecated("Replace with Trigger#OnFalse(cmd::RunOnce())")]] Button WhenReleased(std::function toRun, std::initializer_list requirements); @@ -222,7 +221,7 @@ class Button : public Trigger { * @param requirements the required subsystems. * @deprecated Replace with Trigger::OnFalse(cmd::RunOnce()) */ - WPI_DEPRECATED("Replace with Trigger#OnFalse(cmd::RunOnce())") + [[deprecated("Replace with Trigger#OnFalse(cmd::RunOnce())")]] Button WhenReleased(std::function toRun, std::span requirements = {}); @@ -235,7 +234,7 @@ class Button : public Trigger { * @return The button, for chained calls. * @deprecated Replace with Trigger::ToggleOnTrue() */ - WPI_DEPRECATED("Replace with Trigger#ToggleOnTrue()") + [[deprecated("Replace with Trigger#ToggleOnTrue()")]] Button ToggleWhenPressed(Command* command); /** @@ -249,7 +248,7 @@ class Button : public Trigger { * @deprecated Replace with Trigger::ToggleOnTrue() */ template T> - WPI_DEPRECATED("Replace with Trigger#ToggleOnTrue()") + [[deprecated("Replace with Trigger#ToggleOnTrue()")]] Button ToggleWhenPressed(T&& command) { ToggleWhenActive(std::forward(command)); return *this; @@ -264,7 +263,7 @@ class Button : public Trigger { * @return The button, for chained calls. * @deprecated Pass this as a command end condition with Until() instead. */ - WPI_DEPRECATED("Pass this as a command end condition with Until() instead.") + [[deprecated("Pass this as a command end condition with Until() instead.")]] Button CancelWhenPressed(Command* command); }; } // namespace frc2 diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/button/POVButton.h b/wpilibNewCommands/src/main/native/include/frc2/command/button/POVButton.h index 7ee1590794..544a3eebf5 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/button/POVButton.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/button/POVButton.h @@ -3,6 +3,7 @@ // the WPILib BSD license file in the root directory of this project. #pragma once + #include #include diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/button/Trigger.h b/wpilibNewCommands/src/main/native/include/frc2/command/button/Trigger.h index 9d6e37e895..e66256b927 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/button/Trigger.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/button/Trigger.h @@ -15,7 +15,6 @@ #include #include #include -#include #include "frc2/command/Command.h" #include "frc2/command/CommandScheduler.h" @@ -214,7 +213,7 @@ class Trigger { * @return The trigger, for chained calls. * @deprecated Use OnTrue(Command) instead */ - WPI_DEPRECATED("Use OnTrue(Command) instead") + [[deprecated("Use OnTrue(Command) instead")]] Trigger WhenActive(Command* command); /** @@ -228,7 +227,7 @@ class Trigger { * @deprecated Use OnTrue(Command) instead */ template T> - WPI_DEPRECATED("Use OnTrue(Command) instead") + [[deprecated("Use OnTrue(Command) instead")]] Trigger WhenActive(T&& command) { m_loop->Bind([condition = m_condition, previous = m_condition(), command = std::make_unique>( @@ -252,8 +251,8 @@ class Trigger { * @deprecated Use OnTrue(Command) instead and construct the InstantCommand * manually */ - WPI_DEPRECATED( - "Use OnTrue(Command) instead and construct the InstantCommand manually") + [[deprecated( + "Use OnTrue(Command) instead and construct the InstantCommand manually")]] Trigger WhenActive(std::function toRun, std::initializer_list requirements); @@ -265,8 +264,8 @@ class Trigger { * @deprecated Use OnTrue(Command) instead and construct the InstantCommand * manually */ - WPI_DEPRECATED( - "Use OnTrue(Command) instead and construct the InstantCommand manually") + [[deprecated( + "Use OnTrue(Command) instead and construct the InstantCommand manually")]] Trigger WhenActive(std::function toRun, std::span requirements = {}); @@ -280,9 +279,9 @@ class Trigger { * @deprecated Use WhileTrue(Command) with RepeatCommand, or bind command::Schedule with IfHigh(std::function). */ - WPI_DEPRECATED( + [[deprecated( "Use WhileTrue(Command) with RepeatCommand, or bind command::Schedule " - "with IfHigh(std::function).") + "with IfHigh(std::function).")]] Trigger WhileActiveContinous(Command* command); /** @@ -297,9 +296,9 @@ class Trigger { command::Schedule with IfHigh(std::function). */ template T> - WPI_DEPRECATED( + [[deprecated( "Use WhileTrue(Command) with RepeatCommand, or bind command::Schedule " - "with IfHigh(std::function).") + "with IfHigh(std::function).")]] Trigger WhileActiveContinous(T&& command) { m_loop->Bind([condition = m_condition, previous = m_condition(), command = std::make_unique>( @@ -325,7 +324,7 @@ class Trigger { * @param requirements the required subsystems. * @deprecated Use WhileTrue(Command) and construct a RunCommand manually */ - WPI_DEPRECATED("Use WhileTrue(Command) and construct a RunCommand manually") + [[deprecated("Use WhileTrue(Command) and construct a RunCommand manually")]] Trigger WhileActiveContinous(std::function toRun, std::initializer_list requirements); @@ -336,7 +335,7 @@ class Trigger { * @param requirements the required subsystems. * @deprecated Use WhileTrue(Command) and construct a RunCommand manually */ - WPI_DEPRECATED("Use WhileTrue(Command) and construct a RunCommand manually") + [[deprecated("Use WhileTrue(Command) and construct a RunCommand manually")]] Trigger WhileActiveContinous(std::function toRun, std::span requirements = {}); @@ -349,7 +348,7 @@ class Trigger { * @return The trigger, for chained calls. * @deprecated Use WhileTrue(Command) instead. */ - WPI_DEPRECATED("Use WhileTrue(Command) instead.") + [[deprecated("Use WhileTrue(Command) instead.")]] Trigger WhileActiveOnce(Command* command); /** @@ -363,7 +362,7 @@ class Trigger { * @deprecated Use WhileTrue(Command) instead. */ template T> - WPI_DEPRECATED("Use WhileTrue(Command) instead.") + [[deprecated("Use WhileTrue(Command) instead.")]] Trigger WhileActiveOnce(T&& command) { m_loop->Bind([condition = m_condition, previous = m_condition(), command = std::make_unique>( @@ -390,7 +389,7 @@ class Trigger { * @return The trigger, for chained calls. * @deprecated Use OnFalse(Command) instead. */ - WPI_DEPRECATED("Use OnFalse(Command) instead.") + [[deprecated("Use OnFalse(Command) instead.")]] Trigger WhenInactive(Command* command); /** @@ -404,7 +403,7 @@ class Trigger { * @deprecated Use OnFalse(Command) instead. */ template T> - WPI_DEPRECATED("Use OnFalse(Command) instead.") + [[deprecated("Use OnFalse(Command) instead.")]] Trigger WhenInactive(T&& command) { m_loop->Bind([condition = m_condition, previous = m_condition(), command = std::make_unique>( @@ -428,8 +427,9 @@ class Trigger { * @deprecated Use OnFalse(Command) instead and construct the InstantCommand * manually */ - WPI_DEPRECATED( - "Use OnFalse(Command) instead and construct the InstantCommand manually") + [[deprecated( + "Use OnFalse(Command) instead and construct the InstantCommand " + "manually")]] Trigger WhenInactive(std::function toRun, std::initializer_list requirements); @@ -441,8 +441,9 @@ class Trigger { * @deprecated Use OnFalse(Command) instead and construct the InstantCommand * manually */ - WPI_DEPRECATED( - "Use OnFalse(Command) instead and construct the InstantCommand manually") + [[deprecated( + "Use OnFalse(Command) instead and construct the InstantCommand " + "manually")]] Trigger WhenInactive(std::function toRun, std::span requirements = {}); @@ -455,7 +456,7 @@ class Trigger { * @return The trigger, for chained calls. * @deprecated Use ToggleOnTrue(Command) instead. */ - WPI_DEPRECATED("Use ToggleOnTrue(Command) instead.") + [[deprecated("Use ToggleOnTrue(Command) instead.")]] Trigger ToggleWhenActive(Command* command); /** @@ -469,7 +470,7 @@ class Trigger { * @deprecated Use ToggleOnTrue(Command) instead. */ template T> - WPI_DEPRECATED("Use ToggleOnTrue(Command) instead.") + [[deprecated("Use ToggleOnTrue(Command) instead.")]] Trigger ToggleWhenActive(T&& command) { m_loop->Bind([condition = m_condition, previous = m_condition(), command = std::make_unique>( @@ -499,7 +500,7 @@ class Trigger { * @return The trigger, for chained calls. * @deprecated Pass this as a command end condition with Until() instead. */ - WPI_DEPRECATED("Pass this as a command end condition with Until() instead.") + [[deprecated("Pass this as a command end condition with Until() instead.")]] Trigger CancelWhenActive(Command* command); /** diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/button/TriggerTest.cpp b/wpilibNewCommands/src/test/native/cpp/frc2/command/button/TriggerTest.cpp index 1a0af51c7c..f7312dde1c 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/button/TriggerTest.cpp +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/button/TriggerTest.cpp @@ -3,6 +3,7 @@ // the WPILib BSD license file in the root directory of this project. #include +#include #include "../CommandTestBase.h" #include "frc2/command/CommandPtr.h" diff --git a/wpilibc/src/main/native/cpp/Joystick.cpp b/wpilibc/src/main/native/cpp/Joystick.cpp index 0b5d870e61..2f46b2fea4 100644 --- a/wpilibc/src/main/native/cpp/Joystick.cpp +++ b/wpilibc/src/main/native/cpp/Joystick.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include "frc/event/BooleanEvent.h" diff --git a/wpilibc/src/main/native/include/frc/Compressor.h b/wpilibc/src/main/native/include/frc/Compressor.h index 1329a3bfa6..2ccc3f3160 100644 --- a/wpilibc/src/main/native/include/frc/Compressor.h +++ b/wpilibc/src/main/native/include/frc/Compressor.h @@ -7,7 +7,6 @@ #include #include -#include #include #include @@ -66,9 +65,9 @@ class Compressor : public wpi::Sendable, * @deprecated To avoid confusion in thinking this (re)enables the compressor * use IsEnabled(). */ - WPI_DEPRECATED( + [[deprecated( "To avoid confusion in thinking this (re)enables the compressor use " - "IsEnabled()") + "IsEnabled()")]] bool Enabled() const; /** diff --git a/wpilibc/src/main/native/include/frc/Encoder.h b/wpilibc/src/main/native/include/frc/Encoder.h index deb36c0446..7315e1638a 100644 --- a/wpilibc/src/main/native/include/frc/Encoder.h +++ b/wpilibc/src/main/native/include/frc/Encoder.h @@ -7,7 +7,6 @@ #include #include -#include #include #include @@ -168,7 +167,7 @@ class Encoder : public CounterBase, * @return Period in seconds of the most recent pulse. * @deprecated Use getRate() in favor of this method. */ - WPI_DEPRECATED("Use GetRate() in favor of this method") + [[deprecated("Use GetRate() in favor of this method")]] units::second_t GetPeriod() const override; /** @@ -186,9 +185,9 @@ class Encoder : public CounterBase, * periods and SetMinRate() scales using value from * SetDistancePerPulse(). */ - WPI_DEPRECATED( + [[deprecated( "Use SetMinRate() in favor of this method. This takes unscaled periods " - "and SetMinRate() scales using value from SetDistancePerPulse().") + "and SetMinRate() scales using value from SetDistancePerPulse().")]] void SetMaxPeriod(units::second_t maxPeriod) override; /** diff --git a/wpilibc/src/main/native/include/frc/Joystick.h b/wpilibc/src/main/native/include/frc/Joystick.h index 90f52ac996..a955718c3b 100644 --- a/wpilibc/src/main/native/include/frc/Joystick.h +++ b/wpilibc/src/main/native/include/frc/Joystick.h @@ -7,7 +7,6 @@ #include #include -#include #include "frc/GenericHID.h" @@ -231,7 +230,7 @@ class Joystick : public GenericHID { * @return The direction of the vector in radians * @deprecated Use GetDirection() instead. */ - WPI_DEPRECATED("Use GetDirection() instead.") + [[deprecated("Use GetDirection() instead.")]] double GetDirectionRadians() const; /** @@ -241,7 +240,7 @@ class Joystick : public GenericHID { * @return The direction of the vector in degrees * @deprecated Use GetDirection() instead. */ - WPI_DEPRECATED("Use GetDirection() instead.") + [[deprecated("Use GetDirection() instead.")]] double GetDirectionDegrees() const; /** diff --git a/wpilibc/src/test/native/cpp/simulation/EncoderSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/EncoderSimTest.cpp index 3da140b033..d20acb3b0a 100644 --- a/wpilibc/src/test/native/cpp/simulation/EncoderSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/EncoderSimTest.cpp @@ -5,6 +5,7 @@ #include "frc/simulation/EncoderSim.h" // NOLINT(build/include_order) #include +#include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/Encoder.h"