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

Integration #12

Merged
merged 26 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
68 changes: 0 additions & 68 deletions .OutlineViewer/outlineviewer.json

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Temporary Items
.apdisk

### VisualStudioCode ###
.vscode/*
.vscode/
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
Expand Down Expand Up @@ -170,6 +170,7 @@ out/

# Simulation GUI and other tools window save file
*-window.json
.OutlineViewer/

# Simulation data log directory
logs/
Expand Down
Binary file removed .gradle 8.30.16 PM/7.5.1/checksums/checksums.lock
Binary file not shown.
Binary file not shown.
Empty file.
Binary file removed .gradle 8.30.16 PM/7.5.1/fileChanges/last-build.bin
Binary file not shown.
Binary file removed .gradle 8.30.16 PM/7.5.1/fileHashes/fileHashes.lock
Binary file not shown.
Empty file.
Binary file not shown.
2 changes: 0 additions & 2 deletions .gradle 8.30.16 PM/buildOutputCleanup/cache.properties

This file was deleted.

Empty file.
20 changes: 0 additions & 20 deletions .vscode/launch.json

This file was deleted.

29 changes: 0 additions & 29 deletions .vscode/settings.json

This file was deleted.

88 changes: 56 additions & 32 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,32 @@
* constants are needed, to reduce verbosity.
*/
public final class Constants {
public static class CameraConstants{
public static final int resolutionX = 176;
public static final int resolutionY = 144;
}
public static class ElevatorConstants {
public static final int EXTENSION_ID = 0;
public static final int EXTENSION_FOLLOW_ID = 0;
public static final int EXTENSION_ID = 10;
public static final int EXTENSION_FOLLOW_ID = 11;

public static final float EXTENSION_LIMIT_METERS = 0;

public static final int ZERO_LIMIT_ID = 0;

public static final int GROUND_POSITION = 0;
public static final int SPEAKER_POSITION = 0;
public static final int AMP_POSITION = 0;
public static final int CHUTE_POSITION = 0;
public static final int TRAP_POSITION = 0;
public static final int START_POSITION = 0;

public static final double POSITIONCONVERSIONFACTOR = 0;
public static final double VELOCITYCONVERSIONFACTOR = 0;
public static final int ZERO_LIMIT_ID = 3;

public static final double GROUND_POSITION = Units.inchesToMeters(0.5);
public static final double SPEAKER_POSITION = 0;
public static final double AMP_POSITION = Units.inchesToMeters(29);
public static final double CHUTE_POSITION = Units.inchesToMeters(1);
public static final double TRAP_POSITION = Units.inchesToMeters(30);
public static final double START_POSITION = 0;

public static final double EXTENSION_P= 3.5;
public static final double EXTENSION_I= 0;
public static final double EXTENSION_D= 0;
public static final double EXTENSION_TOLERANCE= 0.3;

public static final double POSITION_CONVERSION_FACTOR = Units.inchesToMeters(30.)/63.5;
public static final double VELOCITY_CONVERSION_FACTOR = 1;
}
public static class OperatorConstants {
public static final int kDriverControllerPort = 0;
Expand All @@ -43,21 +52,21 @@ public static class TestSingleModuleSwerveConstants {
}

public static class SwerveConstants {
public static final int FL_DRIVE = 0;
public static final int FL_DRIVE = 20;
public static final int FL_STEER = 1;
public static final double FL_OFFSET = 3.34 - Math.PI / 4;
public static final double FL_OFFSET = 3.36 - 1. * Math.PI / 4.;

public static final int FR_DRIVE = 2;
public static final int FR_STEER = 3;
public static final double FR_OFFSET = 2.94 - Math.PI * 3 / 4;
public static final double FR_OFFSET = 3.02 - Math.PI * 3 / 4;

public static final int BL_DRIVE = 4;
public static final int BL_STEER = 5;
public static final double BL_OFFSET = 3.14 + Math.PI / 4;
public static final double BL_OFFSET = 2.83 + Math.PI / 4;

public static final int BR_DRIVE = 6;
public static final int BR_STEER = 7;
public static final double BR_OFFSET = 2.43 + Math.PI * 3.0 / 4.0;
public static final double BR_OFFSET = 2.66 + Math.PI * 3.0 / 4.0;

private static double MODULE_DIST = Units.inchesToMeters(27.25 / 2.0);
public static final Translation2d FL_POS = new Translation2d(-MODULE_DIST, MODULE_DIST);
Expand All @@ -66,34 +75,43 @@ public static class SwerveConstants {
public static final Translation2d BR_POS = new Translation2d(MODULE_DIST, -MODULE_DIST);
}

public static class RollerandPivotConstants {
public static final int lastmotorID = 0;
public static final int topmotorID = 2;
public static final int bottommotorID = 3;
public static final int motor1ID = 1;
public static class IntakeConstants {
public static final int INTEGRATION_MOTOR_ID = 19;
public static final int FRONT_MOTOR_ID = 17;
public static final int BACK_MOTOR_ID = 18;
public static final int PIVOT_MOTOR_ID = 16;

public static final int sensorID = 0;
public static final int extendedlimitswitchID = 1;
public static final int retractedlimitswitchID = 2;
public static final int extendedlimitswitchID = 5;
public static final int retractedlimitswitchID = 6;
//public static final int intakeencoderID = 3;

public static final double rollersclockwise = 1;
public static final double rollerscounterclockwise = -1;
public static final double sensorreached = 1;
public static final double rollerscounterclockwise = 1;
public static final double sensorreached = .3;
public static final double pivotclockwise = 1;
public static final double pivotcounterclockwise = -1;
public static final double pastsensortime = 0.5;
public static final double pastsensortime = 3;
}

public static class ShooterConstants {
public static final int LIMIT_SWITCH_ID = 1;
public static final int PIVOT_MOTOR_ID = 12;

public static final int SHOOTER_MOTOR_ONE_ID = 13;
public static final int SHOOTER_MOTOR_TWO_ID = 14;

public static final int FEEDER_MOTOR_ID = 15;

public static final double FEED_ANGLE = Units.degreesToRadians(70);
}

public static class ClimbConstants {
public static final int LEFT_WINCH_MOTOR_ID = 21;
public static final int LEFT_ZERO_LIMIT_ID = 11;
public static final int LEFT_WINCH_MOTOR_ID = 8;
public static final int LEFT_ZERO_LIMIT_ID = 0;

public static final int RIGHT_WINCH_MOTOR_ID = 22;
public static final int RIGHT_ZERO_LIMIT_ID = 12;
public static final int RIGHT_WINCH_MOTOR_ID = 9;
public static final int RIGHT_ZERO_LIMIT_ID = 1;

public static final double WINCH_REDUCTION = 9.49;
public static final double AXLE_PERIMETER_METERS = 6 * Units.inchesToMeters(.289) ;
Expand All @@ -103,4 +121,10 @@ public static class ClimbConstants {

public static final double MAX_WINCH_POWER = 0.6;
}

public static class LEDConstants {
public static final int LED_LENGTH = 140;
public static final int LED_PWM_PORT = 0;
public static final double BRIGHTNESS_SCALE_FACTOR = .5;
}
}
Loading
Loading