Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large changes #1

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Large changes #1

wants to merge 14 commits into from

Conversation

nootsquared
Copy link
Contributor

Split Vision and Drive
Modified all vars along the subsystem files
Imported a lot of utils
Much more..

@@ -24,18 +24,18 @@ public class ElevatorIOTalonFX implements ElevatorIO {

public ElevatorIOTalonFX(int lead, int follow) {

Choose a reason for hiding this comment

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

These should probably be labeled as leadCANID or leadID so it's clear that we're passing an id, not an object

@@ -24,18 +24,18 @@ public class ElevatorIOTalonFX implements ElevatorIO {

public ElevatorIOTalonFX(int lead, int follow) {
TalonFXConfiguration config = new TalonFXConfiguration();
config.CurrentLimits.StatorCurrentLimit = Constants.ElevatorConstants.CURRENT_LIMIT;
config.CurrentLimits.StatorCurrentLimit = physicalConstants.ElevatorConstants.CURRENT_LIMIT;

Choose a reason for hiding this comment

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

edit this to say stator current limit

@@ -58,16 +58,16 @@ public class RobotContainer {

/** The container for the robot. Contains subsystems, OI devices, and commands. */
public RobotContainer() {
switch (Constants.currentMode) {
switch (physicalConstants.currentMode) {
case REAL:
// Real robot, instantiate hardware IO implementations
drive =
new Drive(
new GyroIOPigeon2(false),

Choose a reason for hiding this comment

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

this boolean appears to not be used.

Comment on lines 71 to 73
flywheel = new Flywheel(new FlywheelIOSparkMax());
// drive = new Drive(
// new GyroIOPigeon2(true),

Choose a reason for hiding this comment

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

lets assume we're using phoenix for pretty much everything

new ModuleIOTalonFX(0),
new ModuleIOTalonFX(1),
new ModuleIOTalonFX(2),
new ModuleIOTalonFX(3));
flywheel = new Flywheel(new FlywheelIOSparkMax());
// drive = new Drive(

Choose a reason for hiding this comment

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

This commented code should probably be removed

new ModuleIOTalonFX(0),
new ModuleIOTalonFX(1),
new ModuleIOTalonFX(2),
new ModuleIOTalonFX(3));
flywheel = new Flywheel(new FlywheelIOSparkMax());

Choose a reason for hiding this comment

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

you might want to add an example instantiation of each subsystem type here.

public static final String CANBUS = "CAN Bus 2";
public static final double LOOP_PERIOD_SECS = 0.02;

public static final String LL_ALIGN = "limelight-align";

Choose a reason for hiding this comment

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

In our project template planning document we discussed addresses like this and the name of the canbus going in robot map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants