From 11fcec6e1968478ba05237dcb597591c92f45a2c Mon Sep 17 00:00:00 2001 From: ss0g <55930267+ss0g@users.noreply.github.com> Date: Wed, 12 Jan 2022 18:00:26 -0800 Subject: [PATCH] add constant for motor speed --- src/main/java/com/spartronics4915/frc/Constants.java | 1 + .../java/com/spartronics4915/frc/commands/ExampleCommand.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/spartronics4915/frc/Constants.java b/src/main/java/com/spartronics4915/frc/Constants.java index 9e22c12..4d3c02d 100644 --- a/src/main/java/com/spartronics4915/frc/Constants.java +++ b/src/main/java/com/spartronics4915/frc/Constants.java @@ -12,4 +12,5 @@ public final class Constants { public static final int kTestMotorId = 1; + public static final double kTestMotorSpeed = 0.3; } diff --git a/src/main/java/com/spartronics4915/frc/commands/ExampleCommand.java b/src/main/java/com/spartronics4915/frc/commands/ExampleCommand.java index 4796a87..e82b193 100644 --- a/src/main/java/com/spartronics4915/frc/commands/ExampleCommand.java +++ b/src/main/java/com/spartronics4915/frc/commands/ExampleCommand.java @@ -1,5 +1,6 @@ package com.spartronics4915.frc.commands; +import com.spartronics4915.frc.Constants; import com.spartronics4915.frc.subsystems.ExampleSubsystem; import edu.wpi.first.wpilibj2.command.CommandBase; @@ -25,7 +26,7 @@ public ExampleCommand(ExampleSubsystem subsystem) // Called when the command is initially scheduled. @Override public void initialize() { - mExampleSubsystem.startTestMotor(1); + mExampleSubsystem.startTestMotor(Constants.kTestMotorSpeed); } // Called every time the scheduler runs while the command is scheduled.