Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4560855
first pass at rev IO
garrett928 Oct 22, 2025
f70cae7
Merge branch 'dev' into implement-rev-motorio
garrett928 Oct 24, 2025
35fc34f
add seperate rev subsytem and update docs
garrett928 Oct 24, 2025
6b067e8
refactor MotorIORev: clean up imports and improve code formatting
garrett928 Nov 24, 2025
cd9d261
Merge branch 'dev' into implement-rev-motorio
garrett928 Nov 24, 2025
e152663
merge dev
garrett928 Nov 24, 2025
cbb9d84
merge rotary
garrett928 Nov 24, 2025
631cc53
merge dev
garrett928 Nov 24, 2025
1e90100
merge dev
garrett928 Nov 24, 2025
b9de937
partially working
garrett928 Nov 24, 2025
6bdb24f
rev sim mostly working
garrett928 Nov 24, 2025
ee5d549
working rev sim
garrett928 Nov 24, 2025
53a3377
Refactor rotary subsystem
garrett928 Nov 25, 2025
cb649e1
test working
garrett928 Nov 25, 2025
ecf6f8f
update sim
garrett928 Nov 25, 2025
e285b3e
Update src/main/java/frc/robot/subsystems/revRotary/RevRotaryConstant…
garrett928 Nov 25, 2025
f29b6e6
Update src/main/java/frc/robot/RobotContainer.java
garrett928 Nov 25, 2025
b125589
Update src/main/java/frc/lib/io/motor/MotorIORev.java
garrett928 Nov 25, 2025
80e922b
Update .github/instructions/default.instructions.md
garrett928 Nov 25, 2025
c9cc5b5
Update src/main/java/frc/robot/subsystems/revRotary/RevRotary.java
garrett928 Nov 25, 2025
afd56fd
Update src/main/java/frc/robot/subsystems/revRotary/RevRotaryConstant…
garrett928 Nov 25, 2025
97d8fc8
Update src/test/java/frc/robot/subsystems/rotary/RotaryTest.java
garrett928 Nov 25, 2025
21602a8
Update src/main/java/frc/lib/io/motor/MotorIORevSim.java
garrett928 Nov 25, 2025
81f0df1
Update src/main/java/frc/lib/io/motor/MotorIOSim.java
garrett928 Nov 25, 2025
078adda
Initial plan
Copilot Nov 25, 2025
2448e41
add close method
garrett928 Nov 25, 2025
01e8bb3
Address review comments: fix debug prints, initialization logic, nami…
Copilot Nov 25, 2025
2b5bef9
Merge branch 'implement-rev-motorio' into copilot/sub-pr-190
garrett928 Nov 25, 2025
9952272
Merge pull request #218 from WHS-FRC-3467/copilot/sub-pr-190
garrett928 Nov 25, 2025
3e7c325
Merge branch 'dev' into implement-rev-motorio
garrett928 Nov 26, 2025
475d964
rename folder
garrett928 Nov 26, 2025
66dc14c
Merge branch 'implement-rev-motorio' of https://github.com/WHS-FRC-34…
garrett928 Nov 26, 2025
5eed051
add comment
garrett928 Nov 26, 2025
c0dd131
fix import
garrett928 Nov 26, 2025
6743832
remove debug logging
garrett928 Nov 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/instructions/default.instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FRC Team W8 Library - AI Assistant Instructions

You are a senior Java engineer with 10+ years of experience. You are helping high school students on an FRC (FIRST Robotics Competition) team. Write clear, educational code that students can learn from and maintain.
You are a sr Java engineer with 10+ years of experience. You are helping high school students on an FRC (FIRST Robotics Competition) team. Write clear, educational code that students can learn from and maintain.

## Technology Stack

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/frc/lib/devices/ObjectDetection.java
Comment thread
garrett928 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

import org.littletonrobotics.junction.Logger;
import java.util.ArrayList;
import frc.lib.io.objectdetection.ObjectDetectionIO;
import frc.lib.io.objectdetection.ObjectDetectionIOInputsAutoLogged;
import frc.lib.io.objectdetection.ObjectDetectionIO.TargetObservation;
import java.util.Arrays;
import java.lang.Math;
import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Transform2d;
import edu.wpi.first.math.geometry.Transform3d;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Translation2d;
import frc.lib.io.objectdetection.ObjectDetectionIOInputsAutoLogged;
import frc.lib.io.objectdetection.ObjectDetectionIO;
import frc.lib.io.objectdetection.ObjectDetectionIO.TargetObservation;

