This commit is contained in:
2024-11-04 18:25:43 -05:00
10 changed files with 13 additions and 31 deletions

View File

@ -3,15 +3,11 @@
// the WPILib BSD license file in the root directory of this project.
package frc.robot.Subsystems;
import edu.wpi.first.networktables.GenericEntry;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
public class Accumulateur extends SubsystemBase {
@ -42,7 +38,6 @@ public class Accumulateur extends SubsystemBase {
public void desaccumule(){
desaccumule(vitesse.getDouble(0.9));
}
@Override
public void periodic() {
// This method will be called once per scheduler run

View File

@ -3,12 +3,9 @@
// the WPILib BSD license file in the root directory of this project.
package frc.robot.Subsystems;
import java.io.File;
import java.io.IOException;
import com.ctre.phoenix6.hardware.Pigeon2;
import edu.wpi.first.math.geometry.Translation2d;
import edu.wpi.first.math.kinematics.SwerveModulePosition;
import edu.wpi.first.wpilibj.Filesystem;
@ -16,7 +13,6 @@ import edu.wpi.first.wpilibj2.command.SubsystemBase;
import swervelib.SwerveDrive;
import swervelib.parser.SwerveParser;
public class Drive extends SubsystemBase {
SwerveDrive swerveDrive;

View File

@ -39,7 +39,6 @@ public class Lanceur extends SubsystemBase {
lanceur1.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative);
lanceur2.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative);
lanceur1.setStatusFramePeriod(StatusFrameEnhanced.Status_2_Feedback0, 1);
}
public void masterslave(){
lanceur2.follow(lanceur1);
@ -57,8 +56,8 @@ public class Lanceur extends SubsystemBase {
public void tourelRotation(){
tourelle.set(rotation.getDouble(0.1));
}
public void vitesseTourel(){
tourelle.set(0.1);
public double vitessetourel(){
return(tourelle.getEncoder().getVelocity());
}
public double distancetourel(){
return(tourelle.getEncoder().getPosition());

View File

@ -12,6 +12,7 @@ import edu.wpi.first.networktables.NetworkTableEntry;
import edu.wpi.first.networktables.NetworkTableInstance;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
public class Limelight3G extends SubsystemBase {
ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard");
private GenericEntry orientation =
@ -20,7 +21,6 @@ public class Limelight3G extends SubsystemBase {
.withPosition(2, 4)
.getEntry();
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight");
NetworkTableEntry tx = table.getEntry("tx");
NetworkTableEntry ty = table.getEntry("ty");
NetworkTableEntry pipeline = table.getEntry("pipeline");