Merge branch 'main' of https://demerso.net/pls5618/2023/robot
This commit is contained in:
commit
eedeedf332
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/classes/java/main/frc/robot/subsystems/Pince.class
Normal file
BIN
build/classes/java/main/frc/robot/subsystems/Pince.class
Normal file
Binary file not shown.
BIN
build/classes/java/main/frc/robot/subsystems/Pivot.class
Normal file
BIN
build/classes/java/main/frc/robot/subsystems/Pivot.class
Normal file
Binary file not shown.
@ -21,28 +21,6 @@ public class Constants {
|
|||||||
public static int limithd = 3;
|
public static int limithd = 3;
|
||||||
public static int limithg = 1;
|
public static int limithg = 1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static int BrasTelescopique = 5;
|
public static int BrasTelescopique = 5;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
|
|
||||||
public static int actuateur = 4;
|
|
||||||
|
|
||||||
public static int actuateur = 4;
|
|
||||||
// pneumatique
|
|
||||||
public static int pistonpinceouvre = 0;
|
|
||||||
public static int pistonpinceferme = 1;
|
|
||||||
public static int BrasTelescopique = 5;
|
|
||||||
public static int actuateur = 4;
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> 0c37463a91f99a8623a1405743145ad70a140362
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -33,7 +33,7 @@ public class Gyro extends CommandBase {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
basvjePilotable.drive(0, 0, 0);
|
basePilotable.drive(0, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ import com.revrobotics.CANSparkMaxLowLevel.MotorType;
|
|||||||
|
|
||||||
import edu.wpi.first.wpilibj.DoubleSolenoid;
|
import edu.wpi.first.wpilibj.DoubleSolenoid;
|
||||||
import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
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.drive.DifferentialDrive;
|
||||||
import edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup;
|
import edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup;
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
@ -23,8 +24,11 @@ public class BasePilotable extends SubsystemBase {
|
|||||||
final MotorControllerGroup droit = new MotorControllerGroup(avantdroit, arrieredroit);
|
final MotorControllerGroup droit = new MotorControllerGroup(avantdroit, arrieredroit);
|
||||||
final MotorControllerGroup gauche = new MotorControllerGroup(avantgauche, arrieregauche);
|
final MotorControllerGroup gauche = new MotorControllerGroup(avantgauche, arrieregauche);
|
||||||
final DifferentialDrive drive = new DifferentialDrive(gauche, droit);
|
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
|
||||||
private AHRS gyroscope = new AHRS();public double getangle() {return gyroscope.getAngle();}
|
private AHRS gyroscope = new AHRS();public double getangle() {return gyroscope.getAngle();}
|
||||||
|
|
||||||
public double getpitch() {
|
public double getpitch() {
|
||||||
return gyroscope.getPitch();
|
return gyroscope.getPitch();
|
||||||
}
|
}
|
||||||
@ -44,7 +48,14 @@ public class BasePilotable extends SubsystemBase {
|
|||||||
arrieredroit.getEncoder().setPosition(0);
|
arrieredroit.getEncoder().setPosition(0);
|
||||||
arrieregauche.getEncoder().setPosition(0);
|
arrieregauche.getEncoder().setPosition(0);
|
||||||
}
|
}
|
||||||
|
public void BrakeOuvre(){
|
||||||
|
brakedroit.set(Value.kForward);
|
||||||
|
brakegauche.set(Value.kForward);
|
||||||
|
}
|
||||||
|
public void BrakeFerme(){
|
||||||
|
brakedroit.set(Value.kReverse);
|
||||||
|
brakegauche.set(Value.kReverse);
|
||||||
|
}
|
||||||
/** 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