acc + update dash
This commit is contained in:
@ -19,7 +19,9 @@ import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
|
||||
public class Lanceur extends SubsystemBase {
|
||||
/** Creates a new Lanceur. */
|
||||
public Lanceur() {}
|
||||
public Lanceur() {dashboard.add("rottourel", 0.2)
|
||||
.withSize(0,0)
|
||||
.withPosition(1, 3);}
|
||||
ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard");
|
||||
|
||||
final WPI_TalonSRX lanceur1 = new WPI_TalonSRX(0);
|
||||
@ -28,13 +30,9 @@ public class Lanceur extends SubsystemBase {
|
||||
private GenericEntry vitesse =
|
||||
dashboard.add("vitesselanceur", 0.2)
|
||||
.withSize(0,0)
|
||||
.withPosition(1, 4)
|
||||
.getEntry();
|
||||
private GenericEntry rotation =
|
||||
dashboard.add("rottourel", 0.2)
|
||||
.withSize(0,0)
|
||||
.withPosition(1, 5)
|
||||
.withPosition(0, 3)
|
||||
.getEntry();
|
||||
|
||||
public void encodeur(double distance){
|
||||
lanceur1.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative);
|
||||
lanceur2.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative);
|
||||
@ -53,9 +51,7 @@ public class Lanceur extends SubsystemBase {
|
||||
public void tourelRotation(double x, double y, double rotation){
|
||||
tourelle.set(rotation);
|
||||
}
|
||||
public void tourelRotation(){
|
||||
tourelle.set(rotation.getDouble(0.1));
|
||||
}
|
||||
|
||||
public double vitessetourel(){
|
||||
return(tourelle.getEncoder().getVelocity());
|
||||
}
|
||||
|
Reference in New Issue
Block a user