> For the complete documentation index, see [llms.txt](https://docs.theseus.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.theseus.us/cyclops/autopilot-integration/optional-improvements/cyclops-safety-switch.md).

# Cyclops Safety Switch

This Lua script allows pilots to enable/disable Cyclops position output to the autopilot using a 2- or 3-position RC switch. When disabled, Cyclops stops sending position updates to the flight controller, allowing the pilot to immediately cut Cyclops input if needed during flight. This acts as a safety cutoff for Cyclops navigation data.

Upload the script below to ArduPilot to enable this functionality:

{% file src="/files/QGxT16I4aA9OK35P9tkz" %}

Inside of your scripts folder on MAVFTP, create a `modules/MAVLink` folder. Upload the scripts contained inside of the zip file below:

{% file src="/files/KXRxuXPYE2SWdCus8I2c" %}

{% hint style="info" %}
Make sure you upload the MAVLink dependency files to enable the cyclops safety switch.
{% endhint %}

### Configuring an RC Switch

Select which switch on your controller you want to use and identify its corresponding RC channel in your mixing model. On your GCS software, set the corresponding RC option to Scripting 5 (value 304). *For example, if your switch is on RC channel 8, set* `RC8_OPTION = 304`*.*

{% hint style="info" %}
To enable this script in ArduPilot, set `SCR_USER3=1` in the Full Parameters List. To prevent the script from running, set this parameter to 0.
{% endhint %}

{% hint style="warning" %}
Note: The script functionality is hardcoded to Scripting 5 (value 304) within the provided Lua script. If you are using multiple Lua scripts on the same flight controller, make sure that those scripts do not use Scripting 5.
{% endhint %}

### Switch Positions

* <mark style="color:$success;">**LOW / MID**</mark><mark style="color:$success;">: Cyclops output enabled (default)</mark>
* <mark style="color:orange;">**HIGH**</mark><mark style="color:orange;">: Cyclops output disabled (safety cutoff)</mark>

### Startup Behavior

On boot, the script reads the current switch position and sends the corresponding enable or disable command to the Cyclops unit. This ensures the Cyclops output state always matches the physical switch position at startup. If the RC channel is not configured, no commands are sent and the Cyclops unit continues operating in its own default state (output enabled).


---

# 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://docs.theseus.us/cyclops/autopilot-integration/optional-improvements/cyclops-safety-switch.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.
