Skip to content

Final button bindings#81

Open
TheMagneticDude wants to merge 61 commits into
tank-botfrom
final-button-bindings
Open

Final button bindings#81
TheMagneticDude wants to merge 61 commits into
tank-botfrom
final-button-bindings

Conversation

@TheMagneticDude
Copy link
Copy Markdown
Contributor

Obliberated button bindings

m_drivesubsystem = drivesubsystem;
m_ledSubsystem = lightSubsystem;
// Use addRequirements() here to declare subsystem dependencies.
addRequirements(subsystem, drivesubsystem);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need lightSubsystem here too?

Suggested change
addRequirements(subsystem, drivesubsystem);
addRequirements(subsystem, drivesubsystem, lightSubsystem);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nope

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok, thanks. Why not?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

to clarify what I mean: since we use it here, shouldn't we add it to the requirements call.

@EddieCanales
Copy link
Copy Markdown
Contributor

so it doesn't get lost... let's make sure we take into account the feedback on #82

@@ -20,7 +20,9 @@ public class ArmSubsystem extends SubsystemBase {

public final CANSparkMax m_winch = new CANSparkMax(ArmConstants.kWinchPort, CANSparkMaxLowLevel.MotorType.kBrushless); // Assume Brushless, unknown currently
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
public final CANSparkMax m_winch = new CANSparkMax(ArmConstants.kWinchPort, CANSparkMaxLowLevel.MotorType.kBrushless); // Assume Brushless, unknown currently
public final CANSparkMax m_winch = new CANSparkMax(ArmConstants.kWinchPort, CANSparkMaxLowLevel.MotorType.kBrushed);

According to Philippe, this should be Brushed

Copy link
Copy Markdown
Contributor

@kanno41 kanno41 left a comment

Choose a reason for hiding this comment

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

If using DriveDistance, make sure to implement it in the auton commands. Generally, we want to measure things in meters rather than inches in an engineering context, but it's fine for now

// Returns true when the command should end.
@Override
public boolean isFinished() {
return m_drivesubsystem.getLeftEncoder() > m_inches / DriveConstants.kInchesPerTic;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we need to take into account whether it is driving backwards or forwards here. Perhaps use Math.abs?

@BowlesCR BowlesCR force-pushed the final-button-bindings branch from 7c65242 to d95fc07 Compare March 17, 2023 05:49
System.out.println((m_position - 6 * armAdjustValue));
m_armSubsystem.runToPosition(m_armSubsystem.m_extender, m_armSubsystem.m_extenderEncoder, (m_position - (6 * armAdjustValue)), m_speed);
System.out.println((m_position - 8 * armAdjustValue));
m_armSubsystem.runToPosition(m_armSubsystem.m_extender, m_armSubsystem.m_extenderEncoder, (m_position - (8 * armAdjustValue)), m_speed);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bruh

@github-advanced-security
Copy link
Copy Markdown

You have successfully added a new QDJVMC configuration project/qodana. As part of the setup process, we have scanned this repository and found 8 existing alerts. Please check the repository Security tab to see all alerts.

}

public boolean isGrabberFilled(){
if(getGrabberState() == ArmConstants.kGrabberFilled){

Check warning

Code scanning / QDJVMC

String comparison using '==', instead of 'equals()'

String values are compared using '==', not 'equals()'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants