khvjv
This commit is contained in:
commit
020649251b
@ -6,9 +6,20 @@ public class Constants {
|
|||||||
public static int arrieredroit = 2;
|
public static int arrieredroit = 2;
|
||||||
public static int arrieregauche = 3;
|
public static int arrieregauche = 3;
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
public static int leverGratte = 0;
|
||||||
|
public static int baisserGratte = 1;
|
||||||
|
>>>>>>> Gratte
|
||||||
// pneumatique
|
// pneumatique
|
||||||
public static int pistonpinceouvre = 0;
|
public static int pistonpinceouvre = 0;
|
||||||
public static int pistonpinceferme = 1;
|
public static int pistonpinceferme = 1;
|
||||||
|
// DIO
|
||||||
|
public static int limitbd = 0;
|
||||||
|
public static int limitbg = 2;
|
||||||
|
public static int limithd = 3;
|
||||||
|
public static int limithg = 1;
|
||||||
|
|
||||||
|
|
||||||
=======
|
=======
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@ -19,8 +30,12 @@ public class Constants {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
=======
|
=======
|
||||||
public static int actuateur = 4;
|
public static int actuateur = 4;
|
||||||
>>>>>>> 91d5a71d52bad9fc56b40c68d78207113e16cd21
|
>>>>>>> 91d5a71d52bad9fc56b40c68d78207113e16cd21
|
||||||
|
=======
|
||||||
|
public static int actuateur = 4;
|
||||||
|
>>>>>>> Gratte
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,49 @@
|
|||||||
|
|
||||||
package frc.robot.subsystems;
|
package frc.robot.subsystems;
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
|
||||||
public class Gratte extends SubsystemBase {
|
public class Gratte extends SubsystemBase {
|
||||||
/** Creates a new Gratte. */
|
/** Creates a new Gratte. */
|
||||||
public Gratte() {}
|
public Gratte() {}
|
||||||
|
|
||||||
|
=======
|
||||||
|
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
|
||||||
|
import com.fasterxml.jackson.annotation.JacksonInject.Value;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj.DigitalInput;
|
||||||
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
import frc.robot.Constants;
|
||||||
|
|
||||||
|
public class Gratte extends SubsystemBase {
|
||||||
|
private WPI_TalonSRX baisserGratte = new WPI_TalonSRX(Constants.leverGratte);
|
||||||
|
private WPI_TalonSRX leverGratte = new WPI_TalonSRX(Constants.baisserGratte);
|
||||||
|
private DigitalInput limithd = new DigitalInput(Constants.limithd);
|
||||||
|
private DigitalInput limithg = new DigitalInput(Constants.limithg);
|
||||||
|
private DigitalInput limitbd = new DigitalInput(Constants.limitbd);
|
||||||
|
private DigitalInput limitbg = new DigitalInput(Constants.limitbg);
|
||||||
|
public boolean hautd(){
|
||||||
|
return limithd.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hautg(){
|
||||||
|
return limithg.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean basd(){
|
||||||
|
return limitbd.get();
|
||||||
|
}
|
||||||
|
public boolean basg(){
|
||||||
|
return limitbg.get();
|
||||||
|
}
|
||||||
|
/** Creates a new Gratte. */
|
||||||
|
public Gratte() {}
|
||||||
|
public void BaisserLever(double vitesse){
|
||||||
|
baisserGratte.set(vitesse);
|
||||||
|
leverGratte.set(vitesse);
|
||||||
|
}
|
||||||
|
>>>>>>> Gratte
|
||||||
@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
|
||||||
|
@ -14,15 +14,12 @@ public class Pince extends SubsystemBase {
|
|||||||
private DoubleSolenoid pistonPince = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.pistonpinceouvre, Constants.pistonpinceferme);
|
private DoubleSolenoid pistonPince = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.pistonpinceouvre, Constants.pistonpinceferme);
|
||||||
/** Creates a new Pince. */
|
/** Creates a new Pince. */
|
||||||
public Pince() {
|
public Pince() {
|
||||||
|
|
||||||
}
|
}
|
||||||
public void fermer() {
|
public void fermer() {
|
||||||
pistonPince.set(Value.kReverse);
|
pistonPince.set(Value.kReverse);
|
||||||
|
|
||||||
}
|
}
|
||||||
public void ouvrir() {
|
public void ouvrir() {
|
||||||
pistonPince.set(Value.kForward);
|
pistonPince.set(Value.kForward);
|
||||||
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {
|
public void periodic() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user