Skip to content

Update RLIs to 2027.0.0-alpha-4#3272

Merged
sciencewhiz merged 12 commits intowpilibsuite:2027from
sciencewhiz:RLI2027Alpha4
Apr 14, 2026
Merged

Update RLIs to 2027.0.0-alpha-4#3272
sciencewhiz merged 12 commits intowpilibsuite:2027from
sciencewhiz:RLI2027Alpha4

Conversation

@sciencewhiz
Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions bot added the 2027 label Apr 11, 2026
@sciencewhiz
Copy link
Copy Markdown
Collaborator Author

\inspector fix all

@sciencewhiz
Copy link
Copy Markdown
Collaborator Author

\inspector fix all

@sciencewhiz
Copy link
Copy Markdown
Collaborator Author

\inspector fix all

@sciencewhiz
Copy link
Copy Markdown
Collaborator Author

\inspector fix all

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 11, 2026

Inspector Report


Up To Date

Details
ALL @ <source/docs/contributing/frc-docs/style-guide.rst>
ALL @ <source/docs/romi-robot/programming-romi.rst>
ALL @ <source/docs/software/advanced-controls/controllers/profiled-pidcontroller.rst>
ALL @ <source/docs/software/advanced-controls/controllers/trapezoidal-profiles.rst>
ALL @ <source/docs/software/advanced-controls/state-space/state-space-flywheel-walkthrough.rst>
ALL @ <source/docs/software/advanced-controls/state-space/state-space-observers.rst>
ALL @ <source/docs/software/advanced-gradlerio/code-formatting.rst>
ALL @ <source/docs/software/advanced-gradlerio/profiling-with-visualvm.rst>
ALL @ <source/docs/software/basic-programming/deploy-directory.rst>
ALL @ <source/docs/software/basic-programming/java-gc.rst>
ALL @ <source/docs/software/basic-programming/robot-preferences.rst>
ALL @ <source/docs/software/can-devices/power-distribution-module.rst>
ALL @ <source/docs/software/commandbased/commands-v2/binding-commands-to-triggers.rst>
ALL @ <source/docs/software/commandbased/commands-v2/command-compositions.rst>
ALL @ <source/docs/software/commandbased/commands-v2/commands.rst>
ALL @ <source/docs/software/commandbased/commands-v2/cpp-command-discussion.rst>
ALL @ <source/docs/software/commandbased/commands-v2/pid-subsystems-commands.rst>
ALL @ <source/docs/software/commandbased/commands-v2/profile-subsystems-commands.rst>
ALL @ <source/docs/software/commandbased/commands-v2/profilepid-subsystems-commands.rst>
ALL @ <source/docs/software/commandbased/commands-v2/structuring-command-based-project.rst>
ALL @ <source/docs/software/hardware-apis/sensors/analog-inputs-software.rst>
ALL @ <source/docs/software/hardware-apis/sensors/analog-potentiometers-software.rst>
ALL @ <source/docs/software/hardware-apis/sensors/digital-inputs-software.rst>
ALL @ <source/docs/software/hardware-apis/sensors/limit-switch.rst>
ALL @ <source/docs/software/vision-processing/roborio/using-the-cameraserver-on-the-roborio.rst>
ALL @ <source/docs/xrp-robot/programming-xrp.rst>
wpilibjExamples/src/main/java/org/wpilib/examples/mechanism2d/Robot.java#L43-L46 @ <source/docs/software/dashboards/glass/mech2d-widget.rst:13>
wpilibcExamples/src/main/cpp/examples/Mechanism2d/cpp/Robot.cpp#L58-L61 @ <source/docs/software/dashboards/glass/mech2d-widget.rst:18>
wpilibjExamples/src/main/java/org/wpilib/examples/mechanism2d/Robot.java#L48-L53 @ <source/docs/software/dashboards/glass/mech2d-widget.rst:34>
wpilibcExamples/src/main/cpp/examples/Mechanism2d/cpp/Robot.cpp#L62-L68 @ <source/docs/software/dashboards/glass/mech2d-widget.rst:39>
wpilibjExamples/src/main/java/org/wpilib/examples/mechanism2d/Robot.java#L55-L56 @ <source/docs/software/dashboards/glass/mech2d-widget.rst:53>
wpilibcExamples/src/main/cpp/examples/Mechanism2d/cpp/Robot.cpp#L35-L36 @ <source/docs/software/dashboards/glass/mech2d-widget.rst:58>
wpilibjExamples/src/main/java/org/wpilib/examples/mechanism2d/Robot.java#L59-L64 @ <source/docs/software/dashboards/glass/mech2d-widget.rst:72>
wpilibcExamples/src/main/cpp/templates/timedskeleton/cpp/Robot.cpp#L5-L29 @ <source/docs/software/vscode-overview/creating-robot-program.rst:30>
wpilibjExamples/src/main/java/org/wpilib/examples/elevatorsimulation/subsystems/Elevator.java#L46-L58 @ <source/docs/software/wpilib-tools/robot-simulation/physics-sim.rst:45>
wpilibcExamples/src/main/cpp/examples/ElevatorSimulation/include/subsystems/Elevator.hpp#L50-L60 @ <source/docs/software/wpilib-tools/robot-simulation/physics-sim.rst:53>
wpilibjExamples/src/main/java/org/wpilib/examples/elevatorsimulation/Robot.java#L30-L39 @ <source/docs/software/wpilib-tools/robot-simulation/physics-sim.rst:65>
wpilibjExamples/src/main/java/org/wpilib/examples/elevatorsimulation/subsystems/Elevator.java#L98-L105 @ <source/docs/software/wpilib-tools/robot-simulation/physics-sim.rst:70>
wpilibcExamples/src/main/cpp/examples/ElevatorSimulation/cpp/Robot.cpp#L20-L28 @ <source/docs/software/wpilib-tools/robot-simulation/physics-sim.rst:78>
wpilibjExamples/src/main/java/org/wpilib/examples/elevatorsimulation/subsystems/Elevator.java#L78-L91 @ <source/docs/software/wpilib-tools/robot-simulation/physics-sim.rst:99>
wpilibcExamples/src/main/cpp/examples/ElevatorSimulation/cpp/subsystems/Elevator.cpp#L19-L34 @ <source/docs/software/wpilib-tools/robot-simulation/physics-sim.rst:107>
vscode-wpilib/resources/gradle/java/build.gradle#L77-L80 @ <source/docs/software/wpilib-tools/robot-simulation/unit-testing.rst:73>
wpilibjExamples/src/main/java/org/wpilib/examples/gettingstarted/Robot.java#L7-L12 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:136>
wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L5-L9 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:144>
GettingStarted/robot.py#L8-L9 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:151>
wpilibjExamples/src/main/java/org/wpilib/examples/gettingstarted/Robot.java#L19-L25 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:256>
wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L50-L60 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:264>
wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L12-L13 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:299>
wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L17-L23 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:304>
wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L12-L13 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:365>
wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L17-L23 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:370>
wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L12-L13 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:416>
wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L17-L23 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:421>
wpilibjExamples/src/main/java/org/wpilib/examples/gettingstarted/Robot.java#L27-L28,L32-L36 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:461>
wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L12-L13,L17-L24 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:470>
wpilibjExamples/src/main/java/org/wpilib/examples/gettingstarted/Robot.java#L38-L54 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:489>
GettingStarted/robot.py#L31-L43 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:499>
wpilibjExamples/src/main/java/org/wpilib/examples/gettingstarted/Robot.java#L56-L64 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:512>
wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L38-L45 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:517>
GettingStarted/robot.py#L45-L52 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:522>
wpilibjExamples/src/main/java/org/wpilib/examples/gettingstarted/Robot.java#L66-L73 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:533>
wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L45-L48 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:538>
GettingStarted/robot.py#L54-L58 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:543>

