conveyor修复
This commit is contained in:
@@ -15,7 +15,7 @@ public final class Constants {
|
|||||||
CrossingTrench
|
CrossingTrench
|
||||||
}
|
}
|
||||||
public class Shooter {
|
public class Shooter {
|
||||||
public static final double conveyorSpeed = 50;
|
public static final double conveyorSpeed =25;
|
||||||
public static final Slot0Configs flyWheelSlot0Configs = new Slot0Configs()
|
public static final Slot0Configs flyWheelSlot0Configs = new Slot0Configs()
|
||||||
.withKP(0.0).withKI(0).withKD(0)
|
.withKP(0.0).withKI(0).withKD(0)
|
||||||
.withKV(0.099).withKA(0.0).withKS(0.0);
|
.withKV(0.099).withKA(0.0).withKS(0.0);
|
||||||
|
|||||||
@@ -72,14 +72,13 @@ public class IntakerControls {
|
|||||||
|
|
||||||
public Command defaultIntakerCommand() {
|
public Command defaultIntakerCommand() {
|
||||||
return Commands.run(() -> {
|
return Commands.run(() -> {
|
||||||
double getterspeed = controller.getLeftTriggerAxis() * Constants.Intaker.IntakeGetterK + Constants.Intaker.Getterminspeed;
|
double getterspeed = 0;
|
||||||
double conveyoyspeedforintake = 10;
|
double conveyoyspeedforintake = 15;
|
||||||
if (controller.getLeftTriggerAxis() < 0.1) {
|
if (controller.getLeftTriggerAxis() > 0.1) {
|
||||||
getterspeed = 0;
|
//getterspeed = controller.getLeftTriggerAxis() * Constants.Intaker.IntakeGetterK + Constants.Intaker.Getterminspeed;
|
||||||
conveyoyspeedforintake = 0;
|
ShooterSubsystem.setConveyorSpeedByRPS(conveyoyspeedforintake);
|
||||||
}
|
}
|
||||||
IntakerSubsystem.setIntakerGetterSpeed(getterspeed);
|
IntakerSubsystem.setIntakerGetterSpeed(getterspeed);
|
||||||
ShooterSubsystem.setConveyorSpeedByRPS(conveyoyspeedforintake);
|
|
||||||
|
|
||||||
if(controller.getLeftY() < -0.5){
|
if(controller.getLeftY() < -0.5){
|
||||||
IntakerSubsystem.IntakerUpNonStop();
|
IntakerSubsystem.IntakerUpNonStop();
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class ShooterControls {
|
|||||||
flywheelSpeed = 0;
|
flywheelSpeed = 0;
|
||||||
conveyorSpeed = 0;
|
conveyorSpeed = 0;
|
||||||
}
|
}
|
||||||
if(shooterSubsystem.flywheelMotorLeft.getVelocity().getValueAsDouble()<flywheelSpeed*0.7){
|
if(shooterSubsystem.flywheelMotorLeft.getVelocity().getValueAsDouble()<flywheelSpeed*0.95){
|
||||||
conveyorSpeed = 0;
|
conveyorSpeed = 0;
|
||||||
}
|
}
|
||||||
shooterControlTable.getEntry("flywheelTargetSpeed").setDouble(flywheelSpeed);
|
shooterControlTable.getEntry("flywheelTargetSpeed").setDouble(flywheelSpeed);
|
||||||
@@ -76,9 +76,9 @@ public class ShooterControls {
|
|||||||
flywheelSpeed = 0;
|
flywheelSpeed = 0;
|
||||||
conveyorSpeed = 0;
|
conveyorSpeed = 0;
|
||||||
}
|
}
|
||||||
// if(shooterSubsystem.flywheelMotorLeft.getVelocity().getValueAsDouble()<flywheelSpeed*0.7){
|
if(shooterSubsystem.flywheelMotorLeft.getVelocity().getValueAsDouble()<flywheelSpeed*0.95){
|
||||||
// conveyorSpeed = 0;
|
conveyorSpeed = 0;
|
||||||
// }
|
}
|
||||||
shooterControlTable.getEntry("flywheelTargetSpeed").setDouble(flywheelSpeed);
|
shooterControlTable.getEntry("flywheelTargetSpeed").setDouble(flywheelSpeed);
|
||||||
shooterControlTable.getEntry("conveyerTargetSpeed").setDouble(conveyorSpeed);
|
shooterControlTable.getEntry("conveyerTargetSpeed").setDouble(conveyorSpeed);
|
||||||
shooterControlTable.getEntry("backboardTargetPosition").setDouble(backboardPosition);
|
shooterControlTable.getEntry("backboardTargetPosition").setDouble(backboardPosition);
|
||||||
|
|||||||
Reference in New Issue
Block a user