Skip to content

Commit

Permalink
this is a cat
Browse files Browse the repository at this point in the history
  • Loading branch information
MadMath123 committed Jan 16, 2025
1 parent c34e327 commit 820d3c0
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package frc.team449.subsystems.drive.new_swerve

import edu.wpi.first.math.geometry.Pose2d
import edu.wpi.first.math.geometry.Rotation2d
import edu.wpi.first.math.kinematics.ChassisSpeeds
import edu.wpi.first.math.kinematics.SwerveModuleState
import edu.wpi.first.wpilibj2.command.Subsystem


interface SwerveDrive: Subsystem{
fun drive(speeds: ChassisSpeeds, fieldRelative: Boolean, isOpenLoop: Boolean)
fun setModuleStates(desiredStates: Array<SwerveModuleState>)
fun getMeasuredSpeeds()
fun getGyroYaw()
fun getPose()
fun setPose(pose: Pose2d)
fun getHeading(){
return getPose().getRotation();
}
fun setHeading(heading: Rotation2d){
setPose(Pose2d(getPose().getTranslation(), heading))
}
fun zeroHeading(){
setHeading(Rotation2d())
};
}

0 comments on commit 820d3c0

Please sign in to comment.