mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpimath] Replace Speeds with Velocities (#8479)
I left "free speed" alone since that's the technical term for it. In general, velocity is a vector quantity, and speed is a magnitude (i.e., a strictly positive value). This PR also replaces the speed verbiage in MotorController with duty cycle. Fixes #8423.
This commit is contained in:
@@ -7,7 +7,7 @@ package org.wpilib.units;
|
||||
import org.wpilib.units.measure.Dimensionless;
|
||||
|
||||
/**
|
||||
* A measure holds the magnitude and unit of some dimension, such as distance, time, or speed. An
|
||||
* A measure holds the magnitude and unit of some dimension, such as distance, time, or velocity. An
|
||||
* immutable measure is <i>immutable</i> and <i>type safe</i>, making it easy to use in concurrent
|
||||
* situations and gives compile-time safety. Two measures with the same <i>unit</i> and
|
||||
* <i>magnitude</i> are effectively equivalent objects.
|
||||
|
||||
@@ -33,8 +33,8 @@ import org.wpilib.units.measure.Velocity;
|
||||
import org.wpilib.units.measure.Voltage;
|
||||
|
||||
/**
|
||||
* A measure holds the magnitude and unit of some dimension, such as distance, time, or speed. Two
|
||||
* measures with the same <i>unit</i> and <i>magnitude</i> are effectively equivalent objects.
|
||||
* A measure holds the magnitude and unit of some dimension, such as distance, time, or velocity.
|
||||
* Two measures with the same <i>unit</i> and <i>magnitude</i> are effectively equivalent objects.
|
||||
*
|
||||
* @param <U> the unit type of the measure
|
||||
*/
|
||||
|
||||
@@ -164,7 +164,7 @@ public final class Units {
|
||||
|
||||
/**
|
||||
* A unit of angular velocity equivalent to spinning at a rate of one {@link #Rotations Rotation}
|
||||
* per {@link #Minute}. Motor spec sheets often list maximum speeds in terms of RPM.
|
||||
* per {@link #Minute}. Motor spec sheets often list maximum velocities in terms of RPM.
|
||||
*/
|
||||
public static final AngularVelocityUnit RotationsPerMinute = Rotations.per(Minute);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user