mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user