Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
carokhan committed Oct 11, 2024
1 parent 6509277 commit 547f9ab
Show file tree
Hide file tree
Showing 47 changed files with 1,507 additions and 1,496 deletions.
84 changes: 44 additions & 40 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ wpi.sim.addDriverstation()
// in order to make them all available at runtime. Also adding the manifest so WPILib
// knows where to look for our Robot Class.
jar {
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
from sourceSets.main.allSource
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
duplicatesStrategy = DuplicatesStrategy.INCLUDE
Expand All @@ -123,53 +127,53 @@ tasks.withType(JavaCompile) {

project.compileJava.dependsOn(createVersionFile)
gversion {
srcDir = "src/main/java/"
classPackage = "frc.robot"
className = "BuildConstants"
dateFormat = "yyyy-MM-dd HH:mm:ss z"
timeZone = "America/New_York" // Use preferred time zone
indent = " "
srcDir = "src/main/java/"
classPackage = "frc.robot"
className = "BuildConstants"
dateFormat = "yyyy-MM-dd HH:mm:ss z"
timeZone = "America/New_York" // Use preferred time zone
indent = " "
}

spotless {
java {
target fileTree('.') {
java {
target fileTree('.') {
include '**/*.java'
exclude '**/build/**', '**/build-*/**'
}
toggleOffOn()
googleJavaFormat()
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
groovyGradle {
target fileTree('.') {
}
toggleOffOn()
googleJavaFormat()
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
groovyGradle {
target fileTree('.') {
include '**/*.gradle'
exclude '**/build/**', '**/build-*/**'
}
greclipse()
indentWithSpaces(4)
trimTrailingWhitespace()
endWithNewline()
}
format 'xml', {
target fileTree('.') {
}
greclipse()
indentWithSpaces(4)
trimTrailingWhitespace()
endWithNewline()
}
format 'xml', {
target fileTree('.') {
include '**/*.xml'
exclude '**/build/**', '**/build-*/**'
}
eclipseWtp('xml')
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
format 'misc', {
target fileTree('.') {
}
eclipseWtp('xml')
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
format 'misc', {
target fileTree('.') {
include '**/*.md', '**/.gitignore'
exclude '**/build/**', '**/build-*/**'
}
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
}
}
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
}
6 changes: 2 additions & 4 deletions src/main/java/frc/robot/BuildConstants.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package frc.robot;

/**
* Automatically generated file containing build version information.
*/
/** Automatically generated file containing build version information. */
public final class BuildConstants {
public static final String MAVEN_GROUP = "";
public static final String MAVEN_NAME = "Forte-2-5";
Expand All @@ -15,5 +13,5 @@ public final class BuildConstants {
public static final long BUILD_UNIX_TIME = 1728614968375L;
public static final int DIRTY = 1;

private BuildConstants(){}
private BuildConstants() {}
}
41 changes: 19 additions & 22 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public static enum Mode {
}

public static final boolean isTuning = false;


public static class RobotMap {
public static class Drive {
Expand All @@ -56,8 +55,8 @@ public static class Drive {

public static final boolean frontLeftDriveInvert = true;
public static final boolean frontRightDriveInvert = false;
public static final boolean backLeftDriveInvert = false; //true?
public static final boolean backRightDriveInvert = true; //false?
public static final boolean backLeftDriveInvert = false; // true?
public static final boolean backRightDriveInvert = true; // false?

public static final boolean frontLeftTurnInvert = false;
public static final boolean frontRightTurnInvert = false;
Expand All @@ -74,8 +73,6 @@ public static class Drive {
public static final double backLeftOffset = 1.8345500230789185;
public static final double backRightOffset = 2.437732458114624;



public static final int gyro = 10;
}

Expand All @@ -97,7 +94,6 @@ public static class Shooter {
public static class Climb {
public static final int climber = 31;
}

}

public static class ControlConstants {
Expand Down Expand Up @@ -127,7 +123,7 @@ public static class DriveConstants {
public static final double updateFrequency = 100;

// public static final double maxLinearVelocity = Units.feetToMeters(20.4);
public static final double maxLinearVelocity = Units.feetToMeters(1.4);
public static final double maxLinearVelocity = Units.feetToMeters(1.4);
public static final double maxLinearAccel = 8.0;

public static final double maxAngularVelocity = 10;
Expand Down Expand Up @@ -156,7 +152,7 @@ public static class DriveConstants {
public static double kSDriveReplay = 0.0;
public static double kVDriveReplay = 0.0;
public static double kADriveReplay = 0.0;

public static double kPTurnReplay = 0.0;
public static double kDTurnReplay = 0.0;
}
Expand Down Expand Up @@ -193,28 +189,28 @@ public static class ClimbConstants {
public static double kGSim = 0.0;
public static double kVSim = 0.0;
public static double kASim = 0.0;
}
}

public static class IntakeConstants {
public static final double pivotRatio = 25.0 * 48.0 / 44.0 * 48.0 / 24.0;
public static final double pivotMOI = 0.0022842632;
public static final double pivotLength = Units.inchesToMeters(9.41628595);

public static final double pivotOffset = 1.1;
public static final boolean pivotInvert = true;

public static final double maxPivotVelocity = 10.6081112;
public static final double maxPivotAccel = 5;
public static final double maxPivotAccel = 5;

public static final double pivotAbsConversion = Math.PI * 2.0/((48.0/44.0)*(48.0/24.0));
public static final double pivotAbsConversion = Math.PI * 2.0 / ((48.0 / 44.0) * (48.0 / 24.0));
public static final double pivotEncConversion = 2.0 * Math.PI / pivotRatio;

public static final double rollerMOI = 0.011328;

public static final double up = .25;
public static final double down = 2.1;
public static final double simOffset = 1.27838411;

public static final int pivotCurrentLimit = 30;
public static final int rollerCurrentLimit = 70;

Expand All @@ -224,7 +220,7 @@ public static class IntakeConstants {

public static final double kVRoller = 0.0029;
public static final double kARoller = 0;

public static double kPPivotReal = .7;

public static double kPRollerReal = 0.0000;
Expand All @@ -238,7 +234,7 @@ public static class IntakeConstants {
public static double kPPivotReplay = 0.3;

public static double kPRollerReplay = 10;
public static double kSRollerReplay = 0.0;
public static double kSRollerReplay = 0.0;
}

public static class FeederConstants {
Expand All @@ -265,7 +261,7 @@ public static class ShooterConstants {
// public static final double pivotMOI = .0001;

public static final double maxPivotVelocity = 20;
public static final double maxPivotAccel = 5;
public static final double maxPivotAccel = 5;

public static final double pivotAbsConversion = Math.PI * 2.0;
public static final double pivotEncConversion = 2.0 * Math.PI / pivotRatio;
Expand All @@ -275,16 +271,16 @@ public static class ShooterConstants {
public static final double stallTimeout = 0.0;

public static final double down = 0.01;
public static final double up = down + Math.PI/4;
public static final double up = down + Math.PI / 4;

public static final double shooterMOI = 0.00920287973;

public static final int pivotCurrentLimit = 25;

public static final double kGPivot = 0.381640625;
public static final double kVPivot = 0.875;
public static final double kAPivot = 0.00;

public static final double kVShooter = 0.0055; // COMP: 0.0055, DEMO: 0.0041875
public static final double kAShooter = 0.00;

Expand All @@ -293,15 +289,16 @@ public static class ShooterConstants {
public static final double kSShooterReal = 0;

public static final double kPPivot = 5.0;

public static final double kPShooterSim = 0.5;
public static final double kIShooterSim = 0.0;
public static final double kSShooterSim = 0.5;

public static final double kPShooterReplay = 0.0;
public static final double kIShooterReplay = 0.0;
public static final double kSShooterReplay = 0.0;
}

public static class SimConstants {
public static final double loopTime = 0.02;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ public void simulationInit() {}
/** This function is called periodically whilst in simulation. */
@Override
public void simulationPeriodic() {}
}
}
Loading

0 comments on commit 547f9ab

Please sign in to comment.