Outdated - Automatically Fixed

Details

Invalid - Manual Intervention Needed

Details

v2027.0.0-alpha-4 | 2109161534fdce08ae845452b746afaa38cf8fd6/wpilibcExamples/src/main/cpp/examples/Mechanism2d/cpp/Robot.cpp#L40-L45 @ <source/docs/software/dashboards/glass/mech2d-widget.rst:77>

-	40	 	  void RobotPeriodic() override {
 	41	40	    // update the dashboard mechanism's state
 	42	41	    m_elevator->SetLength(kElevatorMinimumLength +
 	43	42	                          m_elevatorEncoder.GetDistance());
 	44	43	    m_wrist->SetAngle(wpi::units::degree_t{m_wristPotentiometer.Get()});
 	45	44	  }
+	 	45	

v2027.0.0-alpha-4 | 2109161534fdce08ae845452b746afaa38cf8fd6/wpilibjExamples/src/main/java/org/wpilib/templates/timedskeleton/Robot.java#L7-L53 @ <source/docs/software/vscode-overview/creating-robot-program.rst:25>

-	7	 	import org.wpilib.opmode.TimedRobot;
+	 	7	import org.wpilib.framework.TimedRobot;
 	8	8	
 	9	9	/**
 	10	10	 * The methods in this class are called automatically corresponding to each mode, as described in
 	11	11	 * the TimedRobot documentation. If you change the name of this class or the package after creating
 	12	12	 * this project, you must also update the Main.java file in the project.
 	13	13	 */
 	14	14	public class Robot extends TimedRobot {
 	15	15	  /**
 	16	16	   * This function is run when the robot is first started up and should be used for any
 	17	17	   * initialization code.
 	18	18	   */
 	19	19	  public Robot() {}
 	20	20	
 	21	21	  @Override
 	22	22	  public void robotPeriodic() {}
 	23	23	
 	24	24	  @Override
 	25	25	  public void autonomousInit() {}
 	26	26	
 	27	27	  @Override
 	28	28	  public void autonomousPeriodic() {}
 	29	29	
 	30	30	  @Override
 	31	31	  public void teleopInit() {}
 	32	32	
 	33	33	  @Override
 	34	34	  public void teleopPeriodic() {}
 	35	35	
 	36	36	  @Override
 	37	37	  public void disabledInit() {}
 	38	38	
 	39	39	  @Override
 	40	40	  public void disabledPeriodic() {}
 	41	41	
 	42	42	  @Override
 	43	43	  public void testInit() {}
 	44	44	
 	45	45	  @Override
 	46	46	  public void testPeriodic() {}
 	47	47	
 	48	48	  @Override
 	49	49	  public void simulationInit() {}
 	50	50	
 	51	51	  @Override
 	52	52	  public void simulationPeriodic() {}
 	53	53	}

