Merge branch 'main' of https://demerso.net/pls5618/2023/robot
This commit is contained in:
commit
29eb108a85
@ -77,7 +77,6 @@ public RobotContainer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Command getAutonomousCommand() {
|
public Command getAutonomousCommand() {
|
||||||
return Commands.print("No autonomous command configured");
|
|
||||||
return new SequentialCommandGroup(
|
return new SequentialCommandGroup(
|
||||||
new PivoteBrasMilieux(brasTelescopique, pivot),
|
new PivoteBrasMilieux(brasTelescopique, pivot),
|
||||||
new OuvrePince(pince),
|
new OuvrePince(pince),
|
||||||
|
@ -25,15 +25,15 @@ public class Gyro extends CommandBase {
|
|||||||
public void execute() {
|
public void execute() {
|
||||||
if(basePilotable.getpitch()<10)
|
if(basePilotable.getpitch()<10)
|
||||||
{
|
{
|
||||||
basePilotable.drive(0.4, 0, 0);
|
basePilotable.drive(0.4, 0);
|
||||||
}
|
}
|
||||||
else if(basePilotable.getpitch()>-10)
|
else if(basePilotable.getpitch()>-10)
|
||||||
{
|
{
|
||||||
basePilotable.drive(-0.4, 0, 0);
|
basePilotable.drive(-0.4, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
basePilotable.drive(0, 0, 0);
|
basePilotable.drive(0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ public class Reculer extends CommandBase {
|
|||||||
// Called every time the scheduler runs while the command is scheduled.
|
// Called every time the scheduler runs while the command is scheduled.
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
basePilotable.drive(0.2, 0, 0);
|
basePilotable.drive(0.2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
// Called once the command ends or is interrupted.
|
||||||
|
@ -32,7 +32,7 @@ public class BasePilotable extends SubsystemBase {
|
|||||||
return gyroscope.getPitch();
|
return gyroscope.getPitch();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drive(double xSpeed, double zRotation, double d){
|
public void drive(double xSpeed, double zRotation){
|
||||||
drive.arcadeDrive(xSpeed, zRotation);
|
drive.arcadeDrive(xSpeed, zRotation);
|
||||||
}
|
}
|
||||||
public double distance(){
|
public double distance(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user