piston
This commit is contained in:
parent
d8af12135e
commit
a62698d641
@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "java"
|
id "java"
|
||||||
id "edu.wpi.first.GradleRIO" version "2024.1.1"
|
id "edu.wpi.first.GradleRIO" version "2024.2.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
@ -22,14 +22,14 @@ public class Pistongrimpeur extends Command {
|
|||||||
// Called when the command is initially scheduled.
|
// Called when the command is initially scheduled.
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
grimpeur.pistondroiteouvre();
|
grimpeur.pistonouvre();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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() {
|
||||||
|
|
||||||
if(grimpeur.pistondgaucheouvre()){
|
if(grimpeur.piston()){
|
||||||
LED.couleur(0, 0, 255);
|
LED.couleur(0, 0, 255);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,13 +77,17 @@ public AHRS gyroscope = new AHRS();
|
|||||||
public double getpitch(){
|
public double getpitch(){
|
||||||
return gyroscope.getPitch();
|
return gyroscope.getPitch();
|
||||||
}
|
}
|
||||||
public boolean pistondroiteouvre(){
|
public void pistonferme(){
|
||||||
return pistondroite.get();
|
pistondroite.set(true);
|
||||||
|
pistondgauche.set(true);
|
||||||
}
|
}
|
||||||
public boolean pistondgaucheouvre(){
|
public void pistonouvre(){
|
||||||
|
pistondgauche.set(false);
|
||||||
|
pistondroite.set(false);
|
||||||
|
}
|
||||||
|
public boolean piston(){
|
||||||
return pistondgauche.get();
|
return pistondgauche.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {
|
public void periodic() {
|
||||||
// This method will be called once per scheduler run
|
// This method will be called once per scheduler run
|
||||||
|
Loading…
x
Reference in New Issue
Block a user