/**
* Device level implementation of an object detection camera. While the IO layer is responsible for
Expand Down
74 changes: 63 additions & 11 deletions src/main/java/frc/lib/io/motor/MotorIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import static edu.wpi.first.units.Units.RadiansPerSecond;
import static edu.wpi.first.units.Units.Volts;

import org.apache.commons.lang3.NotImplementedException;
import org.littletonrobotics.junction.AutoLog;

import edu.wpi.first.units.AngularAccelerationUnit;
Expand Down Expand Up @@ -97,7 +98,7 @@ abstract class MotorInputs {
*/
public default String getName()
{
return "";
throw new NotImplementedException("This method has not been implemented");
Comment on lines -100 to +101

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method needs to be removed for replay support

}

/**
Expand All @@ -107,35 +108,45 @@ public default String getName()
* @param inputs The structure to populate with updated sensor values.
*/
public default void updateInputs(MotorInputs inputs)
{}
{
throw new NotImplementedException("This method has not been implemented");
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks replay


/**
* Sets the motor to coast mode.
*/
public default void runCoast()
{}
{
throw new NotImplementedException("This method has not been implemented");
}
Comment on lines -116 to +121

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks replay


/**
* Sets the motor to brake mode.
*/
public default void runBrake()
{}
{
throw new NotImplementedException("This method has not been implemented");
}
Comment on lines -122 to +129

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks replay


/**
* Runs the motor using direct voltage control.
*
* @param voltage Desired voltage output.
*/
public default void runVoltage(Voltage voltage)
{}
{
throw new NotImplementedException("This method has not been implemented");
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks replay

/**
* Runs the motor with a specified current output.
*
* @param current Desired torque-producing current.
*/
public default void runCurrent(Current current)
{}
{
throw new NotImplementedException("This method has not been implemented");
}
Comment on lines -138 to +149

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks replay


/**
* Runs the motor with a specified current output and duty cycle.
Expand All @@ -144,15 +155,19 @@ public default void runCurrent(Current current)
* @param dutyCycle Desired dutycycle of current output, limiting top speed
*/
public default void runCurrent(Current current, double dutyCycle)
{}
{
throw new NotImplementedException("This method has not been implemented");
}
Comment on lines -147 to +160

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks replay


/**
* Runs the motor using duty cycle (percentage of available voltage).
*
* @param dutyCycle Fractional output between 0 and 1.
*/
public default void runDutyCycle(double dutyCycle)
{}
{
throw new NotImplementedException("This method has not been implemented");
}
Comment on lines -155 to +170

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks replay


/**
* Runs the motor to a specific position.
Expand All @@ -166,7 +181,20 @@ public default void runDutyCycle(double dutyCycle)
public default void runPosition(Angle position, AngularVelocity cruiseVelocity,
AngularAcceleration acceleration,
Velocity<AngularAccelerationUnit> maxJerk, PIDSlot slot)
{}
{
throw new NotImplementedException("This method has not been implemented");
}

/**
* Runs the motor to a specific position.
*
* @param position Target position.
* @param slot PID slot index.
*/
public default void runPosition(Angle position, PIDSlot slot)
{
throw new NotImplementedException("This method has not been implemented");
}
Comment on lines -169 to +197

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks replay


/**
* Runs the motor at a target velocity.
Expand All @@ -177,13 +205,37 @@ public default void runPosition(Angle position, AngularVelocity cruiseVelocity,
*/
public default void runVelocity(AngularVelocity velocity, AngularAcceleration acceleration,
PIDSlot slot)
{}
{
throw new NotImplementedException("This method has not been implemented");
}

/**
* Runs the motor at a target velocity.
*
* @param velocity Desired velocity.
* @param slot PID slot index.
*/
public default void runVelocity(AngularVelocity velocity, PIDSlot slot)
{
throw new NotImplementedException("This method has not been implemented");
}
Comment on lines -180 to +221

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks replay


/**
* Sets the position of the motor's internal encoder
*
* @param position Desired position to set encoder to
*/
public default void setEncoderPosition(Angle position)
{}
{
throw new NotImplementedException("This method has not been implemented");
}
Comment on lines -188 to +231

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks replay


/**
* Closes and cleans up motor controller resources. Called when the motor is no longer needed to
* properly release hardware.
*/
public default void close()
{
// Default implementation does nothing for interfaces that don't need cleanup
}
Comment on lines +237 to +240

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the interface extend AutoClosable

}
Loading