subsystem limelight

This commit is contained in:
Antoine PerreaultE 2024-02-07 18:35:35 -05:00
parent da4342e456
commit fcac077def

View File

@ -9,8 +9,6 @@ import edu.wpi.first.networktables.NetworkTable;
import edu.wpi.first.networktables.NetworkTableEntry; import edu.wpi.first.networktables.NetworkTableEntry;
import edu.wpi.first.networktables.NetworkTableInstance; import edu.wpi.first.networktables.NetworkTableInstance;
import edu.wpi.first.wpilibj2.command.SubsystemBase; import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.LimelightHelpers;
public class Limelight extends SubsystemBase { public class Limelight extends SubsystemBase {
@ -22,10 +20,11 @@ public class Limelight extends SubsystemBase {
NetworkTableEntry pipeline = table.getEntry("pipeline"); NetworkTableEntry pipeline = table.getEntry("pipeline");
NetworkTableEntry tv = table.getEntry("tv"); NetworkTableEntry tv = table.getEntry("tv");
NetworkTableEntry camMode = table.getEntry("camMode"); NetworkTableEntry camMode = table.getEntry("camMode");
NetworkTableEntry tid = table.getEntry("tid");
/** Creates a new Limelight. */ /** Creates a new Limelight. */
public Limelight() { public Limelight() {
} }
public double getx(){ public double getx(){
@ -40,11 +39,14 @@ public class Limelight extends SubsystemBase {
public boolean getv(){ public boolean getv(){
return tv.getBoolean(false); return tv.getBoolean(false);
} }
public double getpipeline(){ public void setpipeline(){
return pipeline.getDouble(0); pipeline.setNumber(0);
} }
public double getcamMode(){ public void setcamMode(){
return camMode.getDouble(0); camMode.setNumber(0);
}
public double getTid(){
return tid.getDouble(0);
} }
@Override @Override