Hi,
We are using limelight for aiming. However we can’t pull the X data, it always gives a 0.0 value.
import edu.wpi.first.networktables.NetworkTable;
import edu.wpi.first.networktables.NetworkTableEntry;
import edu.wpi.first.networktables.NetworkTableInstance;
NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight");
NetworkTableEntry tx = table.getEntry("tx");
double targetOffsetAngle_Horizontal = tx.getDouble(0.0);
if (targetOffsetAngle_Horizontal > 10) {
turretdon.set(0.1); // sol icin +
}
else if (targetOffsetAngle_Horizontal < -10){
turretdon.set(-0.1); // sağ icin -
}
else {
shooter1.set(-1);
shooter2.set(1);
turretroller.set(1);
kasnak.set(-1);
}
Thanks,