Skip to content

Commit

Permalink
Merge branch 'Update-autonomous' into auto-refeactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mlists authored Mar 11, 2024
2 parents 9ebd4a5 + 5cbde24 commit 23bc5f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion components/chassis.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,12 @@ def get_module_states(
) -> tuple[
SwerveModuleState, SwerveModuleState, SwerveModuleState, SwerveModuleState
]:
return tuple(module.get() for module in self.modules)
return (
self.modules[0].get(),
self.modules[1].get(),
self.modules[2].get(),
self.modules[3].get(),
)

def setup(self) -> None:
initial_pose = TeamPoses.RED_TEST_POSE if is_red() else TeamPoses.BLUE_TEST_POSE
Expand Down
4 changes: 3 additions & 1 deletion physics.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def __init__(self, physics_controller: PhysicsInterface, robot: MyRobot):
self.physics_controller = physics_controller

self.kinematics: SwerveDrive4Kinematics = robot.chassis.kinematics
self.swerve_modules: list[SwerveModule] = robot.chassis.modules
self.swerve_modules: tuple[
SwerveModule, SwerveModule, SwerveModule, SwerveModule
] = robot.chassis.modules

# Motors
self.wheels = [
Expand Down

0 comments on commit 23bc5f3

Please sign in to comment.