From 3d2130e19e3e536d4a0be3681e0a33b438ee29c6 Mon Sep 17 00:00:00 2001 From: Kevin Frei Date: Mon, 16 Dec 2024 00:06:02 -0800 Subject: [PATCH 1/6] Updated Gradle stuff for Ladybug+ compat --- Path/build.gradle | 2 +- build.dependencies.gradle | 8 ++++---- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Path/build.gradle b/Path/build.gradle index ebd8be81..003c2004 100644 --- a/Path/build.gradle +++ b/Path/build.gradle @@ -32,7 +32,7 @@ dependencies { implementation 'org.apache.commons:commons-math3:3.6.1' - implementation 'com.acmerobotics.dashboard:dashboard:0.4.15' + implementation 'com.acmerobotics.dashboard:dashboard:0.4.16' implementation 'com.acmerobotics.roadrunner:core:0.5.6' diff --git a/build.dependencies.gradle b/build.dependencies.gradle index c5b19d4c..0b739254 100644 --- a/build.dependencies.gradle +++ b/build.dependencies.gradle @@ -6,9 +6,9 @@ repositories { } dependencies { - implementation 'org.firstinspires.ftc:RobotCore:10.1.0' - implementation 'org.firstinspires.ftc:RobotServer:10.1.0' - implementation 'org.firstinspires.ftc:Hardware:10.1.0' - implementation 'org.firstinspires.ftc:FtcCommon:10.1.0' + implementation 'org.firstinspires.ftc:RobotCore:10.1.1' + implementation 'org.firstinspires.ftc:RobotServer:10.1.1' + implementation 'org.firstinspires.ftc:Hardware:10.1.1' + implementation 'org.firstinspires.ftc:FtcCommon:10.1.1' implementation 'androidx.appcompat:appcompat:1.3.1' } diff --git a/build.gradle b/build.gradle index f2d3b11e..f06ec4ce 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:7.2.0' + classpath 'com.android.tools.build:gradle:8.7.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c658c7db..fddfd9a6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Tue Sep 27 22:08:26 PDT 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 48265bca3fdd2705ca98f09e26859a2d55dfc182 Mon Sep 17 00:00:00 2001 From: Kevin Frei Date: Thu, 23 Jan 2025 23:03:33 -0800 Subject: [PATCH 2/6] Switched a few IMU's to IGyro's --- .../path/subsystem/PathingMecanumDrivebaseSubsystem.java | 1 - .../path/subsystem/TankDrivebaseSubsystem.java | 8 ++++---- .../technototes/path/subsystem/TwoDeadWheelLocalizer.java | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Path/src/main/java/com/technototes/path/subsystem/PathingMecanumDrivebaseSubsystem.java b/Path/src/main/java/com/technototes/path/subsystem/PathingMecanumDrivebaseSubsystem.java index 3b37d94d..d35fe4a2 100644 --- a/Path/src/main/java/com/technototes/path/subsystem/PathingMecanumDrivebaseSubsystem.java +++ b/Path/src/main/java/com/technototes/path/subsystem/PathingMecanumDrivebaseSubsystem.java @@ -26,7 +26,6 @@ import com.technototes.library.hardware.HardwareDevice; import com.technototes.library.hardware.motor.EncodedMotor; import com.technototes.library.hardware.sensor.IGyro; -import com.technototes.library.hardware.sensor.IMU; import com.technototes.library.subsystem.Subsystem; import com.technototes.path.subsystem.MecanumConstants.GearRatio; import com.technototes.path.subsystem.MecanumConstants.HeadPID; diff --git a/Path/src/main/java/com/technototes/path/subsystem/TankDrivebaseSubsystem.java b/Path/src/main/java/com/technototes/path/subsystem/TankDrivebaseSubsystem.java index 3c079665..07bee040 100644 --- a/Path/src/main/java/com/technototes/path/subsystem/TankDrivebaseSubsystem.java +++ b/Path/src/main/java/com/technototes/path/subsystem/TankDrivebaseSubsystem.java @@ -23,7 +23,7 @@ import com.qualcomm.robotcore.hardware.VoltageSensor; import com.technototes.library.hardware.HardwareDevice; import com.technototes.library.hardware.motor.EncodedMotor; -import com.technototes.library.hardware.sensor.IMU; +import com.technototes.library.hardware.sensor.IGyro; import com.technototes.library.subsystem.Subsystem; import com.technototes.path.subsystem.TankConstants.*; import com.technototes.path.trajectorysequence.TrajectorySequence; @@ -59,14 +59,14 @@ public class TankDrivebaseSubsystem extends TankDrive implements Subsystem { private TrajectoryFollower follower; private List> motors, leftMotors, rightMotors; - private IMU imu; + private IGyro imu; private VoltageSensor batteryVoltageSensor; public TankDrivebaseSubsystem( List> left, List> right, - IMU i, + IGyro i, TankConstants c, Localizer localizer ) { @@ -300,7 +300,7 @@ public void setMotorPowers(double v, double v1) { @Override public double getRawExternalHeading() { - return imu.getAngularOrientation(AngleUnit.RADIANS).firstAngle; + return imu.getHeading(); } @Override diff --git a/Path/src/main/java/com/technototes/path/subsystem/TwoDeadWheelLocalizer.java b/Path/src/main/java/com/technototes/path/subsystem/TwoDeadWheelLocalizer.java index 5d91cf70..1431d9ba 100644 --- a/Path/src/main/java/com/technototes/path/subsystem/TwoDeadWheelLocalizer.java +++ b/Path/src/main/java/com/technototes/path/subsystem/TwoDeadWheelLocalizer.java @@ -9,9 +9,8 @@ import androidx.annotation.NonNull; import com.acmerobotics.roadrunner.geometry.Pose2d; -import com.acmerobotics.roadrunner.localization.ThreeTrackingWheelLocalizer; import com.acmerobotics.roadrunner.localization.TwoTrackingWheelLocalizer; -import com.technototes.library.hardware.sensor.IMU; +import com.technototes.library.hardware.sensor.IGyro; import com.technototes.library.hardware.sensor.encoder.MotorEncoder; import com.technototes.library.subsystem.Subsystem; import java.util.Arrays; @@ -40,7 +39,7 @@ public class TwoDeadWheelLocalizer extends TwoTrackingWheelLocalizer implements protected boolean encoderOverflow; - public TwoDeadWheelLocalizer(IMU imu, MotorEncoder lr, MotorEncoder fb, DeadWheelConstants constants) { + public TwoDeadWheelLocalizer(IGyro imu, MotorEncoder lr, MotorEncoder fb, DeadWheelConstants constants) { super( Arrays.asList( new Pose2d(0, constants.getDouble(LateralDistance.class), 0), // left From 371f4236f677a4b193c59cc5701851284d1b8f56 Mon Sep 17 00:00:00 2001 From: Kevin Frei Date: Tue, 25 Mar 2025 20:46:19 -0700 Subject: [PATCH 3/6] Some new commands from students during offseason work --- .../library/command/CycleCommandGroup.java | 25 +++++++++++++++++++ .../library/command/LinearRangeCommand.java | 25 +++++++++++++++++++ .../library/command/TimedCommand.java | 18 +++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 RobotLibrary/src/main/java/com/technototes/library/command/CycleCommandGroup.java create mode 100644 RobotLibrary/src/main/java/com/technototes/library/command/LinearRangeCommand.java create mode 100644 RobotLibrary/src/main/java/com/technototes/library/command/TimedCommand.java diff --git a/RobotLibrary/src/main/java/com/technototes/library/command/CycleCommandGroup.java b/RobotLibrary/src/main/java/com/technototes/library/command/CycleCommandGroup.java new file mode 100644 index 00000000..23b1f45e --- /dev/null +++ b/RobotLibrary/src/main/java/com/technototes/library/command/CycleCommandGroup.java @@ -0,0 +1,25 @@ +package com.technototes.library.command; + +/** + * Each time this command(group) is scheduled, the next one + * in the series will execute. When the last one is executed, + * it starts over at the first one. + * + * The most obvious application is for "toggle" command: + * something like this: + * clawToggle = new CycleCommandGroup(claw::open, claw::close); + */ +public class CycleCommandGroup implements Command { + protected Command[] commands; + protected int currentState = 0; + + public CycleCommandGroup(Command... commands) { + assert commands.length > 0; + this.commands = commands; + } + + public void execute() { + commands[currentState].run(); + currentState = (currentState + 1) % commands.length; + } +} diff --git a/RobotLibrary/src/main/java/com/technototes/library/command/LinearRangeCommand.java b/RobotLibrary/src/main/java/com/technototes/library/command/LinearRangeCommand.java new file mode 100644 index 00000000..5fdf83ba --- /dev/null +++ b/RobotLibrary/src/main/java/com/technototes/library/command/LinearRangeCommand.java @@ -0,0 +1,25 @@ +package com.technototes.library.command; + +import java.util.function.Consumer; + +public class LinearRangeCommand extends TimedCommand { + double startVal, endVal; + + public LinearRangeCommand(double time, double start, double end, Consumer func) { + super(time, func); + startVal = start; + endVal = end; + } + + @Override + public void execute() { + // Being explicitly pedantic about pre-algebra, here... + double M = (endVal - startVal) / startVal; + double X = getRuntime().time(); + double B = startVal; + + double Y = M * X + B; + + function.accept(Y); + } +} diff --git a/RobotLibrary/src/main/java/com/technototes/library/command/TimedCommand.java b/RobotLibrary/src/main/java/com/technototes/library/command/TimedCommand.java new file mode 100644 index 00000000..c71c7c9a --- /dev/null +++ b/RobotLibrary/src/main/java/com/technototes/library/command/TimedCommand.java @@ -0,0 +1,18 @@ +package com.technototes.library.command; + +import java.util.function.Consumer; + +public class TimedCommand extends WaitCommand { + protected double timeToRun; + protected Consumer function; + + public TimedCommand(double time, Consumer func){ + super(time); + function = func; + } + + @Override + public void execute() { + function.accept(getRuntime().time()); + } +} From 50bb302cf76b9a05e8b0ca02c09659dc7a07f393 Mon Sep 17 00:00:00 2001 From: Technototes Date: Mon, 12 May 2025 16:01:23 -0700 Subject: [PATCH 4/6] Updated to later version of my formatting thing --- .gitignore | 2 ++ bun.lockb | Bin 16214 -> 16246 bytes package.json | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 60f00ae4..782257ad 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ /build /captures .externalNativeBuild +/node_modules + diff --git a/bun.lockb b/bun.lockb index 95520927a85747d16f231fe77144ebad816d8054..855b4f814b7ee64b64f9e210713cfca8bc0e75f8 100644 GIT binary patch delta 716 zcmcas_pNS%p5n|y4z9tcf-2VCx+6NTcEPbH!VGTO3w-L&{9a{N^JD9lXB+(^*%($Qc0I?B>0|a!S{itivS+x>K3O;K>MTM3V&WpaSFK;-it*X6Y}T(1?jzCL-{^tQ_H?2`db z57!84W&EEdvzb*?NMy3Krs3oTnkKfJbABXJfq=cNiBUwi^-l^ z^^AOzk7|`O)=ak5R+r!est{mcXxM(<^Z1j%@R=NpaRz#3dZwEjv{jfS(Pfz+vL+0h z7whh461rdj)D1Gg5JGd=Ol~j`o!n-iHF>RpGp7So_}=E920bi{rkmSLFK_|?WsP;c delta 707 zcmexXcdc%Mp5m+@lC=wxIcI3{)xQ6-)FDH-IH=Cn&|&2gwrwI$^BPtj+vp$3HaUaY zVDk;OH*EFH3=9mCKnwyPS^|g-K^!2U1MNp$izZLxs~%=v+I*A$4U5BEqprol^Us_7 z707g1zT_?YYMJx=mmcIiy1n{T$a~fDH@07l1EnNV|7xgDI;XE?>cRP8)BdP$UnWGG z-e~hxng41ttEi9&OL0-M-ehr2!^u9H34&t4pa;b^Comv~(CvCVOht zPd=kn!k9GKQCnRGD9OMH!~zTq4cpIq9)A)TK9hqn&Opyh&t!9hwhGhceY*RYR5loZ z6f!V;fYMwxAp0`&ic1o6a`cK*bIVeTCNDP7ntZ{)fl~pRxb|(9H0)tvG}*k&^a3XU D&zEw6 diff --git a/package.json b/package.json index 8d83ff2d..5696321e 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "os": "bun run scripts/os.ts" }, "devDependencies": { - "@freik/workspace": "^0.6.4", + "@freik/workspace": "^0.6.5", "prettier": "3.3.3", "prettier-plugin-java": "2.6.4" }, From 79f306a96c3e8857db93b5057bd95dab7bff8045 Mon Sep 17 00:00:00 2001 From: Kevin Frei Date: Sun, 27 Jul 2025 08:47:39 -0700 Subject: [PATCH 5/6] Trying to get this working for local builds --- Path/build.gradle | 2 +- RobotLibrary/build.gradle | 2 +- Vision/build.gradle | 2 +- build.dependencies.gradle | 8 ++++---- build.gradle | 2 +- gradle.properties | 25 +++++++++++------------- gradle/wrapper/gradle-wrapper.properties | 2 +- 7 files changed, 20 insertions(+), 23 deletions(-) diff --git a/Path/build.gradle b/Path/build.gradle index 003c2004..e3f11a02 100644 --- a/Path/build.gradle +++ b/Path/build.gradle @@ -12,7 +12,7 @@ android { targetSdkVersion 28 } - compileSdkVersion 29 + compileSdkVersion 30 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/RobotLibrary/build.gradle b/RobotLibrary/build.gradle index 37579291..ed7f5d6e 100644 --- a/RobotLibrary/build.gradle +++ b/RobotLibrary/build.gradle @@ -12,7 +12,7 @@ android { targetSdkVersion 28 } - compileSdkVersion 29 + compileSdkVersion 30 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/Vision/build.gradle b/Vision/build.gradle index ba187bd3..8096bd3e 100644 --- a/Vision/build.gradle +++ b/Vision/build.gradle @@ -12,7 +12,7 @@ android { targetSdkVersion 28 } - compileSdkVersion 29 + compileSdkVersion 30 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/build.dependencies.gradle b/build.dependencies.gradle index 0b739254..cc74ce94 100644 --- a/build.dependencies.gradle +++ b/build.dependencies.gradle @@ -6,9 +6,9 @@ repositories { } dependencies { - implementation 'org.firstinspires.ftc:RobotCore:10.1.1' - implementation 'org.firstinspires.ftc:RobotServer:10.1.1' - implementation 'org.firstinspires.ftc:Hardware:10.1.1' - implementation 'org.firstinspires.ftc:FtcCommon:10.1.1' + implementation 'org.firstinspires.ftc:RobotCore:10.3.0' + implementation 'org.firstinspires.ftc:RobotServer:10.3.0' + implementation 'org.firstinspires.ftc:Hardware:10.3.0' + implementation 'org.firstinspires.ftc:FtcCommon:10.3.0' implementation 'androidx.appcompat:appcompat:1.3.1' } diff --git a/build.gradle b/build.gradle index f06ec4ce..8904ce4f 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:8.7.0' + classpath 'com.android.tools.build:gradle:8.11.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/gradle.properties b/gradle.properties index 1e0c1d3b..77487195 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,19 +1,16 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit +## For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html - +# # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx1024m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. For more details, visit +# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects +# org.gradle.parallel=true +#Sun Jul 27 08:41:53 PDT 2025 android.enableJetifier=true android.useAndroidX=true -org.gradle.jvmargs=-Xmx1536m - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true \ No newline at end of file +org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fddfd9a6..ad069290 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Tue Sep 27 22:08:26 PDT 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 46a5e144a89eb65c556dd6c4a8dba4515fcff873 Mon Sep 17 00:00:00 2001 From: Kevin Frei Date: Fri, 12 Sep 2025 19:20:39 -0700 Subject: [PATCH 6/6] Updated to Decode 2025/11.0 dependencies --- Path/build.gradle | 4 +--- RobotLibrary/build.gradle | 2 +- Vision/build.gradle | 2 +- build.dependencies.gradle | 8 ++++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Path/build.gradle b/Path/build.gradle index e3f11a02..ca0b3c21 100644 --- a/Path/build.gradle +++ b/Path/build.gradle @@ -12,7 +12,7 @@ android { targetSdkVersion 28 } - compileSdkVersion 30 + compileSdkVersion 34 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -31,11 +31,9 @@ dependencies { implementation 'org.apache.commons:commons-math3:3.6.1' - implementation 'com.acmerobotics.dashboard:dashboard:0.4.16' implementation 'com.acmerobotics.roadrunner:core:0.5.6' - testImplementation(platform('org.junit:junit-bom:5.7.0')) testImplementation('org.junit.jupiter:junit-jupiter-api:5.7.0') testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.7.0') diff --git a/RobotLibrary/build.gradle b/RobotLibrary/build.gradle index ed7f5d6e..66d2bb2d 100644 --- a/RobotLibrary/build.gradle +++ b/RobotLibrary/build.gradle @@ -12,7 +12,7 @@ android { targetSdkVersion 28 } - compileSdkVersion 30 + compileSdkVersion 34 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/Vision/build.gradle b/Vision/build.gradle index 8096bd3e..3e1bee16 100644 --- a/Vision/build.gradle +++ b/Vision/build.gradle @@ -12,7 +12,7 @@ android { targetSdkVersion 28 } - compileSdkVersion 30 + compileSdkVersion 34 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/build.dependencies.gradle b/build.dependencies.gradle index cc74ce94..33b7894e 100644 --- a/build.dependencies.gradle +++ b/build.dependencies.gradle @@ -6,9 +6,9 @@ repositories { } dependencies { - implementation 'org.firstinspires.ftc:RobotCore:10.3.0' - implementation 'org.firstinspires.ftc:RobotServer:10.3.0' - implementation 'org.firstinspires.ftc:Hardware:10.3.0' - implementation 'org.firstinspires.ftc:FtcCommon:10.3.0' + implementation 'org.firstinspires.ftc:RobotCore:11.0.0' + implementation 'org.firstinspires.ftc:RobotServer:11.0.0' + implementation 'org.firstinspires.ftc:Hardware:11.0.0' + implementation 'org.firstinspires.ftc:FtcCommon:11.0.0' implementation 'androidx.appcompat:appcompat:1.3.1' }