Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reformats with pre-commit
Browse files Browse the repository at this point in the history
CalvinOdropbear committed Jan 25, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 214487d commit 2d2521d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions utilities/game.py
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@

APRILTAGS = apriltag_layout.getTags()

L3_TAGS = [7,9,11,18,20,22]
L2_TAGS = [6,8,10,17,19,21]
L3_TAGS = [7, 9, 11, 18, 20, 22]
L2_TAGS = [6, 8, 10, 17, 19, 21]

FIELD_WIDTH = apriltag_layout.getFieldWidth()
FIELD_LENGTH = apriltag_layout.getFieldLength()
@@ -54,7 +54,8 @@ def field_flip_translation2d(t: Translation2d):
def is_red() -> bool:
return wpilib.DriverStation.getAlliance() == wpilib.DriverStation.Alliance.kRed

def nearest_reef_tag(pose :Pose2d) -> int:

def nearest_reef_tag(pose: Pose2d) -> int:
distance = math.inf
closest_tag_id = 0

@@ -70,5 +71,6 @@ def nearest_reef_tag(pose :Pose2d) -> int:

return closest_tag_id

def is_L3(tag_id :int) -> bool:
return tag_id in L3_TAGS

def is_L3(tag_id: int) -> bool:
return tag_id in L3_TAGS

0 comments on commit 2d2521d

Please sign in to comment.