Merge remote-tracking branch 'origin/main' into 3-poussoir
This commit is contained in:
commit
18a235dae8
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
package frc.robot;
|
package frc.robot;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean
|
* The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean
|
||||||
* constants. This class should not be used for any other purpose. All constants should be declared
|
* constants. This class should not be used for any other purpose. All constants should be declared
|
||||||
@ -15,4 +17,6 @@ package frc.robot;
|
|||||||
public final class Constants {
|
public final class Constants {
|
||||||
public static final int PistonPousserR = 0;
|
public static final int PistonPousserR = 0;
|
||||||
public static final int PistonPousserF = 1;
|
public static final int PistonPousserF = 1;
|
||||||
|
public static final int pistonQuiShakef = 0;
|
||||||
|
public static final int pistonQuiShakeb = 1;
|
||||||
}
|
}
|
||||||
|
34
src/main/java/frc/robot/commands/Activer_poussoir.java
Normal file
34
src/main/java/frc/robot/commands/Activer_poussoir.java
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// Copyright (c) FIRST and other WPILib contributors.
|
||||||
|
// Open Source Software; you can modify and/or share it under the terms of
|
||||||
|
// the WPILib BSD license file in the root directory of this project.
|
||||||
|
|
||||||
|
package frc.robot.commands;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj2.command.CommandBase;
|
||||||
|
|
||||||
|
public class Activer_poussoir extends CommandBase {
|
||||||
|
/** Creates a new Activer_poussoir. */
|
||||||
|
public Activer_poussoir() {
|
||||||
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called when the command is initially scheduled.
|
||||||
|
@Override
|
||||||
|
public void initialize() {}
|
||||||
|
|
||||||
|
// Called every time the scheduler runs while the command is scheduled.
|
||||||
|
@Override
|
||||||
|
public void execute() {}
|
||||||
|
|
||||||
|
// Called once the command ends or is interrupted.
|
||||||
|
@Override
|
||||||
|
public void end(boolean interrupted) {}
|
||||||
|
|
||||||
|
// Returns true when the command should end.
|
||||||
|
@Override
|
||||||
|
public boolean isFinished() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
32
src/main/java/frc/robot/subsystems/Pistonshaker.java
Normal file
32
src/main/java/frc/robot/subsystems/Pistonshaker.java
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
// Copyright (c) FIRST and other WPILib contributors.
|
||||||
|
// Open Source Software; you can modify and/or share it under the terms of
|
||||||
|
// the WPILib BSD license file in the root directory of this project.
|
||||||
|
|
||||||
|
package frc.robot.subsystems;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj.DoubleSolenoid;
|
||||||
|
import edu.wpi.first.wpilibj.PneumaticsModuleType;
|
||||||
|
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
|
||||||
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
import frc.robot.Constants;
|
||||||
|
|
||||||
|
public class Pistonshaker extends SubsystemBase {
|
||||||
|
private DoubleSolenoid shaker = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.pistonQuiShakef,Constants.pistonQuiShakeb);
|
||||||
|
/** Creates a new pistonshaker. */
|
||||||
|
|
||||||
|
public Pistonshaker() {
|
||||||
|
|
||||||
|
}
|
||||||
|
public void sortirpiston() {
|
||||||
|
shaker.set(Value.kForward);
|
||||||
|
}
|
||||||
|
public void rentrerpiston() {
|
||||||
|
shaker.set(Value.kReverse);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void periodic() {
|
||||||
|
|
||||||
|
// This method will be called once per scheduler run
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user