mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 08:48:07 -06:00
changed track target reqs + started extender command
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package frc4388.robot.commands;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||
import frc4388.robot.subsystems.Extender;
|
||||
import frc4388.robot.subsystems.Intake;
|
||||
|
||||
public class RunExtenderOut extends CommandBase {
|
||||
|
||||
private Intake intake;
|
||||
private Extender extender;
|
||||
private int direction;
|
||||
|
||||
/** Creates a new RunExtenderOut. */
|
||||
public RunExtenderOut(Intake intake, Extender extender) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
|
||||
this.intake = intake;
|
||||
this.extender = extender;
|
||||
|
||||
this.direction = 1;
|
||||
|
||||
addRequirements(this.intake, this.extender);
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@Override
|
||||
public void initialize() {}
|
||||
|
||||
// Called every time the scheduler runs while the command is scheduled.
|
||||
@Override
|
||||
public void execute() {}
|
||||
|
||||
// Called once the command ends or is interrupted.
|
||||
@Override
|
||||
public void end(boolean interrupted) {}
|
||||
|
||||
// Returns true when the command should end.
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,6 @@ import frc4388.utility.DesmosServer;
|
||||
public class TrackTarget extends CommandBase {
|
||||
/** Creates a new TrackTarget. */
|
||||
Turret m_turret;
|
||||
SwerveDrive m_drive;
|
||||
VisionOdometry m_visionOdometry;
|
||||
BoomBoom m_boomBoom;
|
||||
Hood m_hood;
|
||||
@@ -45,15 +44,14 @@ public class TrackTarget extends CommandBase {
|
||||
|
||||
// public static Gains m_aimGains;
|
||||
|
||||
public TrackTarget (Turret turret, BoomBoom boomBoom, Hood hood, SwerveDrive drive, VisionOdometry visionOdometry) {
|
||||
public TrackTarget (Turret turret, BoomBoom boomBoom, Hood hood, VisionOdometry visionOdometry) {
|
||||
// Use addRequirements() here to declare subsystem dependencies.
|
||||
m_turret = turret;
|
||||
m_drive = drive;
|
||||
m_boomBoom = boomBoom;
|
||||
m_hood = hood;
|
||||
m_visionOdometry = visionOdometry;
|
||||
|
||||
addRequirements(m_turret, m_boomBoom, m_hood, m_drive, m_visionOdometry);
|
||||
addRequirements(m_turret, m_boomBoom, m_hood, m_visionOdometry);
|
||||
}
|
||||
|
||||
// Called when the command is initially scheduled.
|
||||
@@ -102,6 +100,7 @@ public class TrackTarget extends CommandBase {
|
||||
}
|
||||
catch (Exception e){
|
||||
e.printStackTrace();
|
||||
m_turret.runshooterRotatePID(180);
|
||||
// System.err.println("Exception: " + e.toString() + ", Line 78 at TrackTarget.java");
|
||||
}
|
||||
// vel = m_boomBoom.getVelocity(distance);
|
||||
|
||||
Reference in New Issue
Block a user