-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
we just need photon now
There was a problem hiding this 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 |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make a better name
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
xstance created :) with copilot and chatgpt hehe