NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight");
double leftThrottle = driver.getRawAxis(1)*-1;
double rightThrottle = driver.getRawAxis(5)*-1;
leftDrive.set(ControlMode.PercentOutput, leftThrottle*.15);
rightDrive.set(ControlMode.PercentOutput, rightThrottle*.15);
// float Kp = -0.1f;
// float tx =
// if(driver.getRawButton(3)) {
// float headingError = tx;
// double steeringAdjust = Kp*tx;
// }
//read limelight variables
double x = tx.getDouble(0.0);
double y = ty.getDouble(0.0);
double valid = tv.getDouble(0.0);
double area = ta.getDouble(0.0);
The code shown above is the basics i have gotten for Limelight tracking. All the lines below //read limelight variables turn red for no apparent reason. Although, once i uncomment the “float tx=” line, all the errors below on those Limelight reading variables turn perfectly fine. I am wondering if this is a code error i am running into, or just something to do with the Limelight table itself.