Compare commits

..

No commits in common. "1989806378c864fb061206438d619bd5a44d976d" and "99525dc7d7ef51a1e5aec396b238deb45c320f7a" have entirely different histories.

2 changed files with 1 additions and 34 deletions

View File

@ -4,20 +4,11 @@
package frc.robot; package frc.robot;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands; import edu.wpi.first.wpilibj2.command.Commands;
public class RobotContainer { public class RobotContainer {
ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard");
public RobotContainer() { public RobotContainer() {
dashboard.addCamera("limelight3G", "limelight3G","limelight.local:5800")
.withSize(3,4)
.withPosition(0,0);
dashboard.addCamera("limelight3", "limelight3","limelight.local:5800")
.withSize(3,4)
.withPosition(3,0);
configureBindings(); configureBindings();
} }

View File

@ -5,10 +5,6 @@
package frc.robot.Subsystems; 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 edu.wpi.first.wpilibj2.command.SubsystemBase;
@ -16,35 +12,15 @@ import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
public class Accumulateur extends SubsystemBase { public class Accumulateur extends SubsystemBase {
/** Creates a new Accumulateur. */ /** Creates a new Accumulateur. */
public Accumulateur() {dashboard.addBoolean("photocellacc", this::limitswitch) public Accumulateur() {}
.withSize(1, 1)
.withPosition(0, 1);
}
ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard");
private GenericEntry vitesse =
dashboard.add("vitesseacc", 0.1)
.withSize(1, 1)
.withPosition(0, 4)
.getEntry();
final WPI_TalonSRX accumulateur1 = new WPI_TalonSRX(0); final WPI_TalonSRX accumulateur1 = new WPI_TalonSRX(0);
final WPI_TalonSRX accumulateur2 = new WPI_TalonSRX(10); final WPI_TalonSRX accumulateur2 = new WPI_TalonSRX(10);
final DigitalInput photocell = new DigitalInput(94);
public void encodeur(){ public void encodeur(){
} }
public boolean limitswitch(){
return !photocell.get();
}
public void desaccumule(double vitesse){ public void desaccumule(double vitesse){
accumulateur1.set(vitesse); accumulateur1.set(vitesse);
accumulateur2.set(-vitesse); accumulateur2.set(-vitesse);
} }
public void desaccumule(){
desaccumule(vitesse.getDouble(0.9));
}
@Override @Override
public void periodic() { public void periodic() {
// This method will be called once per scheduler run // This method will be called once per scheduler run