mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Replace WPI_DEPRECATED() macro with [[deprecated]] attribute (#5373)
Continue to use WPI_DEPRECATED macro for constructors until clang-format is fixed.
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#include <memory>
|
||||
|
||||
#include <hal/Types.h>
|
||||
#include <wpi/deprecated.h>
|
||||
#include <wpi/sendable/Sendable.h>
|
||||
#include <wpi/sendable/SendableHelper.h>
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <memory>
|
||||
|
||||
#include <hal/Types.h>
|
||||
#include <wpi/deprecated.h>
|
||||
#include <wpi/sendable/Sendable.h>
|
||||
#include <wpi/sendable/SendableHelper.h>
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <array>
|
||||
|
||||
#include <units/angle.h>
|
||||
#include <wpi/deprecated.h>
|
||||
|
||||
#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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user