mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[build] Upgrade to wpiformat 2024.33 (#6449)
This upgrades to clang-format and clang-tidy 18.1.1. This has the constructor attribute formatting fix, so we can remove our WPI_DEPRECATED macro.
This commit is contained in:
@@ -62,8 +62,7 @@ void BangBangController::InitSendable(wpi::SendableBuilder& builder) {
|
||||
[this](double setpoint) { SetSetpoint(setpoint); });
|
||||
builder.AddDoubleProperty(
|
||||
"measurement", [this] { return GetMeasurement(); }, nullptr);
|
||||
builder.AddDoubleProperty(
|
||||
"error", [this] { return GetError(); }, nullptr);
|
||||
builder.AddDoubleProperty("error", [this] { return GetError(); }, nullptr);
|
||||
builder.AddBooleanProperty(
|
||||
"atSetpoint", [this] { return AtSetpoint(); }, nullptr);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ namespace {
|
||||
class State {
|
||||
public:
|
||||
/// X position in global coordinate frame.
|
||||
[[maybe_unused]] static constexpr int kX = 0;
|
||||
[[maybe_unused]]
|
||||
static constexpr int kX = 0;
|
||||
|
||||
/// Y position in global coordinate frame.
|
||||
static constexpr int kY = 1;
|
||||
@@ -33,10 +34,12 @@ class State {
|
||||
static constexpr int kHeading = 2;
|
||||
|
||||
/// Left encoder velocity.
|
||||
[[maybe_unused]] static constexpr int kLeftVelocity = 3;
|
||||
[[maybe_unused]]
|
||||
static constexpr int kLeftVelocity = 3;
|
||||
|
||||
/// Right encoder velocity.
|
||||
[[maybe_unused]] static constexpr int kRightVelocity = 4;
|
||||
[[maybe_unused]]
|
||||
static constexpr int kRightVelocity = 4;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -23,7 +23,8 @@ namespace {
|
||||
class State {
|
||||
public:
|
||||
/// X position in global coordinate frame.
|
||||
[[maybe_unused]] static constexpr int kX = 0;
|
||||
[[maybe_unused]]
|
||||
static constexpr int kX = 0;
|
||||
|
||||
/// Y position in global coordinate frame.
|
||||
static constexpr int kY = 1;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <wpi/deprecated.h>
|
||||
#include <wpi/timestamp.h>
|
||||
|
||||
#include "units/time.h"
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wpi/deprecated.h>
|
||||
|
||||
#include "units/time.h"
|
||||
#include "wpimath/MathShared.h"
|
||||
|
||||
@@ -114,10 +112,10 @@ class TrapezoidProfile {
|
||||
* @deprecated Pass the desired and current state into calculate instead of
|
||||
* constructing a new TrapezoidProfile with the desired and current state
|
||||
*/
|
||||
WPI_DEPRECATED(
|
||||
[[deprecated(
|
||||
"Pass the desired and current state into calculate instead of "
|
||||
"constructing a new TrapezoidProfile with the desired and current "
|
||||
"state")
|
||||
"state")]]
|
||||
TrapezoidProfile(Constraints constraints, State goal,
|
||||
State initial = State{Distance_t{0}, Velocity_t{0}});
|
||||
|
||||
|
||||
@@ -482,10 +482,11 @@ constexpr dimensionless::scalar_t log2(const ScalarUnit x) noexcept {
|
||||
template <
|
||||
class UnitType,
|
||||
std::enable_if_t<units::traits::has_linear_scale<UnitType>::value, int> = 0>
|
||||
inline constexpr auto sqrt(const UnitType& value) noexcept -> unit_t<
|
||||
square_root<typename units::traits::unit_t_traits<UnitType>::unit_type>,
|
||||
typename units::traits::unit_t_traits<UnitType>::underlying_type,
|
||||
linear_scale> {
|
||||
inline constexpr auto sqrt(const UnitType& value) noexcept
|
||||
-> unit_t<
|
||||
square_root<typename units::traits::unit_t_traits<UnitType>::unit_type>,
|
||||
typename units::traits::unit_t_traits<UnitType>::underlying_type,
|
||||
linear_scale> {
|
||||
return unit_t<
|
||||
square_root<typename units::traits::unit_t_traits<UnitType>::unit_type>,
|
||||
typename units::traits::unit_t_traits<UnitType>::underlying_type,
|
||||
@@ -741,8 +742,8 @@ template <class UnitTypeLhs, class UnitMultiply, class UnitAdd,
|
||||
class = std::enable_if_t<traits::is_unit_t<UnitTypeLhs>::value &&
|
||||
traits::is_unit_t<UnitMultiply>::value &&
|
||||
traits::is_unit_t<UnitAdd>::value>>
|
||||
auto fma(const UnitTypeLhs x, const UnitMultiply y, const UnitAdd z) noexcept
|
||||
-> decltype(x * y) {
|
||||
auto fma(const UnitTypeLhs x, const UnitMultiply y,
|
||||
const UnitAdd z) noexcept -> decltype(x * y) {
|
||||
using resultType = decltype(x * y);
|
||||
static_assert(
|
||||
traits::is_convertible_unit_t<
|
||||
|
||||
Reference in New Issue
Block a user