forces
This commit is contained in:
parent
010d3d001d
commit
5d69880fcc
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
package frc.robot.commands;
|
package frc.robot.commands;
|
||||||
|
|
||||||
|
|
||||||
import edu.wpi.first.networktables.GenericEntry;
|
import edu.wpi.first.networktables.GenericEntry;
|
||||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||||
import frc.robot.subsystems.Lanceur;
|
import frc.robot.subsystems.Lanceur;
|
||||||
|
@ -11,8 +11,9 @@ import frc.robot.subsystems.Lanceur;
|
|||||||
public class Force2 extends CommandBase {
|
public class Force2 extends CommandBase {
|
||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
GenericEntry force2;
|
GenericEntry force2;
|
||||||
|
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force2(Lancer lancer) {
|
public Force2(Lanceur lanceur, GenericEntry force2) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur);
|
||||||
this.force2 = force2;
|
this.force2 = force2;
|
||||||
@ -28,7 +29,7 @@ public class Force2 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() {
|
||||||
lanceur.lancer(500);
|
lanceur.lancer(force2.getDouble(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
// Called once the command ends or is interrupted.
|
||||||
|
@ -12,7 +12,7 @@ public class Force3 extends CommandBase {
|
|||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
GenericEntry force3;
|
GenericEntry force3;
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force3(Lancer lancer) {
|
public Force3(Lanceur lanceur,GenericEntry force3) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur);
|
||||||
this.force3 = force3;
|
this.force3 = force3;
|
||||||
@ -28,7 +28,7 @@ public class Force3 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() {
|
||||||
lanceur.lancer(500);
|
lanceur.lancer(force3.getDouble(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
// Called once the command ends or is interrupted.
|
||||||
|
@ -12,7 +12,7 @@ public class Force4 extends CommandBase {
|
|||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
GenericEntry force4;
|
GenericEntry force4;
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force4(Lancer lancer) {
|
public Force4(Lanceur lanceur,GenericEntry force4) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur);
|
||||||
this.force4 = force4;
|
this.force4 = force4;
|
||||||
@ -28,7 +28,7 @@ public class Force4 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() {
|
||||||
lanceur.lancer(500);
|
lanceur.lancer(force4.getDouble(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
// Called once the command ends or is interrupted.
|
||||||
|
@ -12,7 +12,7 @@ public class Force5 extends CommandBase {
|
|||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
GenericEntry force5;
|
GenericEntry force5;
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force5(Lancer lancer) {
|
public Force5(Lanceur lanceur,GenericEntry force5) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur);
|
||||||
this.force5 = force5;
|
this.force5 = force5;
|
||||||
@ -28,7 +28,7 @@ public class Force5 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() {
|
||||||
lanceur.lancer(500);
|
lanceur.lancer(force5.getDouble(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
// Called once the command ends or is interrupted.
|
||||||
|
@ -12,7 +12,7 @@ public class Force6 extends CommandBase {
|
|||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
GenericEntry force6;
|
GenericEntry force6;
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force6(Lancer lancer) {
|
public Force6(Lanceur lanceur, GenericEntry force6) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur);
|
||||||
this.force6 = force6;
|
this.force6 = force6;
|
||||||
@ -28,7 +28,7 @@ public class Force6 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() {
|
||||||
lanceur.lancer(500);
|
lanceur.lancer(force6.getDouble(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
// Called once the command ends or is interrupted.
|
||||||
|
@ -12,7 +12,7 @@ public class Force7 extends CommandBase {
|
|||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
GenericEntry force7;
|
GenericEntry force7;
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force7(Lancer lancer) {
|
public Force7(Lanceur lanceur,GenericEntry force7) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur);
|
||||||
this.force7 = force7;
|
this.force7 = force7;
|
||||||
@ -28,7 +28,7 @@ public class Force7 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() {
|
||||||
lanceur.lancer(500);
|
lanceur.lancer(force7.getDouble(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
// Called once the command ends or is interrupted.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user