mirror of
https://github.com/TimeCrafters/FTC_2022
synced 2025-12-16 12:22:34 +00:00
Make Robot#facing return 360 degree rotation
This commit is contained in:
@@ -368,10 +368,10 @@ public class Robot {
|
||||
throw new RuntimeException("Failed to find variable with name: " + variableName + " in group: Robot, action: Tuning");
|
||||
}
|
||||
|
||||
// TODO: Convert to 360 degree range with +90 degrees being on the RIGHT
|
||||
public double facing() {
|
||||
// FIXME: Apply imuAngleOffset
|
||||
return imu.getRobotYawPitchRollAngles().getYaw(AngleUnit.DEGREES);
|
||||
double imuDegrees = imu.getRobotYawPitchRollAngles().getYaw(AngleUnit.DEGREES);
|
||||
|
||||
return (imuDegrees + imuAngleOffset + 360.0) % 360.0;
|
||||
}
|
||||
|
||||
public double heading() {
|
||||
|
||||
Reference in New Issue
Block a user