mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpilib] Replace Speed controller comments with motor controller (NFC) (#3551)
Makes comments consistent with #3302
This commit is contained in:
@@ -172,7 +172,7 @@ Instance::Instance() {
|
||||
HAL_Initialize(500, 0);
|
||||
|
||||
// All joysticks should default to having zero axes, povs and buttons, so
|
||||
// uninitialized memory doesn't get sent to speed controllers.
|
||||
// uninitialized memory doesn't get sent to motor controllers.
|
||||
for (unsigned int i = 0; i < DriverStation::kJoystickPorts; i++) {
|
||||
joystickButtonsPressed[i] = 0;
|
||||
joystickButtonsReleased[i] = 0;
|
||||
|
||||
@@ -122,7 +122,7 @@ class PWM : public wpi::Sendable, public wpi::SendableHelper<PWM> {
|
||||
/**
|
||||
* Set the PWM value based on a speed.
|
||||
*
|
||||
* This is intended to be used by speed controllers.
|
||||
* This is intended to be used by motor controllers.
|
||||
*
|
||||
* @pre SetMaxPositivePwm() called.
|
||||
* @pre SetMinPositivePwm() called.
|
||||
@@ -130,14 +130,14 @@ class PWM : public wpi::Sendable, public wpi::SendableHelper<PWM> {
|
||||
* @pre SetMaxNegativePwm() called.
|
||||
* @pre SetMinNegativePwm() called.
|
||||
*
|
||||
* @param speed The speed to set the speed controller between -1.0 and 1.0.
|
||||
* @param speed The speed to set the motor controller between -1.0 and 1.0.
|
||||
*/
|
||||
virtual void SetSpeed(double speed);
|
||||
|
||||
/**
|
||||
* Get the PWM value in terms of speed.
|
||||
*
|
||||
* This is intended to be used by speed controllers.
|
||||
* This is intended to be used by motor controllers.
|
||||
*
|
||||
* @pre SetMaxPositivePwm() called.
|
||||
* @pre SetMinPositivePwm() called.
|
||||
@@ -164,7 +164,7 @@ class PWM : public wpi::Sendable, public wpi::SendableHelper<PWM> {
|
||||
void SetZeroLatch();
|
||||
|
||||
/**
|
||||
* Optionally eliminate the deadband from a speed controller.
|
||||
* Optionally eliminate the deadband from a motor controller.
|
||||
*
|
||||
* @param eliminateDeadband If true, set the motor curve on the speed
|
||||
* controller to eliminate the deadband in the middle
|
||||
|
||||
@@ -60,8 +60,8 @@ class SpeedController;
|
||||
* with SetDeadband().
|
||||
*
|
||||
* RobotDrive porting guide:
|
||||
* <br>In MecanumDrive, the right side speed controllers are automatically
|
||||
* inverted, while in RobotDrive, no speed controllers are automatically
|
||||
* <br>In MecanumDrive, the right side motor controllers are automatically
|
||||
* inverted, while in RobotDrive, no motor controllers are automatically
|
||||
* inverted.
|
||||
* <br>DriveCartesian(double, double, double, double) is equivalent to
|
||||
* RobotDrive's MecanumDrive_Cartesian(double, double, double, double)
|
||||
|
||||
@@ -201,7 +201,7 @@ enum class BuiltInWidgets {
|
||||
kEncoder,
|
||||
/**
|
||||
* Displays a MotorController.
|
||||
* The speed controller will be controllable from the dashboard when test mode
|
||||
* The motor controller will be controllable from the dashboard when test mode
|
||||
* is enabled, but will otherwise be view-only. <br>Supported types: <ul>
|
||||
* <li>PWMMotorController</li>
|
||||
* <li>DMC60</li>
|
||||
|
||||
@@ -96,7 +96,7 @@ class Shuffleboard final {
|
||||
static void SelectTab(std::string_view title);
|
||||
|
||||
/**
|
||||
* Enables user control of widgets containing actuators: speed controllers,
|
||||
* Enables user control of widgets containing actuators: motor controllers,
|
||||
* relays, etc. This should only be used when the robot is in test mode.
|
||||
* IterativeRobotBase and SampleRobot are both configured to call this method
|
||||
* when entering test mode; most users should not need to use this method
|
||||
|
||||
@@ -88,9 +88,9 @@ public class PWM implements Sendable, AutoCloseable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Optionally eliminate the deadband from a speed controller.
|
||||
* Optionally eliminate the deadband from a motor controller.
|
||||
*
|
||||
* @param eliminateDeadband If true, set the motor curve for the speed controller to eliminate the
|
||||
* @param eliminateDeadband If true, set the motor curve for the motor controller to eliminate the
|
||||
* deadband in the middle of the range. Otherwise, keep the full range without modifying any
|
||||
* values.
|
||||
*/
|
||||
@@ -163,9 +163,9 @@ public class PWM implements Sendable, AutoCloseable {
|
||||
/**
|
||||
* Set the PWM value based on a speed.
|
||||
*
|
||||
* <p>This is intended to be used by speed controllers.
|
||||
* <p>This is intended to be used by motor controllers.
|
||||
*
|
||||
* @param speed The speed to set the speed controller between -1.0 and 1.0.
|
||||
* @param speed The speed to set the motor controller between -1.0 and 1.0.
|
||||
* @pre SetMaxPositivePwm() called.
|
||||
* @pre SetMinPositivePwm() called.
|
||||
* @pre SetCenterPwm() called.
|
||||
@@ -179,7 +179,7 @@ public class PWM implements Sendable, AutoCloseable {
|
||||
/**
|
||||
* Get the PWM value in terms of speed.
|
||||
*
|
||||
* <p>This is intended to be used by speed controllers.
|
||||
* <p>This is intended to be used by motor controllers.
|
||||
*
|
||||
* @return The most recently set speed between -1.0 and 1.0.
|
||||
* @pre SetMaxPositivePwm() called.
|
||||
|
||||
@@ -49,8 +49,8 @@ import edu.wpi.first.wpilibj.SpeedController;
|
||||
* value can be changed with {@link #setDeadband}.
|
||||
*
|
||||
* <p>RobotDrive porting guide: <br>
|
||||
* In MecanumDrive, the right side speed controllers are automatically inverted, while in
|
||||
* RobotDrive, no speed controllers are automatically inverted. <br>
|
||||
* In MecanumDrive, the right side motor controllers are automatically inverted, while in
|
||||
* RobotDrive, no motor controllers are automatically inverted. <br>
|
||||
* {@link #driveCartesian(double, double, double, double)} is equivalent to RobotDrive's
|
||||
* mecanumDrive_Cartesian(double, double, double, double) if a deadband of 0 is used, and the ySpeed
|
||||
* and gyroAngle values are inverted compared to RobotDrive (eg driveCartesian(xSpeed, -ySpeed,
|
||||
|
||||
@@ -246,7 +246,7 @@ public enum BuiltInWidgets implements WidgetType {
|
||||
kEncoder("Encoder"),
|
||||
/**
|
||||
* Displays a {@link edu.wpi.first.wpilibj.motorcontrol.MotorController MotorController}. The
|
||||
* speed controller will be controllable from the dashboard when test mode is enabled, but will
|
||||
* motor controller will be controllable from the dashboard when test mode is enabled, but will
|
||||
* otherwise be view-only. <br>
|
||||
* Supported types:
|
||||
*
|
||||
|
||||
@@ -9,7 +9,7 @@ import edu.wpi.first.util.sendable.Sendable;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SendableBuilderImpl;
|
||||
|
||||
/**
|
||||
* A Shuffleboard widget that handles a {@link Sendable} object such as a speed controller or
|
||||
* A Shuffleboard widget that handles a {@link Sendable} object such as a motor controller or
|
||||
* sensor.
|
||||
*/
|
||||
public final class ComplexWidget extends ShuffleboardWidget<ComplexWidget> {
|
||||
|
||||
@@ -97,7 +97,7 @@ public final class Shuffleboard {
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables user control of widgets containing actuators: speed controllers, relays, etc. This
|
||||
* Enables user control of widgets containing actuators: motor controllers, relays, etc. This
|
||||
* should only be used when the robot is in test mode. IterativeRobotBase and SampleRobot are both
|
||||
* configured to call this method when entering test mode; most users should not need to use this
|
||||
* method directly.
|
||||
|
||||
Reference in New Issue
Block a user