From fb83a21f6e71a35babba1a0ad90ef94ac46cdf33 Mon Sep 17 00:00:00 2001 From: Saharsh Navudu Date: Sun, 28 Dec 2025 12:13:01 -0800 Subject: [PATCH] Fix for #17 getHeading(AngleUnit) Fixed the issue where part of the normalization is happening before passing the value and the rest on the returned value. --- .../org/firstinspires/ftc/teamcode/GoBildaPinpointDriver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/GoBildaPinpointDriver.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/GoBildaPinpointDriver.java index 3781542c9bc6..6ea067b64c41 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/GoBildaPinpointDriver.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/GoBildaPinpointDriver.java @@ -638,7 +638,7 @@ public double getHeading(){ * normalized heading is wrapped from -180°, to 180°. */ public double getHeading(AngleUnit angleUnit){ - return angleUnit.fromRadians((hOrientation + Math.PI) % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI) - Math.PI; + return angleUnit.fromRadians(((hOrientation + Math.PI) % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI) - Math.PI); } /**