kjgu][f
This commit is contained in:
parent
a50cbc2cf5
commit
cea457445c
Binary file not shown.
@ -12,9 +12,7 @@ import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
|||||||
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
|
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.wpilibj.shuffleboard.BuiltInLayouts;
|
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout;
|
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
import frc.robot.Constants;
|
import frc.robot.Constants;
|
||||||
@ -33,9 +31,6 @@ public class BasePilotable extends SubsystemBase {
|
|||||||
private DoubleSolenoid brakegauche = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakegauche, Constants.brakegauche);
|
private DoubleSolenoid brakegauche = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakegauche, Constants.brakegauche);
|
||||||
//gyro
|
//gyro
|
||||||
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
||||||
ShuffleboardLayout layout = Shuffleboard.getTab("teb")
|
|
||||||
.getLayout ("distance", BuiltInLayouts.kList)
|
|
||||||
.withSize(2, 2);
|
|
||||||
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();
|
||||||
@ -70,7 +65,7 @@ public void resetGyro(){
|
|||||||
/** Creates a new BasePilotable. */
|
/** Creates a new BasePilotable. */
|
||||||
public BasePilotable() {
|
public BasePilotable() {
|
||||||
droit.setInverted(true);
|
droit.setInverted(true);
|
||||||
layout .addDouble("distance", this::distance);
|
teb .addDouble("distance", this::distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -12,27 +12,18 @@ import edu.wpi.first.wpilibj.DigitalInput;
|
|||||||
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.DoubleSolenoid.Value;
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts;
|
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout;
|
|
||||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
import frc.robot.Constants;
|
import frc.robot.Constants;
|
||||||
|
|
||||||
public class BrasTelescopique extends SubsystemBase {
|
public class BrasTelescopique extends SubsystemBase {
|
||||||
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
ShuffleboardTab teb = Shuffleboard.getTab("teb");
|
||||||
ShuffleboardLayout layout = Shuffleboard.getTab("teb")
|
|
||||||
.getLayout("layout", BuiltInLayouts.kList)
|
|
||||||
.withSize(2, 2);
|
|
||||||
ShuffleboardLayout bras = Shuffleboard.getTab("teb")
|
|
||||||
.getLayout("bras", BuiltInLayouts.kList)
|
|
||||||
.withSize(2, 2);
|
|
||||||
|
|
||||||
/** Creates a new BrasTelescopique. */
|
/** Creates a new BrasTelescopique. */
|
||||||
public BrasTelescopique() {
|
public BrasTelescopique() {
|
||||||
teb .add("photocell",0.1);
|
teb .add("photocell",0.1);
|
||||||
teb .add("winch",0.1);
|
teb .add("winch",0.1);
|
||||||
bras.add ("encodeur",0.1);}
|
teb .add ("encodeur",0.1);}
|
||||||
final CANSparkMax Winch = new CANSparkMax(Constants.BrasTelescopique,MotorType.kBrushless);
|
final CANSparkMax Winch = new CANSparkMax(Constants.BrasTelescopique,MotorType.kBrushless);
|
||||||
private DigitalInput photocell = new DigitalInput(Constants.photocell);
|
private DigitalInput photocell = new DigitalInput(Constants.photocell);
|
||||||
private DoubleSolenoid brakewinch = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakewinchf, Constants.brakewinchb);
|
private DoubleSolenoid brakewinch = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.brakewinchf, Constants.brakewinchb);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user