Skip to content

Commit 87c7970

Browse files
authored
Merge pull request #28 from DeepBlueRobotics/2023-update
Update libraries and code for the 2023 release of WPILib
2 parents ce2f605 + 02deaf3 commit 87c7970

19 files changed

Lines changed: 379 additions & 401 deletions

.wpilib/wpilib_preferences.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"enableCppIntellisense": false,
33
"currentLanguage": "java",
4-
"projectYear": "2022",
4+
"projectYear": "2023",
55
"teamNumber": 199
66
}

build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import edu.wpi.first.gradlerio.deploy.roborio.RoboRIO
2-
31
plugins {
42
id "java"
5-
id "edu.wpi.first.GradleRIO" version "2022.4.1"
3+
id "edu.wpi.first.GradleRIO" version "2023.1.1"
64
id "maven-publish"
75
}
86

@@ -94,7 +92,7 @@ publishing {
9492
gpr(MavenPublication) {
9593
groupId = 'org.carlmontrobotics'
9694
artifactId = 'lib199'
97-
version = '1.0.2'
95+
version = '2.0.0'
9896

9997
from components.java
10098
}
@@ -105,3 +103,8 @@ publishing {
105103
deployArtifact.jarTask = jar
106104
wpi.java.configureExecutableTasks(jar)
107105
wpi.java.configureTestTasks(test)
106+
107+
// Configure string concat to always inline compile
108+
tasks.withType(JavaCompile) {
109+
options.compilerArgs.add '-XDstringConcat=inline'
110+
}

gradle/wrapper/gradle-wrapper.jar

1.19 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=permwrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=permwrapper/dists

gradlew

Lines changed: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pluginManagement {
44
repositories {
55
mavenLocal()
66
gradlePluginPortal()
7-
String frcYear = '2022'
7+
String frcYear = '2023'
88
File frcHome
99
if (OperatingSystem.current().isWindows()) {
1010
String publicFolder = System.getenv('PUBLIC')

src/main/java/org/carlmontrobotics/lib199/OmniDrive.java

Lines changed: 0 additions & 225 deletions
This file was deleted.

src/main/java/org/carlmontrobotics/lib199/path/DifferentialDriveInterface.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ public interface DifferentialDriveInterface extends DrivetrainInterface {
6060
*/
6161
public void setOdometry(DifferentialDriveOdometry odometry);
6262

63+
/**
64+
* @return The left encoder position in meters
65+
*/
66+
public double getLeftEncoderPosition();
67+
68+
/**
69+
* @return The right encoder position in meters
70+
*/
71+
public double getRightEncoderPosition();
72+
6373
/**
6474
* Creates Ramsete Controller
6575
*
@@ -105,14 +115,13 @@ public default Command createAutoCommand(Trajectory trajectory, Supplier<Rotatio
105115
}
106116

107117
/**
108-
* Sets odometry based on current gyro angle and pose
118+
* Sets odometry to the specified pose
109119
*
110-
* @param gyroAngle The angle reported by the gyroscope.
111120
* @param initialPose The starting position of the robot on the field.
112121
*/
113122
@Override
114-
public default void setOdometry(Rotation2d gyroAngle, Pose2d initialPose) {
115-
setOdometry(new DifferentialDriveOdometry(gyroAngle, initialPose));
123+
public default void setOdometry(Pose2d initialPose) {
124+
setOdometry(new DifferentialDriveOdometry(Rotation2d.fromDegrees(getHeadingDeg()), getLeftEncoderPosition(), getRightEncoderPosition(), initialPose));
116125
}
117126

118127
}

0 commit comments

Comments
 (0)