dashboard
This commit is contained in:
parent
df71095e4d
commit
8bee4280be
@ -6,7 +6,6 @@ package frc.robot.commands;
|
|||||||
|
|
||||||
|
|
||||||
import edu.wpi.first.networktables.GenericEntry;
|
import edu.wpi.first.networktables.GenericEntry;
|
||||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
|
||||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||||
import frc.robot.subsystems.Accumulateur;
|
import frc.robot.subsystems.Accumulateur;
|
||||||
import frc.robot.subsystems.Lanceur;
|
import frc.robot.subsystems.Lanceur;
|
||||||
@ -20,7 +19,7 @@ public class Force1 extends CommandBase {
|
|||||||
public Force1(Lanceur lanceur,Accumulateur accumulateur, GenericEntry force1) {
|
public Force1(Lanceur lanceur,Accumulateur accumulateur, GenericEntry force1) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
this.accumulateur = accumulateur;
|
this.accumulateur = accumulateur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur, accumulateur);
|
||||||
this.force1 = force1;
|
this.force1 = force1;
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
}
|
}
|
||||||
@ -34,9 +33,8 @@ public class Force1 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(force1.getDouble(0));
|
lanceur.lancer(force1.getDouble(100));
|
||||||
double vitesse = (600);
|
double vitesse = (100);
|
||||||
lanceur.lancer(100);
|
|
||||||
if (lanceur.vitesse() > vitesse ){
|
if (lanceur.vitesse() > vitesse ){
|
||||||
accumulateur.tourneavant();
|
accumulateur.tourneavant();
|
||||||
accumulateur.tournearriere();
|
accumulateur.tournearriere();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
package frc.robot.commands;
|
package frc.robot.commands;
|
||||||
|
|
||||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
import edu.wpi.first.networktables.GenericEntry;
|
||||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||||
import frc.robot.subsystems.Accumulateur;
|
import frc.robot.subsystems.Accumulateur;
|
||||||
import frc.robot.subsystems.Lanceur;
|
import frc.robot.subsystems.Lanceur;
|
||||||
@ -12,12 +12,13 @@ import frc.robot.subsystems.Lanceur;
|
|||||||
public class Force2 extends CommandBase {
|
public class Force2 extends CommandBase {
|
||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
private Accumulateur accumulateur;
|
private Accumulateur accumulateur;
|
||||||
|
GenericEntry force2;
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force2(Lanceur lancer,Accumulateur accumulateur) {
|
public Force2(Lanceur lanceur,Accumulateur accumulateur, GenericEntry force2) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
this.accumulateur = accumulateur;
|
this.accumulateur = accumulateur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur, accumulateur);
|
||||||
|
this.force2 = force2;
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ public class Force2 extends CommandBase {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
double vitesse = (200);
|
double vitesse = (200);
|
||||||
lanceur.lancer(200);
|
lanceur.lancer(force2.getDouble(200));
|
||||||
if (lanceur.vitesse() > vitesse ){
|
if (lanceur.vitesse() > vitesse ){
|
||||||
accumulateur.tourneavant();
|
accumulateur.tourneavant();
|
||||||
accumulateur.tournearriere();
|
accumulateur.tournearriere();
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
package frc.robot.commands;
|
package frc.robot.commands;
|
||||||
import frc.robot.subsystems.Accumulateur;
|
import frc.robot.subsystems.Accumulateur;
|
||||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
|
||||||
|
|
||||||
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;
|
||||||
@ -18,18 +18,14 @@ public class Force3 extends CommandBase {
|
|||||||
|
|
||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
private Accumulateur accumulateur;
|
private Accumulateur accumulateur;
|
||||||
|
|
||||||
public void Lancer(Lanceur lanceur) {
|
|
||||||
this.lanceur = lanceur;
|
|
||||||
this.accumulateur = accumulateur;
|
|
||||||
addRequirements(lanceur , accumulateur);}
|
|
||||||
|
|
||||||
GenericEntry force3;
|
GenericEntry force3;
|
||||||
|
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force3(Lanceur lanceur,GenericEntry force3) {
|
public Force3(Lanceur lanceur,GenericEntry force3, Accumulateur accumulateur) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur, accumulateur);
|
||||||
this.force3 = force3;
|
this.force3 = force3;
|
||||||
|
this.accumulateur = accumulateur;
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +40,7 @@ public class Force3 extends CommandBase {
|
|||||||
public void execute() {
|
public void execute() {
|
||||||
|
|
||||||
double vitesse = (300);
|
double vitesse = (300);
|
||||||
lanceur.lancer(300);
|
lanceur.lancer(force3.getDouble(300));
|
||||||
if (lanceur.vitesse() > vitesse ){
|
if (lanceur.vitesse() > vitesse ){
|
||||||
accumulateur.tourneavant();
|
accumulateur.tourneavant();
|
||||||
accumulateur.tournearriere();
|
accumulateur.tournearriere();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
package frc.robot.commands;
|
package frc.robot.commands;
|
||||||
import frc.robot.subsystems.Accumulateur;
|
import frc.robot.subsystems.Accumulateur;
|
||||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
|
||||||
|
|
||||||
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;
|
||||||
@ -14,17 +14,14 @@ public class Force4 extends CommandBase {
|
|||||||
|
|
||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
private Accumulateur accumulateur;
|
private Accumulateur accumulateur;
|
||||||
|
|
||||||
public void Lancer(Lanceur lanceur) {
|
|
||||||
this.lanceur = lanceur;
|
|
||||||
this.accumulateur = accumulateur;
|
|
||||||
addRequirements(lanceur , accumulateur);}
|
|
||||||
GenericEntry force4;
|
GenericEntry force4;
|
||||||
|
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force4(Lanceur lanceur,GenericEntry force4) {
|
public Force4(Lanceur lanceur,GenericEntry force4, Accumulateur accumulateur) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur, accumulateur);
|
||||||
this.force4 = force4;
|
this.force4 = force4;
|
||||||
|
this.accumulateur = accumulateur;
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +35,7 @@ public class Force4 extends CommandBase {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
double vitesse = (400);
|
double vitesse = (400);
|
||||||
lanceur.lancer(400);
|
lanceur.lancer(force4.getDouble(400));
|
||||||
if (lanceur.vitesse() > vitesse ){
|
if (lanceur.vitesse() > vitesse ){
|
||||||
accumulateur.tourneavant();
|
accumulateur.tourneavant();
|
||||||
accumulateur.tournearriere();
|
accumulateur.tournearriere();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
package frc.robot.commands;
|
package frc.robot.commands;
|
||||||
import frc.robot.subsystems.Accumulateur;
|
import frc.robot.subsystems.Accumulateur;
|
||||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
|
||||||
|
|
||||||
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;
|
||||||
@ -14,17 +14,14 @@ public class Force5 extends CommandBase {
|
|||||||
|
|
||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
private Accumulateur accumulateur;
|
private Accumulateur accumulateur;
|
||||||
|
|
||||||
public void Lancer(Lanceur lanceur) {
|
|
||||||
this.lanceur = lanceur;
|
|
||||||
this.accumulateur = accumulateur;
|
|
||||||
addRequirements(lanceur , accumulateur);}
|
|
||||||
GenericEntry force5;
|
GenericEntry force5;
|
||||||
|
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force5(Lanceur lanceur,GenericEntry force5) {
|
public Force5(Lanceur lanceur,GenericEntry force5, Accumulateur accumulateur) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur, accumulateur);
|
||||||
this.force5 = force5;
|
this.force5 = force5;
|
||||||
|
this.accumulateur = accumulateur;
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +35,7 @@ public class Force5 extends CommandBase {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
double vitesse = (500);
|
double vitesse = (500);
|
||||||
lanceur.lancer(500);
|
lanceur.lancer(force5.getDouble(500));
|
||||||
if (lanceur.vitesse() > vitesse ){
|
if (lanceur.vitesse() > vitesse ){
|
||||||
accumulateur.tourneavant();
|
accumulateur.tourneavant();
|
||||||
accumulateur.tournearriere();
|
accumulateur.tournearriere();
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
package frc.robot.commands;
|
package frc.robot.commands;
|
||||||
import frc.robot.subsystems.Accumulateur;
|
import frc.robot.subsystems.Accumulateur;
|
||||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
|
||||||
|
|
||||||
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;
|
||||||
@ -14,18 +12,15 @@ public class Force6 extends CommandBase {
|
|||||||
|
|
||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
private Accumulateur accumulateur;
|
private Accumulateur accumulateur;
|
||||||
|
|
||||||
public void Lancer(Lanceur lanceur) {
|
|
||||||
this.lanceur = lanceur;
|
|
||||||
this.accumulateur = accumulateur;
|
|
||||||
addRequirements(lanceur , accumulateur);
|
|
||||||
}
|
|
||||||
GenericEntry force6;
|
GenericEntry force6;
|
||||||
|
|
||||||
|
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force6(Lanceur lanceur, GenericEntry force6) {
|
public Force6(Lanceur lanceur, GenericEntry force6, Accumulateur accumulateur) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur, accumulateur);
|
||||||
this.force6 = force6;
|
this.force6 = force6;
|
||||||
|
this.accumulateur = accumulateur;
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +34,7 @@ public class Force6 extends CommandBase {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
double vitesse = (600);
|
double vitesse = (600);
|
||||||
lanceur.lancer(600);
|
lanceur.lancer(force6.getDouble(600));
|
||||||
if (lanceur.vitesse() > vitesse ){
|
if (lanceur.vitesse() > vitesse ){
|
||||||
accumulateur.tourneavant();
|
accumulateur.tourneavant();
|
||||||
accumulateur.tournearriere();
|
accumulateur.tournearriere();
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
package frc.robot.commands;
|
package frc.robot.commands;
|
||||||
import frc.robot.subsystems.Accumulateur;
|
import frc.robot.subsystems.Accumulateur;
|
||||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
|
||||||
|
|
||||||
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;
|
||||||
@ -14,17 +12,14 @@ public class Force7 extends CommandBase {
|
|||||||
|
|
||||||
private Lanceur lanceur;
|
private Lanceur lanceur;
|
||||||
private Accumulateur accumulateur;
|
private Accumulateur accumulateur;
|
||||||
|
|
||||||
public void Lancer(Lanceur lanceur) {
|
|
||||||
this.lanceur = lanceur;
|
|
||||||
this.accumulateur = accumulateur;
|
|
||||||
addRequirements(lanceur , accumulateur);}
|
|
||||||
GenericEntry force7;
|
GenericEntry force7;
|
||||||
|
|
||||||
/** Creates a new Force1. */
|
/** Creates a new Force1. */
|
||||||
public Force7(Lanceur lanceur,GenericEntry force7) {
|
public Force7(Lanceur lanceur,GenericEntry force7, Accumulateur accumulateur) {
|
||||||
this.lanceur = lanceur;
|
this.lanceur = lanceur;
|
||||||
addRequirements(lanceur);
|
addRequirements(lanceur, accumulateur);
|
||||||
this.force7 = force7;
|
this.force7 = force7;
|
||||||
|
this.accumulateur = accumulateur;
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +33,7 @@ public class Force7 extends CommandBase {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
double vitesse = (700);
|
double vitesse = (700);
|
||||||
lanceur.lancer(700);
|
lanceur.lancer(force7.getDouble(700));
|
||||||
if (lanceur.vitesse() > vitesse ){
|
if (lanceur.vitesse() > vitesse ){
|
||||||
accumulateur.tourneavant();
|
accumulateur.tourneavant();
|
||||||
accumulateur.tournearriere();
|
accumulateur.tournearriere();
|
||||||
|
@ -7,7 +7,7 @@ package frc.robot.subsystems;
|
|||||||
|
|
||||||
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
|
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
|
||||||
|
|
||||||
import edu.wpi.first.wpilibj.DigitalInput;
|
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
import frc.robot.Constants;
|
import frc.robot.Constants;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user