Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 .wpilib/wpilib_preferences.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2022",
"projectYear": "2023",
"teamNumber": 1014
}
18 changes: 15 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2022.4.1"
id "edu.wpi.first.GradleRIO" version "2023.1.1"
}

sourceCompatibility = JavaVersion.VERSION_11
Expand Down Expand Up @@ -46,7 +46,7 @@ wpi.java.debugJni = false
def includeDesktopSupport = true

// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
// Also defines JUnit 4.
// Also defines JUnit 5.
dependencies {
implementation wpi.java.deps.wpilib()
implementation wpi.java.vendor.java()
Expand All @@ -65,7 +65,14 @@ dependencies {
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
simulationRelease wpi.sim.enableRelease()

testImplementation 'junit:junit:4.13.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}

test {
useJUnitPlatform()
systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
}

// Simulation configuration (e.g. environment variables).
Expand All @@ -85,3 +92,8 @@ jar {
deployArtifact.jarTask = jar
wpi.java.configureExecutableTasks(jar)
wpi.java.configureTestTasks(test)

// Configure string concat to always inline compile
tasks.withType(JavaCompile) {
options.compilerArgs.add '-XDstringConcat=inline'
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=permwrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=permwrapper/dists
16 changes: 11 additions & 5 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
String frcYear = '2022'
String frcYear = '2023'
File frcHome
if (OperatingSystem.current().isWindows()) {
String publicFolder = System.getenv('PUBLIC')
Expand Down
92 changes: 92 additions & 0 deletions simgui-ds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"keyboardJoysticks": [
{
"axisConfig": [
{
"decKey": 65,
"incKey": 68
},
{
"decKey": 87,
"incKey": 83
},
{
"decKey": 69,
"decayRate": 0.0,
"incKey": 82,
"keyRate": 0.009999999776482582
}
],
"axisCount": 3,
"buttonCount": 4,
"buttonKeys": [
90,
88,
67,
86
],
"povConfig": [
{
"key0": 328,
"key135": 323,
"key180": 322,
"key225": 321,
"key270": 324,
"key315": 327,
"key45": 329,
"key90": 326
}
],
"povCount": 1
},
{
"axisConfig": [
{
"decKey": 74,
"incKey": 76
},
{
"decKey": 73,
"incKey": 75
}
],
"axisCount": 2,
"buttonCount": 4,
"buttonKeys": [
77,
44,
46,
47
],
"povCount": 0
},
{
"axisConfig": [
{
"decKey": 263,
"incKey": 262
},
{
"decKey": 265,
"incKey": 264
}
],
"axisCount": 2,
"buttonCount": 6,
"buttonKeys": [
260,
268,
266,
261,
269,
267
],
"povCount": 0
},
{
"axisCount": 0,
"buttonCount": 0,
"povCount": 0
}
]
}
7 changes: 7 additions & 0 deletions simgui.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"NTProvider": {
"types": {
"/FMSInfo": "FMSInfo"
}
}
}
64 changes: 63 additions & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,66 @@
* <p>It is advised to statically import this class (or one of its inner classes) wherever the
* constants are needed, to reduce verbosity.
*/
public final class Constants {}
public final class Constants {

public static final class VisionConstants {
// See <https://docs.limelightvision.io/en/latest/getting_started.html#basic-programming>.
public static final int kVisionProcessorCamMode = 0;

public static final int kRedCargoPipelineId = 1;
public static final int kBlueCargoPipelineId = 2;
public static final int kHubPipelineId = 3;
}

public final class ControllerConstants {

public final static int kRightJoystickPort = 0;
public final static int kLeftJoystickPort = 1;

public final static double kMaxThrottle = 1.0;
public final static double kSlowThrottle = 0.5;

public final static int kThrottleButton = 2;

}

public final class DriveConstants {

public final static int kRightPort = 2;
public final static int kLeftPort = 3;

}

public final class LightsConstants {

public final static int kLightPort = 0;

}

public final static class MovementConstants {
public final static String kStationary = "Stationary";
public final static String kPivotingOffOfRight = "Pivoting off of right";
public final static String kPivotingOffOfLeft = "Pivoting off of left";
public final static String kBackward = "Backward";
public final static String kTurningCounterclockwise = "Turning Counterclockwise";
public final static String kTurningClockwise = "Turning Clockwise";
public final static String kForward = "Forward";
public final static String kSpinningInPlace = "Spinning in place";
public final static String kGetDirectionEdgeCase = "getDirection edge case";
}

public final static class BlinkinPatternConstants {
public final static double solidRed = 0.61;
public final static double solidBlue = 0.87;
public final static double solidGreen = 0.77;
public final static double solidOrange = 0.65;
public final static double breatheColor1 = 0.09; //Color1 and 2 have to be physically set. Color1 is green
public final static double breatheColor2 = 0.29; //Color2 is orange
public final static double solidWhite = 0.93;
public final static double breatheRed = -0.17;
public final static double breatheBlue = -0.15;
public final static double confetti = -0.87;

}

}
Loading