frc78 / FRC78_2024

Software repository for FRC Team 78's robot code for the 2024 FRC game Crescendo
Other
5 stars 1 forks source link

Cardinal snap buttons should change based on context #176

Open ArchdukeTim opened 7 months ago

ArchdukeTim commented 7 months ago

When we're on the blue alliance, there's never actually a reason we'd need to snap to 270º (intake facing the right). The amp is at 90º, the source and the amp side of the stage are at 300º, and the right side of the stage is at 60º.

We should make the snap buttons changes based on context (alliance) and location on the field.

(All angles use the field coordinate system)

When we're on blue (like in B80):

A: 180º B: 300º when near the source B: 240º when near stage right X: 90º when near the amp X: 120º when near stage left Y: 0º

When we're on Red

A: 0º B: 90º when near the amp B: 60º when near stage right X: 240º when near the source X: 200º when near stage left Y: 180º

This lets the buttons be used to auto-align with the hard-lines on the field