> For the complete documentation index, see [llms.txt](https://yall.yassrobotics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yall.yassrobotics.com/documentation/understanding/limelight-settings-and-pipelines.md).

# LimelightSettings & Pipelines

`LimelightSettings` (from `limelight.getSettings()`) is the only way to change how a Limelight behaves from robot code. Every `.withXXXX()` call writes directly to a NetworkTables entry the Limelight watches — there's no local caching or batching, so changes normally apply within a frame or two. `save()` forces an immediate NT flush but rarely matters since individual writes already propagate quickly.

## Settings are write-only

The constructor fetches current values from the Limelight, but `LimelightSettings` exposes no getters. This is intentional — it exists purely as an attachment point for chained `.withXXXX()` calls, not as a settings mirror. If you need to know the *current* pipeline or LED state, read it back through [`LimelightData`](/documentation/understanding/results-json-vs-raw-networktables.md) / `LimelightPipelineData` instead.

## The settings groups

| Concern                    | Methods                                                                                                                   |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **LEDs**                   | `withLimelightLEDMode`                                                                                                    |
| **Pipeline**               | `withPipelineIndex`, `withPriorityTagId`, `withAprilTagIdFilter`, `withFiducialDownscalingOverride`, `withAprilTagOffset` |
| **Camera geometry**        | `withCameraOffset`                                                                                                        |
| **Robot state (MegaTag2)** | `withRobotOrientation`, `withImuMode`, `withImuAssistAlpha`                                                               |
| **Stream / crop**          | `withStreamMode`, `withCropWindow`, `withKeystone`                                                                        |
| **Thermal management**     | `withThrottle`                                                                                                            |
| **Rewind (LL4)**           | `withRewindEnable`, `rewindCapture`                                                                                       |

## Pipelines are indices, not objects

YALL doesn't model pipelines as objects — a pipeline is just an index (0-9) configured in the Limelight web UI. `withPipelineIndex(n)` switches which pipeline is active; everything about *what that pipeline does* (its type — AprilTag, retroreflective, classifier, detector — its crop, its color thresholds) is configured in the Limelight UI itself, not from robot code. Robot code reacts to whatever the active pipeline produces, via [target types](/documentation/understanding/target-and-pipeline-types.md).

## LED mode vs. pipeline LED behavior

`LEDMode.PipelineControl` (the default recommendation) lets each pipeline decide its own LED behavior, configured per-pipeline in the web UI. The `ForceXXX` modes override every pipeline's LED behavior robot-wide — useful for driver signaling (e.g. force-blink LEDs when a game piece is detected) independent of which pipeline is active.

## See Also

* [Basic Setup tutorial](/documentation/tutorials/basic-setup.md)
* [How do I choose between MegaTag1 and MegaTag2?](/documentation/how-to-guides/how-do-i-choose-megatag1-vs-megatag2.md)
* LimelightSettings reference


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://yall.yassrobotics.com/documentation/understanding/limelight-settings-and-pipelines.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
