dsf
This commit is contained in:
parent
02669953cb
commit
be2188d63e
@ -16,6 +16,7 @@ import frc.robot.subsystems.Gratte;
|
|||||||
import frc.robot.subsystems.bras.BrasTelescopique;
|
import frc.robot.subsystems.bras.BrasTelescopique;
|
||||||
import frc.robot.subsystems.bras.Pince;
|
import frc.robot.subsystems.bras.Pince;
|
||||||
import frc.robot.subsystems.bras.Pivot;
|
import frc.robot.subsystems.bras.Pivot;
|
||||||
|
import pabeles.concurrency.ConcurrencyOps.Reset;
|
||||||
import frc.robot.subsystems.Limelight;
|
import frc.robot.subsystems.Limelight;
|
||||||
// command
|
// command
|
||||||
import frc.robot.commands.BrakeFerme;
|
import frc.robot.commands.BrakeFerme;
|
||||||
@ -66,6 +67,9 @@ public RobotContainer() {
|
|||||||
private void configureBindings() {
|
private void configureBindings() {
|
||||||
manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince));
|
manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince));
|
||||||
manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable));
|
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.start().toggleOnTrue(Commands.startEnd(basePilotable::resetGyro, basePilotable::resetGyro, basePilotable));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ 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;
|
||||||
@ -55,6 +56,10 @@ public void BrakeFerme(){
|
|||||||
brakedroit.set(Value.kReverse);
|
brakedroit.set(Value.kReverse);
|
||||||
brakegauche.set(Value.kReverse);
|
brakegauche.set(Value.kReverse);
|
||||||
}
|
}
|
||||||
|
public void resetGyro(){
|
||||||
|
try {gyroscope.reset();} catch(Exception e){DriverStation.reportError("bye bye",true);
|
||||||
|
}
|
||||||
|
}
|
||||||
/** Creates a new BasePilotable. */
|
/** Creates a new BasePilotable. */
|
||||||
public BasePilotable() {
|
public BasePilotable() {
|
||||||
droit.setInverted(true);
|
droit.setInverted(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user