From 87e677d4af35d9a48587d5e4053bf4f21faa6ddc Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Tue, 17 Mar 2026 16:46:04 -0700 Subject: [PATCH] [wpilib] Rename MotorSafety constants to all caps --- .../main/native/include/wpi/hardware/motor/MotorSafety.hpp | 4 ++-- .../src/main/java/org/wpilib/hardware/motor/MotorSafety.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wpilibc/src/main/native/include/wpi/hardware/motor/MotorSafety.hpp b/wpilibc/src/main/native/include/wpi/hardware/motor/MotorSafety.hpp index f4e2784c34..45f079fdce 100644 --- a/wpilibc/src/main/native/include/wpi/hardware/motor/MotorSafety.hpp +++ b/wpilibc/src/main/native/include/wpi/hardware/motor/MotorSafety.hpp @@ -105,10 +105,10 @@ class MotorSafety { virtual std::string GetDescription() const = 0; private: - static constexpr auto kDefaultSafetyExpiration = 100_ms; + static constexpr auto DEFAULT_SAFETY_EXPIRATION = 100_ms; // The expiration time for this object - wpi::units::second_t m_expiration = kDefaultSafetyExpiration; + wpi::units::second_t m_expiration = DEFAULT_SAFETY_EXPIRATION; // True if motor safety is enabled for this motor bool m_enabled = false; diff --git a/wpilibj/src/main/java/org/wpilib/hardware/motor/MotorSafety.java b/wpilibj/src/main/java/org/wpilib/hardware/motor/MotorSafety.java index e623bd561d..87fb603fef 100644 --- a/wpilibj/src/main/java/org/wpilib/hardware/motor/MotorSafety.java +++ b/wpilibj/src/main/java/org/wpilib/hardware/motor/MotorSafety.java @@ -21,9 +21,9 @@ import org.wpilib.util.WPIUtilJNI; *

The subclass should call feed() whenever the motor value is updated. */ public abstract class MotorSafety { - private static final double kDefaultSafetyExpiration = 0.1; + private static final double DEFAULT_SAFETY_EXPIRATION = 0.1; - private double m_expiration = kDefaultSafetyExpiration; + private double m_expiration = DEFAULT_SAFETY_EXPIRATION; private boolean m_enabled; private double m_stopTime = Timer.getMonotonicTimestamp(); private final Object m_thisMutex = new Object();