Compare commits
No commits in common. "1a899887da5be6ee849ba2237e7f7d34f3334a95" and "ee263139c1a7518415b4eb883f54e220d564ed3b" have entirely different histories.
1a899887da
...
ee263139c1
@ -1,28 +0,0 @@
|
||||
// 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.wpilibj2.command.SubsystemBase;
|
||||
import edu.wpi.first.networktables.NetworkTable;
|
||||
import edu.wpi.first.networktables.NetworkTableEntry;
|
||||
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||
public class Limelight extends SubsystemBase {
|
||||
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight");
|
||||
NetworkTableEntry tx = table.getEntry("tx");
|
||||
NetworkTableEntry ty = table.getEntry("ty");
|
||||
NetworkTableEntry ta = table.getEntry("ta");
|
||||
|
||||
//read values periodically
|
||||
double x = tx.getDouble(0.0);
|
||||
double y = ty.getDouble(0.0);
|
||||
double area = ta.getDouble(0.0);
|
||||
/** Creates a new Limelight. */
|
||||
public Limelight() {}
|
||||
|
||||
@Override
|
||||
public void periodic() {
|
||||
// This method will be called once per scheduler run
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user