hgd
This commit is contained in:
parent
27d5b3cad7
commit
e7f5b81445
Binary file not shown.
@ -10,11 +10,8 @@ public class Constants {
|
|||||||
|
|
||||||
//moteur
|
//moteur
|
||||||
public static int leverGratte = 0;
|
public static int leverGratte = 0;
|
||||||
<<<<<<< HEAD
|
|
||||||
public static int baiserGratte = 1;
|
public static int baiserGratte = 1;
|
||||||
=======
|
|
||||||
public static int baisserGratte = 1;
|
public static int baisserGratte = 1;
|
||||||
>>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0
|
|
||||||
|
|
||||||
// pneumatique
|
// pneumatique
|
||||||
public static int pistonpinceouvre = 0;
|
public static int pistonpinceouvre = 0;
|
||||||
|
@ -78,12 +78,7 @@ public RobotContainer() {
|
|||||||
manette2.povRight().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheBas, brasTelescopique::PivotChercheBas, brasTelescopique));
|
manette2.povRight().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheBas, brasTelescopique::PivotChercheBas, brasTelescopique));
|
||||||
manette2.povLeft().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheHaut, brasTelescopique::PivotChercheHaut, brasTelescopique));
|
manette2.povLeft().toggleOnTrue(Commands.startEnd(brasTelescopique::PivotChercheHaut, brasTelescopique::PivotChercheHaut, brasTelescopique));
|
||||||
manette2.rightBumper().toggleOnTrue(Commands.startEnd(null, null, null));
|
manette2.rightBumper().toggleOnTrue(Commands.startEnd(null, null, null));
|
||||||
<<<<<<< HEAD
|
|
||||||
manette2.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null));**/
|
manette2.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null));**/
|
||||||
=======
|
|
||||||
manette2.leftBumper().toggleOnTrue(Commands.startEnd(null, null, null));
|
|
||||||
|
|
||||||
>>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Command getAutonomousCommand() {
|
public Command getAutonomousCommand() {
|
||||||
|
@ -4,13 +4,18 @@
|
|||||||
|
|
||||||
package frc.robot.commands;
|
package frc.robot.commands;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||||
|
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||||
import frc.robot.subsystems.BasePilotable;
|
import frc.robot.subsystems.BasePilotable;
|
||||||
|
|
||||||
public class Gyro extends CommandBase {
|
public class Gyro extends CommandBase {
|
||||||
|
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
||||||
private BasePilotable basePilotable;
|
private BasePilotable basePilotable;
|
||||||
/** Creates a new Gyro. */
|
/** Creates a new Gyro. */
|
||||||
public Gyro(BasePilotable basePilotable) {
|
public Gyro(BasePilotable basePilotable) {
|
||||||
|
teb.add("angleGyro", 0.1);
|
||||||
|
teb.add("vitesseGyro", 0.1);
|
||||||
this.basePilotable = basePilotable;
|
this.basePilotable = basePilotable;
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
addRequirements(basePilotable);
|
addRequirements(basePilotable);
|
||||||
|
@ -8,7 +8,6 @@ import com.kauailabs.navx.frc.AHRS;
|
|||||||
import com.revrobotics.CANSparkMax;
|
import com.revrobotics.CANSparkMax;
|
||||||
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
|
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
|
||||||
import edu.wpi.first.wpilibj.DoubleSolenoid;
|
import edu.wpi.first.wpilibj.DoubleSolenoid;
|
||||||
import edu.wpi.first.wpilibj.DriverStation;
|
|
||||||
import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
||||||
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
|
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
|
||||||
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
||||||
|
@ -14,11 +14,7 @@ import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
|||||||
import frc.robot.Constants;
|
import frc.robot.Constants;
|
||||||
|
|
||||||
public class Gratte extends SubsystemBase {
|
public class Gratte extends SubsystemBase {
|
||||||
<<<<<<< HEAD
|
|
||||||
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
||||||
=======
|
|
||||||
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
|
||||||
>>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0
|
|
||||||
ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb")
|
ShuffleboardLayout limitswitchgratte = Shuffleboard.getTab("teb")
|
||||||
.getLayout("limitswitchsgratte", BuiltInLayouts.kList)
|
.getLayout("limitswitchsgratte", BuiltInLayouts.kList)
|
||||||
.withSize(2, 2);
|
.withSize(2, 2);
|
||||||
@ -45,7 +41,12 @@ public boolean baiser;
|
|||||||
return limitbg.get();
|
return limitbg.get();
|
||||||
}
|
}
|
||||||
/** Creates a new Gratte. */
|
/** Creates a new Gratte. */
|
||||||
public Gratte() {}
|
public Gratte() {
|
||||||
|
limitswitchgratte.add ("limitbd", 0.1);
|
||||||
|
limitswitchgratte.add ("limithg", 0.1);
|
||||||
|
limitswitchgratte.add ("limithd", 0.1);
|
||||||
|
limitswitchgratte.add ("limitbg", 0.1);
|
||||||
|
}
|
||||||
public void Lever(double vitesse){
|
public void Lever(double vitesse){
|
||||||
Gratted.set(vitesse);
|
Gratted.set(vitesse);
|
||||||
Gratteg.set(vitesse);
|
Gratteg.set(vitesse);
|
||||||
@ -56,14 +57,7 @@ public boolean baiser;
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {
|
public void periodic() {
|
||||||
teb .add("limithd", 0.1);
|
|
||||||
teb .add("limithg", 0.1);
|
|
||||||
teb .add("limitbd", 0.1);
|
|
||||||
teb .add("limitbg", 0.1);
|
|
||||||
limitswitchgratte.add ("limitbd", 0.1);
|
|
||||||
limitswitchgratte.add ("limithg", 0.1);
|
|
||||||
limitswitchgratte.add ("limithd", 0.1);
|
|
||||||
limitswitchgratte.add ("limitbg", 0.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean basd() {
|
public boolean basd() {
|
||||||
|
@ -21,6 +21,8 @@ public class Limelight extends SubsystemBase {
|
|||||||
PhotonCamera limelight = new PhotonCamera("limelight");
|
PhotonCamera limelight = new PhotonCamera("limelight");
|
||||||
/** Creates a new Limelight. */
|
/** Creates a new Limelight. */
|
||||||
public Limelight() {
|
public Limelight() {
|
||||||
|
CameraServer.startAutomaticCapture();
|
||||||
|
teb .add("limelight", 0.1);
|
||||||
PortForwarder.add(5800, "photonvision.local", 5800);
|
PortForwarder.add(5800, "photonvision.local", 5800);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +60,5 @@ public class Limelight extends SubsystemBase {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {
|
public void periodic() {
|
||||||
CameraServer.startAutomaticCapture();
|
|
||||||
teb .add("limelight", 0.1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,16 +24,10 @@ public class BrasTelescopique extends SubsystemBase {
|
|||||||
ShuffleboardLayout layout = Shuffleboard.getTab("teb")
|
ShuffleboardLayout layout = Shuffleboard.getTab("teb")
|
||||||
.getLayout("layout", BuiltInLayouts.kList)
|
.getLayout("layout", BuiltInLayouts.kList)
|
||||||
.withSize(2, 2);
|
.withSize(2, 2);
|
||||||
<<<<<<< HEAD
|
|
||||||
ShuffleboardLayout bras = Shuffleboard.getTab("teb")
|
ShuffleboardLayout bras = Shuffleboard.getTab("teb")
|
||||||
.getLayout("bras", BuiltInLayouts.kList)
|
.getLayout("bras", BuiltInLayouts.kList)
|
||||||
.withSize(2, 2);
|
.withSize(2, 2);
|
||||||
=======
|
|
||||||
|
|
||||||
ShuffleboardLayout bras = Shuffleboard.getTab("teb")
|
|
||||||
.getLayout("bras", BuiltInLayouts.kList)
|
|
||||||
.withSize(2, 2);
|
|
||||||
>>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0
|
|
||||||
/** Creates a new BrasTelescopique. */
|
/** Creates a new BrasTelescopique. */
|
||||||
public BrasTelescopique() {}
|
public BrasTelescopique() {}
|
||||||
final CANSparkMax Winch = new CANSparkMax(Constants.BrasTelescopique,MotorType.kBrushless);
|
final CANSparkMax Winch = new CANSparkMax(Constants.BrasTelescopique,MotorType.kBrushless);
|
||||||
|
@ -8,7 +8,6 @@ import edu.wpi.first.wpilibj.DoubleSolenoid;
|
|||||||
import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
|
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
|
||||||
|
|
||||||
import frc.robot.Constants;
|
import frc.robot.Constants;
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,11 +14,8 @@ import com.revrobotics.CANSparkMax;
|
|||||||
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
|
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
|
||||||
|
|
||||||
public class Pivot extends SubsystemBase {
|
public class Pivot extends SubsystemBase {
|
||||||
<<<<<<< HEAD
|
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
||||||
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
|
||||||
=======
|
|
||||||
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
|
||||||
>>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0
|
|
||||||
// moteur
|
// moteur
|
||||||
private CANSparkMax pivot = new CANSparkMax(Constants.pivot,MotorType.kBrushless);
|
private CANSparkMax pivot = new CANSparkMax(Constants.pivot,MotorType.kBrushless);
|
||||||
private DigitalInput limitpivot = new DigitalInput(Constants.limitpivot);
|
private DigitalInput limitpivot = new DigitalInput(Constants.limitpivot);
|
||||||
@ -27,6 +24,10 @@ ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
|||||||
public void monteDescendre(double vitesse) {
|
public void monteDescendre(double vitesse) {
|
||||||
pivot.set (vitesse);
|
pivot.set (vitesse);
|
||||||
}
|
}
|
||||||
|
public Pivot(){
|
||||||
|
teb .add ("encodeurpivot",0.1);
|
||||||
|
teb .add ("limitpivot",0.1);
|
||||||
|
}
|
||||||
// encodeur
|
// encodeur
|
||||||
public double distance(){
|
public double distance(){
|
||||||
return (pivot.getEncoder().getPosition());
|
return (pivot.getEncoder().getPosition());
|
||||||
@ -40,17 +41,6 @@ ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {
|
public void periodic() {
|
||||||
teb .add("encodeur", 0.1);
|
|
||||||
teb .add ("encodeur pivot",0.1);
|
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=======
|
|
||||||
{
|
|
||||||
teb.add ("encodeur pivot",0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>>>>>>> cd7604e30f9d6c974930cf5af86554639315c8a0
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user