Skip to content

Commit cad0cd3

Browse files
committed
Add ability to set Pigeon yaw to arbitrary angle and bump version
1 parent 074040f commit cad0cd3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ plugins {
1313
}
1414

1515
group 'frc.team4373'
16-
version '2.0.0'
16+
version '2.0.1'
1717

1818
sourceCompatibility = 1.11
1919

src/main/java/frc/team4373/swerve/SwerveDrivetrain.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,17 @@ public void resetEncoder(WheelID wheelID) {
335335
}
336336

337337
/**
338-
* Resets the pigeon's yaw to consider the current orientation field-forward.
338+
* Resets the pigeon's yaw to consider the current orientation field-forward (zero degrees).
339339
*/
340340
public void resetPigeonYaw() {
341341
this.initialAngle = this.getPigeonYawRaw();
342342
}
343+
344+
/**
345+
* Sets the pigeon's yaw to be a given value at the current position.
346+
* @param angle the value, in degrees, that the pigeon should have at the current position..
347+
*/
348+
public void setPigeonYaw(double angle) {
349+
this.initialAngle = this.getPigeonYawRaw() + angle;
350+
}
343351
}

0 commit comments

Comments
 (0)