Skip to content

Commit

Permalink
chore: set all indents to 4 spaces and removed all file headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mimizh2418 committed Jan 9, 2024
1 parent 5e27186 commit 6244a33
Show file tree
Hide file tree
Showing 16 changed files with 855 additions and 949 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ gversion {
classPackage = "org.team1540.robot2024"
className = "BuildConstants"
dateFormat = "yyyy-MM-dd HH:mm:ss z"
timeZone = "America/New_York"
indent = " "
timeZone = "America/Los_Angeles"
indent = " "
}

71 changes: 32 additions & 39 deletions src/main/java/org/team1540/robot2024/Constants.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
// Copyright 2021-2023 FRC 6328
// http://github.com/Mechanical-Advantage
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// version 3 as published by the Free Software Foundation or
// available in the root directory of this project.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

package org.team1540.robot2024;

import edu.wpi.first.math.util.Units;
Expand All @@ -24,30 +11,36 @@
* constants are needed, to reduce verbosity.
*/
public final class Constants {
public static final Mode currentMode = Mode.SIM;

public static enum Mode {
/** Running on a real robot. */
REAL,

/** Running a physics simulator. */
SIM,

/** Replaying from a log file. */
REPLAY
}

public static class Drivetrain {
public static final String CAN_BUS = "";
public static final double DRIVE_GEAR_RATIO = (50.0 / 14.0) * (17.0 / 27.0) * (45.0 / 15.0);
public static final double TURN_GEAR_RATIO = 150.0 / 7.0;
public static final boolean IS_TURN_MOTOR_INVERTED = true;
public static final double WHEEL_RADIUS = Units.inchesToMeters(2.0);

public static final double MAX_LINEAR_SPEED = Units.feetToMeters(14.5);
public static final double TRACK_WIDTH_X = Units.inchesToMeters(25.0);
public static final double TRACK_WIDTH_Y = Units.inchesToMeters(25.0);
public static final double DRIVE_BASE_RADIUS = Math.hypot(TRACK_WIDTH_X / 2.0, TRACK_WIDTH_Y / 2.0);
public static final double MAX_ANGULAR_SPEED = MAX_LINEAR_SPEED / DRIVE_BASE_RADIUS;
}
public static final Mode currentMode = Mode.SIM;

public static enum Mode {
/**
* Running on a real robot.
*/
REAL,

/**
* Running a physics simulator.
*/
SIM,

/**
* Replaying from a log file.
*/
REPLAY
}

public static class Drivetrain {
public static final String CAN_BUS = "";
public static final double DRIVE_GEAR_RATIO = (50.0 / 14.0) * (17.0 / 27.0) * (45.0 / 15.0);
public static final double TURN_GEAR_RATIO = 150.0 / 7.0;
public static final boolean IS_TURN_MOTOR_INVERTED = true;
public static final double WHEEL_RADIUS = Units.inchesToMeters(2.0);

public static final double MAX_LINEAR_SPEED = Units.feetToMeters(14.5);
public static final double TRACK_WIDTH_X = Units.inchesToMeters(25.0);
public static final double TRACK_WIDTH_Y = Units.inchesToMeters(25.0);
public static final double DRIVE_BASE_RADIUS = Math.hypot(TRACK_WIDTH_X / 2.0, TRACK_WIDTH_Y / 2.0);
public static final double MAX_ANGULAR_SPEED = MAX_LINEAR_SPEED / DRIVE_BASE_RADIUS;
}
}
31 changes: 9 additions & 22 deletions src/main/java/org/team1540/robot2024/Main.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
// Copyright 2021-2023 FRC 6328
// http://github.com/Mechanical-Advantage
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// version 3 as published by the Free Software Foundation or
// available in the root directory of this project.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

package org.team1540.robot2024;

import edu.wpi.first.wpilibj.RobotBase;
Expand All @@ -21,14 +8,14 @@
* call.
*/
public final class Main {
private Main() {}
private Main() {}

/**
* Main initialization function. Do not perform any initialization here.
*
* <p>If you change your main robot class, change the parameter type.
*/
public static void main(String... args) {
RobotBase.startRobot(Robot::new);
}
/**
* Main initialization function. Do not perform any initialization here.
*
* <p>If you change your main robot class, change the parameter type.
*/
public static void main(String... args) {
RobotBase.startRobot(Robot::new);
}
}
Loading

0 comments on commit 6244a33

Please sign in to comment.