v2027.0.0-alpha-4 | 2109161534fdce08ae845452b746afaa38cf8fd6/wpilibcExamples/src/main/cpp/examples/ElevatorSimulation/cpp/subsystems/Elevator.cpp#L42-L50 @ <source/docs/software/wpilib-tools/robot-simulation/physics-sim.rst:83>

-	42	 	void Elevator::ReachGoal(wpi::units::meter_t goal) {
 	43	42	  m_controller.SetGoal(goal);
 	44	43	  // With the setpoint value we run PID control like normal
 	45	44	  double pidOutput =
 	46	45	      m_controller.Calculate(wpi::units::meter_t{m_encoder.GetDistance()});
 	47	46	  wpi::units::volt_t feedforwardOutput =
 	48	47	      m_feedforward.Calculate(m_controller.GetSetpoint().velocity);
 	49	48	  m_motor.SetVoltage(wpi::units::volt_t{pidOutput} + feedforwardOutput);
 	50	49	}
+	 	50	

v2027.0.0-alpha-4 | 2109161534fdce08ae845452b746afaa38cf8fd6/wpilibjExamples/src/main/java/org/wpilib/examples/unittest/subsystems/Intake.java#L7-EOF @ <source/docs/software/wpilib-tools/robot-simulation/unit-testing.rst:19>

 	7	7	import org.wpilib.examples.unittest.Constants.IntakeConstants;
 	8	8	import org.wpilib.hardware.motor.PWMSparkMax;
 	9	9	import org.wpilib.hardware.pneumatic.DoubleSolenoid;
 	10	10	import org.wpilib.hardware.pneumatic.PneumaticsModuleType;
 	11	11	
 	12	12	public class Intake implements AutoCloseable {
 	13	13	  private final PWMSparkMax m_motor;
 	14	14	  private final DoubleSolenoid m_piston;
 	15	15	
 	16	16	  public Intake() {
 	17	17	    m_motor = new PWMSparkMax(IntakeConstants.kMotorPort);
 	18	18	    m_piston =
 	19	19	        new DoubleSolenoid(
 	20	20	            0,
 	21	21	            PneumaticsModuleType.CTREPCM,
 	22	22	            IntakeConstants.kPistonFwdChannel,
 	23	23	            IntakeConstants.kPistonRevChannel);
 	24	24	  }
 	25	25	
 	26	26	  public void deploy() {
 	27	27	    m_piston.set(DoubleSolenoid.Value.kForward);
 	28	28	  }
 	29	29	
 	30	30	  public void retract() {
 	31	31	    m_piston.set(DoubleSolenoid.Value.kReverse);
-	32	 	    m_motor.set(0); // turn off the motor
+	 	32	    m_motor.setDutyCycle(0); // turn off the motor
 	33	33	  }
 	34	34	
-	35	 	  public void activate(double speed) {
+	 	35	  public void activate(double velocity) {
 	36	36	    if (isDeployed()) {
-	37	 	      m_motor.set(speed);
+	 	37	      m_motor.setDutyCycle(velocity);
 	38	38	    } else { // if piston isn't open, do nothing
-	39	 	      m_motor.set(0);
+	 	39	      m_motor.setDutyCycle(0);
 	40	40	    }
 	41	41	  }
 	42	42	
 	43	43	  public boolean isDeployed() {
 	44	44	    return m_piston.get() == DoubleSolenoid.Value.kForward;
 	45	45	  }
 	46	46	
 	47	47	  @Override
 	48	48	  public void close() {
 	49	49	    m_piston.close();
 	50	50	    m_motor.close();
 	51	51	  }
 	52	52	}
 	53	53	

v2027.0.0-alpha-4 | 2109161534fdce08ae845452b746afaa38cf8fd6/wpilibcExamples/src/main/cpp/examples/UnitTest/include/subsystems/Intake.hpp#L7-EOF @ <source/docs/software/wpilib-tools/robot-simulation/unit-testing.rst:27>

-	7	 	#include <wpi/hardware/motor/PWMSparkMax.hpp>
-	8	 	#include <wpi/hardware/pneumatic/DoubleSolenoid.hpp>
-	9	 	
 	10	7	#include "Constants.hpp"
+	 	8	#include "wpi/hardware/motor/PWMSparkMax.hpp"
+	 	9	#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
 	11	10	
 	12	11	class Intake {
 	13	12	 public:
 	14	13	  void Deploy();
 	15	14	  void Retract();
-	16	 	  void Activate(double speed);
+	 	15	  void Activate(double velocity);
 	17	16	  bool IsDeployed() const;
 	18	17	
 	19	18	 private:
 	20	19	  wpi::PWMSparkMax m_motor{IntakeConstants::kMotorPort};
 	21	20	  wpi::DoubleSolenoid m_piston{0, wpi::PneumaticsModuleType::CTREPCM,
 	22	21	                               IntakeConstants::kPistonFwdChannel,
 	23	22	                               IntakeConstants::kPistonRevChannel};
 	24	23	};
 	25	24	

v2027.0.0-alpha-4 | 2109161534fdce08ae845452b746afaa38cf8fd6/wpilibcExamples/src/main/cpp/examples/UnitTest/cpp/subsystems/Intake.cpp#L5-EOF @ <source/docs/software/wpilib-tools/robot-simulation/unit-testing.rst:34>

 	5	5	#include "subsystems/Intake.hpp"
 	6	6	
 	7	7	void Intake::Deploy() {
 	8	8	  m_piston.Set(wpi::DoubleSolenoid::Value::kForward);
 	9	9	}
 	10	10	
 	11	11	void Intake::Retract() {
 	12	12	  m_piston.Set(wpi::DoubleSolenoid::Value::kReverse);
-	13	 	  m_motor.Set(0);  // turn off the motor
+	 	13	  m_motor.SetDutyCycle(0);  // turn off the motor
 	14	14	}
 	15	15	
-	16	 	void Intake::Activate(double speed) {
+	 	16	void Intake::Activate(double velocity) {
 	17	17	  if (IsDeployed()) {
-	18	 	    m_motor.Set(speed);
+	 	18	    m_motor.SetDutyCycle(velocity);
 	19	19	  } else {  // if piston isn't open, do nothing
-	20	 	    m_motor.Set(0);
+	 	20	    m_motor.SetDutyCycle(0);
 	21	21	  }
 	22	22	}
 	23	23	
 	24	24	bool Intake::IsDeployed() const {
 	25	25	  return m_piston.Get() == wpi::DoubleSolenoid::Value::kForward;
 	26	26	}
 	27	27	

v2027.0.0-alpha-4 | 2109161534fdce08ae845452b746afaa38cf8fd6/wpilibjExamples/src/test/java/org/wpilib/examples/unittest/subsystems/IntakeTest.java#L7-EOF @ <source/docs/software/wpilib-tools/robot-simulation/unit-testing.rst:54>

 	7	7	import static org.junit.jupiter.api.Assertions.assertEquals;
 	8	8	
 	9	9	import org.junit.jupiter.api.AfterEach;
 	10	10	import org.junit.jupiter.api.BeforeEach;
 	11	11	import org.junit.jupiter.api.Test;
 	12	12	import org.wpilib.examples.unittest.Constants.IntakeConstants;
 	13	13	import org.wpilib.hardware.hal.HAL;
 	14	14	import org.wpilib.hardware.pneumatic.DoubleSolenoid;
 	15	15	import org.wpilib.hardware.pneumatic.PneumaticsModuleType;
 	16	16	import org.wpilib.simulation.DoubleSolenoidSim;
 	17	17	import org.wpilib.simulation.PWMMotorControllerSim;
 	18	18	
 	19	19	class IntakeTest {
 	20	20	  static final double DELTA = 1e-2; // acceptable deviation range
 	21	21	  Intake m_intake;
 	22	22	  PWMMotorControllerSim m_simMotor;
 	23	23	  DoubleSolenoidSim m_simPiston;
 	24	24	
 	25	25	  @BeforeEach // this method will run before each test
 	26	26	  void setup() {
 	27	27	    assert HAL.initialize(500, 0); // initialize the HAL, crash if failed
 	28	28	    m_intake = new Intake(); // create our intake
 	29	29	    m_simMotor =
 	30	30	        new PWMMotorControllerSim(
 	31	31	            IntakeConstants.kMotorPort); // create our simulation PWM motor controller
 	32	32	    m_simPiston =
 	33	33	        new DoubleSolenoidSim(
 	34	34	            PneumaticsModuleType.CTREPCM,
 	35	35	            IntakeConstants.kPistonFwdChannel,
 	36	36	            IntakeConstants.kPistonRevChannel); // create our simulation solenoid
 	37	37	  }
 	38	38	
 	39	39	  @SuppressWarnings("PMD.SignatureDeclareThrowsException")
 	40	40	  @AfterEach // this method will run after each test
 	41	41	  void shutdown() throws Exception {
 	42	42	    m_intake.close(); // destroy our intake object
 	43	43	  }
 	44	44	
 	45	45	  @Test // marks this method as a test
 	46	46	  void doesntWorkWhenClosed() {
 	47	47	    m_intake.retract(); // close the intake
 	48	48	    m_intake.activate(0.5); // try to activate the motor
 	49	49	    assertEquals(
-	50	 	        0.0, m_simMotor.getSpeed(), DELTA); // make sure that the value set to the motor is 0
+	 	50	        0.0, m_simMotor.getDutyCycle(), DELTA); // make sure that the value set to the motor is 0
 	51	51	  }
 	52	52	
 	53	53	  @Test
 	54	54	  void worksWhenOpen() {
 	55	55	    m_intake.deploy();
 	56	56	    m_intake.activate(0.5);
-	57	 	    assertEquals(0.5, m_simMotor.getSpeed(), DELTA);
+	 	57	    assertEquals(0.5, m_simMotor.getDutyCycle(), DELTA);
 	58	58	  }
 	59	59	
 	60	60	  @Test
 	61	61	  void retractTest() {
 	62	62	    m_intake.retract();
 	63	63	    assertEquals(DoubleSolenoid.Value.kReverse, m_simPiston.get());
 	64	64	  }
 	65	65	
 	66	66	  @Test
 	67	67	  void deployTest() {
 	68	68	    m_intake.deploy();
 	69	69	    assertEquals(DoubleSolenoid.Value.kForward, m_simPiston.get());
 	70	70	  }
 	71	71	}
 	72	72	

v2027.0.0-alpha-4 | 2109161534fdce08ae845452b746afaa38cf8fd6/wpilibcExamples/src/test/cpp/examples/UnitTest/cpp/subsystems/IntakeTest.cpp#L5-EOF @ <source/docs/software/wpilib-tools/robot-simulation/unit-testing.rst:61>

+	 	5	#include "subsystems/Intake.hpp"
+	 	6	
 	5	7	#include <gtest/gtest.h>
-	6	 	#include <wpi/hardware/pneumatic/DoubleSolenoid.hpp>
-	7	 	#include <wpi/simulation/DoubleSolenoidSim.hpp>
-	8	 	#include <wpi/simulation/PWMMotorControllerSim.hpp>
 	9	8	
 	10	9	#include "Constants.hpp"
-	11	 	#include "subsystems/Intake.hpp"
+	 	10	#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
+	 	11	#include "wpi/simulation/DoubleSolenoidSim.hpp"
+	 	12	#include "wpi/simulation/PWMMotorControllerSim.hpp"
 	12	13	
 	13	14	class IntakeTest : public testing::Test {
 	14	15	 protected:
 	15	16	  Intake intake;  // create our intake
 	16	17	  wpi::sim::PWMMotorControllerSim simMotor{
 	17	18	      IntakeConstants::kMotorPort};  // create our simulation PWM
 	18	19	  wpi::sim::DoubleSolenoidSim simPiston{
 	19	20	      wpi::PneumaticsModuleType::CTREPCM, IntakeConstants::kPistonFwdChannel,
 	20	21	      IntakeConstants::kPistonRevChannel};  // create our simulation solenoid
 	21	22	};
 	22	23	
 	23	24	TEST_F(IntakeTest, DoesntWorkWhenClosed) {
 	24	25	  intake.Retract();      // close the intake
 	25	26	  intake.Activate(0.5);  // try to activate the motor
 	26	27	  EXPECT_DOUBLE_EQ(
 	27	28	      0.0,
-	28	 	      simMotor.GetSpeed());  // make sure that the value set to the motor is 0
+	 	29	      simMotor
+	 	30	          .GetDutyCycle());  // make sure that the value set to the motor is 0
 	29	31	}
 	30	32	
 	31	33	TEST_F(IntakeTest, WorksWhenOpen) {
 	32	34	  intake.Deploy();
 	33	35	  intake.Activate(0.5);
-	34	 	  EXPECT_DOUBLE_EQ(0.5, simMotor.GetSpeed());
+	 	36	  EXPECT_DOUBLE_EQ(0.5, simMotor.GetDutyCycle());
 	35	37	}
 	36	38	
 	37	39	TEST_F(IntakeTest, Retract) {
 	38	40	  intake.Retract();
 	39	41	  EXPECT_EQ(wpi::DoubleSolenoid::Value::kReverse, simPiston.Get());
 	40	42	}
 	41	43	
 	42	44	TEST_F(IntakeTest, Deploy) {
 	43	45	  intake.Deploy();
 	44	46	  EXPECT_EQ(wpi::DoubleSolenoid::Value::kForward, simPiston.Get());
 	45	47	}
 	46	48	

