Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abigail swrve x stance #12

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Abigail swrve x stance #12

wants to merge 10 commits into from

Conversation

Abigail-27
Copy link

xstance created :) with copilot and chatgpt hehe

@Abigail-27 Abigail-27 changed the title Abigail swrve Abigail swrve x stance Jan 8, 2025
Copy link
Member

@Ishan1522 Ishan1522 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall good job! just some thoughts about how this could be changed.

@@ -0,0 +1,37 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If ur not gonna use this plz delete

@@ -187,6 +187,11 @@ public double getTurnRotations() {
.getRotations();
}

@Override
public void xthing(double desiredPositionDegrees) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a better name

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually i dont think this is used in the code so u should just delete it


public void setXStance(SwerveModuleState[] xState) {
isMoving = false;
if (threesecsinactive()) { // Only lock if inactive for 3 seconds
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly this not rlly the best way of doing it. also the setXStance isn't used anywhere sooooooooo it wouldn't actually happen.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo u could use wpilib's timer or the fpga clock and get if some amount of time has passed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u might want to separate the if statement out of the method bc we want the thing that does the xStance to be usable in other contexts. In addition, we might also make it a button, so another reason to move the if statement out.

If you want to do the three seconds (which we might do) you could maybe put it in something like setModuleStates or drive?

@@ -77,6 +80,10 @@ public double getTurnVelocity() {
return inputs.turnVelocity;
}

public void xthing(double desiredPositionDegrees) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont think u need this

@JacksonElia JacksonElia added the enhancement New feature or request label Jan 9, 2025
@Ishan1522 Ishan1522 linked an issue Jan 9, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write swerve x stance code
4 participants