This repository was archived by the owner on May 19, 2024. It is now read-only.
File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,8 @@ public Rotation2d getFieldRelativeHeading() {
151
151
* alliance.
152
152
*/
153
153
public Rotation2d getDriverRelativeHeading () {
154
+ gyroscope .update (gyroscopeValues );
155
+
154
156
return Rotation2d .fromRotations (gyroscopeValues .yawRotations );
155
157
}
156
158
Original file line number Diff line number Diff line change @@ -73,22 +73,22 @@ public void execute() {
73
73
74
74
Rotation2d driverRelativeHeading = odometry .getDriverRelativeHeading ();
75
75
76
- if (DriveRequest .startedDrifting (previousRequest , request )) {
77
- resetHeadingGoal ();
78
- }
76
+ // if (DriveRequest.startedDrifting(previousRequest, request)) {
77
+ // resetHeadingGoal();
78
+ // }
79
79
80
- if (request .isSnapping ()) {
81
- setPositionHeadingGoal (headingSnapper .snap (request .driverHeading ()));
82
- }
80
+ // if (request.isSnapping()) {
81
+ // setPositionHeadingGoal(headingSnapper.snap(request.driverHeading()));
82
+ // }
83
83
84
- Rotation2d omega ;
84
+ Rotation2d omega = new Rotation2d () ;
85
85
86
86
if (request .isSpinning ()) {
87
87
updateVelocity (request .omega ());
88
88
89
89
omega = request .omega ();
90
90
} else {
91
- omega = calculateHeadingProfileOmega ();
91
+ // omega = calculateHeadingProfileOmega();
92
92
}
93
93
94
94
ChassisSpeeds chassisSpeeds =
You can’t perform that action at this time.
0 commit comments