v2027.0.0-alpha-4 | 2109161534fdce08ae845452b746afaa38cf8fd6/wpilibcExamples/src/main/cpp/examples/GettingStarted/cpp/Robot.cpp#L25-L36 @ <source/docs/zero-to-robot/step-4/creating-test-drivetrain-program-cpp-java-python.rst:494>

 	25	25	  void AutonomousInit() override { m_timer.Restart(); }
 	26	26	
 	27	27	  void AutonomousPeriodic() override {
 	28	28	    // Drive for 2 seconds
 	29	29	    if (m_timer.Get() < 2_s) {
-	30	 	      // Drive forwards half speed, make sure to turn input squaring off
+	 	30	      // Drive forwards half velocity, make sure to turn input squaring off
 	31	31	      m_robotDrive.ArcadeDrive(0.5, 0.0, false);
 	32	32	    } else {
 	33	33	      // Stop robot
 	34	34	      m_robotDrive.ArcadeDrive(0.0, 0.0, false);
 	35	35	    }
 	36	36	  }

@sciencewhiz
Copy link
Copy Markdown
Collaborator Author

\inspector fix all

@sciencewhiz
Copy link
Copy Markdown
Collaborator Author

\inspector check all

@sciencewhiz sciencewhiz marked this pull request as ready for review April 12, 2026 00:07
@sciencewhiz sciencewhiz merged commit 1cc7594 into wpilibsuite:2027 Apr 14, 2026
11 checks passed
@sciencewhiz sciencewhiz deleted the RLI2027Alpha4 branch April 14, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant