Skip to content

Commit d7ae1b9

Browse files
authored
Merge pull request #19 from REVrobotics/2025
Update for 2025
2 parents 1dd11eb + 54dc94f commit d7ae1b9

17 files changed

+145
-113
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "interactive"
3+
}

LabVIEW/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/*.lvlps
2+
/*.aliases

LabVIEW/2m Distance Sensor/2m Distance Sensor.aliases

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

LabVIEW/2m Distance Sensor/2m Distance Sensor.lvlps

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

LabVIEW/2m Distance Sensor/2m Distance Sensor.lvproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</Property>
4242
<Property Name="NIPKG_installerBuiltBefore" Type="Bool">true</Property>
4343
<Property Name="NIPKG_installerDestination" Type="Path">/C/Users/Public/Documents/REV2m-LabVIEW/builds/Installer</Property>
44-
<Property Name="NIPKG_lastBuiltPackage" Type="Str">2m-distance-sensor_2024.0.4-0_windows_all.nipkg</Property>
44+
<Property Name="NIPKG_lastBuiltPackage" Type="Str">2m-distance-sensor_2025.0.0-0_windows_all.nipkg</Property>
4545
<Property Name="NIPKG_license" Type="Ref"></Property>
4646
<Property Name="NIPKG_packageVersion" Type="Bool">false</Property>
4747
<Property Name="NIPKG_releaseNotes" Type="Str"></Property>
@@ -56,7 +56,7 @@
5656
<Property Name="PKG_dependencies[0].Enhanced" Type="Bool">false</Property>
5757
<Property Name="PKG_dependencies[0].MaxVersion" Type="Str"></Property>
5858
<Property Name="PKG_dependencies[0].MaxVersionInclusive" Type="Bool">false</Property>
59-
<Property Name="PKG_dependencies[0].MinVersion" Type="Str">23.3.0.49272-0+f120</Property>
59+
<Property Name="PKG_dependencies[0].MinVersion" Type="Str">23.3.5.49154-0+f2</Property>
6060
<Property Name="PKG_dependencies[0].MinVersionType" Type="Str">Inclusive</Property>
6161
<Property Name="PKG_dependencies[0].NIPKG.DisplayName" Type="Str">LabVIEW Runtime (32-bit)</Property>
6262
<Property Name="PKG_dependencies[0].Package.Name" Type="Str">ni-labview-2023-runtime-engine-x86</Property>
@@ -107,7 +107,7 @@
107107
<Property Name="PKG_sources[0].ID" Type="Ref">/My Computer/Build Specifications/WPILib Third-Party</Property>
108108
<Property Name="PKG_sources[0].Type" Type="Str">Build</Property>
109109
<Property Name="PKG_synopsis" Type="Str">REV 2m Distance Sensor LabVIEW API</Property>
110-
<Property Name="PKG_version" Type="Str">2024.0.4</Property>
110+
<Property Name="PKG_version" Type="Str">2025.0.0</Property>
111111
</Item>
112112
<Item Name="WPILib Third-Party" Type="Source Distribution">
113113
<Property Name="Bld_buildCacheID" Type="Str">{7C52C9E8-1805-4972-9778-4F7F5AEE00E3}</Property>
@@ -126,8 +126,7 @@
126126
<Property Name="Bld_localDestDir" Type="Path">/C/Users/Public/Documents/REV2m-LabVIEW/WPILib/ThirdParty</Property>
127127
<Property Name="Bld_previewCacheID" Type="Str">{BD7521DF-B566-4760-9656-AE8025F6DCEB}</Property>
128128
<Property Name="Bld_removeVIObj" Type="Int">1</Property>
129-
<Property Name="Bld_version.major" Type="Int">2024</Property>
130-
<Property Name="Bld_version.patch" Type="Int">4</Property>
129+
<Property Name="Bld_version.major" Type="Int">2025</Property>
131130
<Property Name="Destination[0].destName" Type="Str">Destination Directory</Property>
132131
<Property Name="Destination[0].path" Type="Path">/C/Users/Public/Documents/REV2m-LabVIEW/WPILib/ThirdParty</Property>
133132
<Property Name="Destination[0].path.type" Type="Str">&lt;none&gt;</Property>
@@ -151,7 +150,7 @@
151150
<Property Name="Destination[6].path" Type="Path">/C/Users/Public/Documents/REV2m-LabVIEW/WPILib/ThirdParty/REV Robotics/NI_AB_PROJECTNAME</Property>
152151
<Property Name="Destination[6].path.type" Type="Str">&lt;none&gt;</Property>
153152
<Property Name="DestinationCount" Type="Int">7</Property>
154-
<Property Name="Source[0].itemID" Type="Str">{D5C36313-3364-4D5F-9F59-1895B940C622}</Property>
153+
<Property Name="Source[0].itemID" Type="Str">{DC5DF021-9B2F-4FF5-8781-0A6280263A68}</Property>
155154
<Property Name="Source[0].type" Type="Str">Container</Property>
156155
<Property Name="Source[1].Container.applyDestination" Type="Bool">true</Property>
157156
<Property Name="Source[1].Container.applyInclusion" Type="Bool">true</Property>

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ roboRIO library for the [REV Robotics 2M Distance Sensor](http://www.revrobotics
55
Download the latest `REV-2m-Distance-Sensor-roboRIO-SDK-[version].zip` from the [release](https://github.com/REVrobotics/2m-Distance-Sensor/releases) tab and unzip it.
66

77
Inside `REV-2m-Distance-Sensor-roboRIO-SDK-[version]` there will be vendordeps and maven folders. Copy the file `REV2mDistanceSensor.json` under vendordeps to the frc vendordeps folder on your machine. It is typically located in the following places:
8-
* Windows: C:\Users\Public\wpilib\2024\vendordeps
9-
* Mac/Linux: ~/wpilib/2024/vendordeps
8+
* Windows: C:\Users\Public\wpilib\2025\vendordeps
9+
* Mac/Linux: ~/wpilib/2025/vendordeps
1010

1111
Next, merge the maven folder with the frc maven folder on your machine, typically located at:
12-
* Windows: C:\Users\Public\wpilib\2024\maven
13-
* Mac/Linux: ~/wpilib/2024/maven
12+
* Windows: C:\Users\Public\wpilib\2025\maven
13+
* Mac/Linux: ~/wpilib/2025/maven
1414

1515
In order to use these libraries in your robot code, open a project in VsCode.
1616
* Press `Ctrl-Shift-P` to open the WPI commands window.

Source/build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
22
id 'cpp'
33
id 'java'
4-
id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2020.2'
5-
id 'edu.wpi.first.NativeUtils' version '2024.6.1'
4+
id 'edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin' version '2025.0'
5+
id 'edu.wpi.first.NativeUtils' version '2025.9.0'
66
id 'edu.wpi.first.GradleJni' version '1.1.0'
77
id 'edu.wpi.first.GradleVsCode' version '2.1.0'
88
id 'google-test-test-suite'
@@ -83,11 +83,15 @@ model {
8383
}
8484

8585
javadoc {
86-
options.addBooleanOption('-no-module-directories', true)
86+
options {
87+
// Just configuring links to WPILib docs also sets up links to the appropriate version of
88+
// the JDK docs. Things broke when Harper tried to directly configure both.
89+
addStringOption("link", "https://github.wpilib.org/allwpilib/docs/release/java/")
90+
}
8791
}
8892

8993
apply from: 'publish.gradle'
9094

9195
wrapper {
92-
gradleVersion = '7.5.1'
96+
gradleVersion = '8.11'
9397
}

Source/build_and_publish_locally.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#! /bin/bash
2+
set -e
3+
4+
LIB=DistanceSensor
5+
BUILD_YEAR=2025
6+
VENDOR_GENERATED_DIR=./vendordeps/*
7+
BUILD_REPO_DIR=./build/repos
8+
RELEASE_DIR=$BUILD_REPO_DIR/releases/com/revrobotics/frc
9+
MOVE_DIR=C:/Users/Public/wpilib/$BUILD_YEAR/maven/com/revrobotics/frc
10+
VENDOR_DIR=C:/Users/Public/wpilib/$BUILD_YEAR/vendordeps
11+
12+
echo "*** Building ***"
13+
./gradlew build -PreleaseMode
14+
15+
echo "*** Generating maven directories ***"
16+
./gradlew publish -PreleaseMode
17+
18+
echo "*** Ensuring destination maven directories exist ***"
19+
mkdir -p $MOVE_DIR
20+
21+
echo "*** Moving maven directories ***"
22+
cp -r $RELEASE_DIR/$LIB-cpp $MOVE_DIR
23+
cp -r $RELEASE_DIR/$LIB-driver $MOVE_DIR
24+
cp -r $RELEASE_DIR/$LIB-java $MOVE_DIR
25+
26+
echo "*** Moving vendor deps ***"
27+
cp -r $VENDOR_GENERATED_DIR $VENDOR_DIR

Source/config.gradle

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ nativeUtils.withCrossRoboRIO()
66
nativeUtils {
77
wpi {
88
configureDependencies {
9-
wpiVersion = "2024.+"
10-
opencvYear = "frc2024"
11-
googleTestYear = "frc2024"
12-
niLibVersion = "2024.2.1"
13-
opencvVersion = "4.8.0-2"
14-
googleTestVersion = "1.14.0-1"
9+
wpiVersion = "2025.+"
10+
opencvYear = "frc2025"
11+
niLibVersion = "2025.0.0"
12+
opencvVersion = "4.10.0-2"
13+
wpimathVersion = "2024.+"
14+
googleTestYear = "frc2024"
15+
googleTestVersion = "1.14.0-1"
1516
}
1617
}
1718
}
@@ -92,7 +93,7 @@ ext.createComponentZipTasks = { components, names, base, type, project, func ->
9293
def task = project.tasks.create(base + "-${key}", type) {
9394
description = 'Creates component archive for platform ' + key
9495
destinationDirectory = outputsFolder
95-
classifier = key
96+
archiveClassifier = key
9697
archiveBaseName = '_M_' + base
9798
duplicatesStrategy = 'exclude'
9899

@@ -119,9 +120,9 @@ ext.createAllCombined = { list, name, base, type, project ->
119120

120121
def task = project.tasks.create(base + "-all", type) {
121122
description = "Creates component archive for all classifiers"
122-
destinationDir = outputsFolder
123-
classifier = "all"
124-
baseName = base
123+
destinationDirectory = outputsFolder
124+
archiveClassifier = "all"
125+
archiveBaseName = base
125126
duplicatesStrategy = 'exclude'
126127

127128
list.each {

Source/dependencies.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
dependencies {
2-
implementation 'edu.wpi.first.cscore:cscore-java:2024.+'
3-
implementation 'edu.wpi.first.cameraserver:cameraserver-java:2024.+'
4-
implementation 'edu.wpi.first.ntcore:ntcore-java:2024.+'
5-
implementation 'edu.wpi.first.wpilibj:wpilibj-java:2024.+'
6-
implementation 'edu.wpi.first.wpiutil:wpiutil-java:2024.+'
7-
implementation 'edu.wpi.first.wpimath:wpimath-java:2024.+'
8-
implementation 'edu.wpi.first.wpiunits:wpiunits-java:2024.+'
9-
implementation 'edu.wpi.first.hal:hal-java:2024.+'
2+
implementation 'edu.wpi.first.cscore:cscore-java:2025.+'
3+
implementation 'edu.wpi.first.cameraserver:cameraserver-java:2025.+'
4+
implementation 'edu.wpi.first.ntcore:ntcore-java:2025.+'
5+
implementation 'edu.wpi.first.wpilibj:wpilibj-java:2025.+'
6+
implementation 'edu.wpi.first.wpiutil:wpiutil-java:2025.+'
7+
implementation 'edu.wpi.first.wpimath:wpimath-java:2025.+'
8+
implementation 'edu.wpi.first.wpiunits:wpiunits-java:2025.+'
9+
implementation 'edu.wpi.first.hal:hal-java:2025.+'
1010
implementation "org.ejml:ejml-simple:0.43.1"
1111
implementation "com.fasterxml.jackson.core:jackson-annotations:2.12.4"
1212
implementation "com.fasterxml.jackson.core:jackson-core:2.12.4"
1313
implementation "com.fasterxml.jackson.core:jackson-databind:2.12.4"
14-
implementation 'edu.wpi.first.thirdparty.frc2024.opencv:opencv-java:4.8.0-2'
14+
implementation 'edu.wpi.first.thirdparty.frc2025.opencv:opencv-java:4.10.0-2'
1515
testImplementation(platform('org.junit:junit-bom:5.7.0'))
1616
testImplementation('org.junit.jupiter:junit-jupiter')
1717
}
-16.8 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

Source/gradlew

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +82,12 @@ do
8082
esac
8183
done
8284

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
85+
# This is normally unused
86+
# shellcheck disable=SC2034
8687
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
88+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
9091

9192
# Use the maximum available, or set MAX_FD != -1 to use that value.
9293
MAX_FD=maximum
@@ -133,22 +134,29 @@ location of your Java installation."
133134
fi
134135
else
135136
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137+
if ! command -v java >/dev/null 2>&1
138+
then
139+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137140
138141
Please set the JAVA_HOME variable in your environment to match the
139142
location of your Java installation."
143+
fi
140144
fi
141145

142146
# Increase the maximum file descriptors if we can.
143147
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144148
case $MAX_FD in #(
145149
max*)
150+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
151+
# shellcheck disable=SC2039,SC3045
146152
MAX_FD=$( ulimit -H -n ) ||
147153
warn "Could not query maximum file descriptor limit"
148154
esac
149155
case $MAX_FD in #(
150156
'' | soft) :;; #(
151157
*)
158+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
159+
# shellcheck disable=SC2039,SC3045
152160
ulimit -n "$MAX_FD" ||
153161
warn "Could not set maximum file descriptor limit to $MAX_FD"
154162
esac
@@ -193,11 +201,15 @@ if "$cygwin" || "$msys" ; then
193201
done
194202
fi
195203

196-
# Collect all arguments for the java command;
197-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198-
# shell script including quotes and variable substitutions, so put them in
199-
# double quotes to make sure that they get re-expanded; and
200-
# * put everything else in single quotes, so that it's not re-expanded.
204+
205+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
206+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
207+
208+
# Collect all arguments for the java command:
209+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210+
# and any embedded shellness will be escaped.
211+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212+
# treated as '${Hostname}' itself on the command line.
201213

202214
set -- \
203215
"-Dorg.gradle.appname=$APP_BASE_NAME" \

Source/gradlew.bat

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################
@@ -26,6 +28,7 @@ if "%OS%"=="Windows_NT" setlocal
2628

2729
set DIRNAME=%~dp0
2830
if "%DIRNAME%"=="" set DIRNAME=.
31+
@rem This is normally unused
2932
set APP_BASE_NAME=%~n0
3033
set APP_HOME=%DIRNAME%
3134

@@ -42,11 +45,11 @@ set JAVA_EXE=java.exe
4245
%JAVA_EXE% -version >NUL 2>&1
4346
if %ERRORLEVEL% equ 0 goto execute
4447

45-
echo.
46-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47-
echo.
48-
echo Please set the JAVA_HOME variable in your environment to match the
49-
echo location of your Java installation.
48+
echo. 1>&2
49+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50+
echo. 1>&2
51+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52+
echo location of your Java installation. 1>&2
5053

5154
goto fail
5255

@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5659

5760
if exist "%JAVA_EXE%" goto execute
5861

59-
echo.
60-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61-
echo.
62-
echo Please set the JAVA_HOME variable in your environment to match the
63-
echo location of your Java installation.
62+
echo. 1>&2
63+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64+
echo. 1>&2
65+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66+
echo location of your Java installation. 1>&2
6467

6568
goto fail
6669

0 commit comments

Comments
 (0)