diff --git a/networktables.json b/networktables.json new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/networktables.json @@ -0,0 +1 @@ + diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 42d5b9f..aff140e 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -76,7 +76,7 @@ public RobotContainer() { manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable)); manette1.y().whileTrue(gyro); - manette1.b().toggleOnTrue(Commands.startEnd(gratte::baiser, gratte::Lever,gratte)); + manette1.b().toggleOnTrue(Commands.startEnd()); manette1.start().toggleOnTrue(Commands.startEnd(basePilotable::resetGyro, basePilotable::resetGyro, basePilotable)); } diff --git a/src/main/java/frc/robot/commands/GratteMonte.java b/src/main/java/frc/robot/commands/GratteMonte.java index 522deff..b460277 100644 --- a/src/main/java/frc/robot/commands/GratteMonte.java +++ b/src/main/java/frc/robot/commands/GratteMonte.java @@ -4,6 +4,8 @@ package frc.robot.commands; +import com.ctre.phoenix.motorcontrol.LimitSwitchNormal; +import frc.robot.Constants; import edu.wpi.first.wpilibj2.command.CommandBase; import frc.robot.subsystems.Gratte; @@ -24,7 +26,7 @@ public class GratteMonte extends CommandBase { @Override public void execute() { if(gratte.hautd()){ - gratte.Lever(0); + gratte.Lever(0.5); } else{ gratte.Lever(0.5); @@ -43,8 +45,7 @@ public class GratteMonte extends CommandBase { // Returns true when the command should end. @Override - public boolean isFinished() { - + public boolean isFinished(){ return false; - } } + } \ No newline at end of file diff --git a/src/main/java/frc/robot/subsystems/BasePilotable.java b/src/main/java/frc/robot/subsystems/BasePilotable.java index cf9e355..6ed4487 100644 --- a/src/main/java/frc/robot/subsystems/BasePilotable.java +++ b/src/main/java/frc/robot/subsystems/BasePilotable.java @@ -13,6 +13,8 @@ import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj.DoubleSolenoid.Value; import edu.wpi.first.wpilibj.drive.DifferentialDrive; import edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup; +import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; +import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.Constants; @@ -24,10 +26,12 @@ public class BasePilotable extends SubsystemBase { final MotorControllerGroup droit = new MotorControllerGroup(avantdroit, arrieredroit); final MotorControllerGroup gauche = new MotorControllerGroup(avantgauche, arrieregauche); final DifferentialDrive drive = new DifferentialDrive(gauche, droit); + //piston private DoubleSolenoid brakedroit = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakedroit, Constants.brakedroit); private DoubleSolenoid brakegauche = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakegauche, Constants.brakegauche); //gyro + ShuffleboardTab teb = Shuffleboard.getTab("teb"); private AHRS gyroscope = new AHRS();public double getangle() {return gyroscope.getAngle();} public double getpitch() { return gyroscope.getPitch(); @@ -67,7 +71,10 @@ public void resetGyro(){ @Override public void periodic() { - // This method will be called once per scheduler run - + teb .add("encodeuravantdroit",0.1); + teb .add("encodeurarrieregauche",0.1); + teb .add("encodeurarrieredroit",0.1); + teb .add("encodeuravantgauche",0.1); + teb .add("distance",0.1); } } diff --git a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java index 0a00268..08f983b 100644 --- a/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java +++ b/src/main/java/frc/robot/subsystems/bras/BrasTelescopique.java @@ -8,7 +8,10 @@ package frc.robot.subsystems.bras; import com.revrobotics.CANSparkMax; import com.revrobotics.CANSparkMaxLowLevel.MotorType; +<<<<<<< HEAD import edu.wpi.first.wpilibj.DigitalInput; +======= +>>>>>>> Dash import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.Constants; @@ -32,6 +35,10 @@ public class BrasTelescopique extends SubsystemBase { } @Override public void periodic() { +<<<<<<< HEAD Shuffleboard.getTab("SmartDashBoard") .add("photocell",0.1); +======= + Shuffleboard.getTab("SmartDashBoard") .add("winch",0.1); +>>>>>>> Dash } } diff --git a/src/main/java/frc/robot/subsystems/bras/Pince.java b/src/main/java/frc/robot/subsystems/bras/Pince.java index a933219..2aa6540 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pince.java +++ b/src/main/java/frc/robot/subsystems/bras/Pince.java @@ -15,8 +15,8 @@ public class Pince extends SubsystemBase { /** Creates a new Pince. */ public Pince() { } -public void fermer() { - pistonPince.set(Value.kReverse); + public void fermer() { + pistonPince.set(Value.kReverse); } public void ouvrir() { pistonPince.set(Value.kForward); diff --git a/src/main/java/frc/robot/subsystems/bras/Pivot.java b/src/main/java/frc/robot/subsystems/bras/Pivot.java index e4e4468..b2494d0 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pivot.java +++ b/src/main/java/frc/robot/subsystems/bras/Pivot.java @@ -4,7 +4,10 @@ package frc.robot.subsystems.bras; +<<<<<<< HEAD import edu.wpi.first.wpilibj.DigitalInput; +======= +>>>>>>> Dash import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.Constants; @@ -34,6 +37,11 @@ public class Pivot extends SubsystemBase { } @Override public void periodic() { +<<<<<<< HEAD Shuffleboard.getTab("SmartDashBoard") .add("limitpivot",0.1); } +======= + Shuffleboard.getTab("SmartDashBoard") .add("pivot encodeur",0.1); + } +>>>>>>> Dash }