File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
swerve/src/main/java/org/strykeforce/thirdcoast/swerve Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ buildscript {
1212
1313configure(subprojects) {
1414 group = ' org.strykeforce.thirdcoast'
15- version = ' 19.1.0 '
15+ version = ' 19.1.1 '
1616
1717 apply plugin : ' java-library'
1818 apply plugin : ' idea'
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ public class Wheel {
3535 private final TalonSRX driveTalon ;
3636 private final TalonSRX azimuthTalon ;
3737 protected DoubleConsumer driver ;
38+ private boolean isInverted = false ;
3839
3940 /**
4041 * This constructs a wheel with supplied azimuth and drive talons.
@@ -81,6 +82,7 @@ public void set(double azimuth, double drive) {
8182
8283 // minimize azimuth rotation, reversing drive if necessary
8384 if (Math .abs (azimuthError ) > 0.25 * TICKS ) {
85+ isInverted = true ;
8486 azimuthError -= Math .copySign (0.5 * TICKS , azimuthError );
8587 drive = -drive ;
8688 }
@@ -190,6 +192,10 @@ public double getDriveSetpointMax() {
190192 return driveSetpointMax ;
191193 }
192194
195+ public boolean isInverted () {
196+ return isInverted ;
197+ }
198+
193199 @ Override
194200 public String toString () {
195201 return "Wheel{"
You can’t perform that action at this time.
0 commit comments