# 全局变量

全局变量是其值在模型的所有配置屏幕中共享的变量。它们的值可以用于权重、偏移、差动、指数设置、输出以及逻辑开关比较。模型设置的 **全局变量** 屏幕显示每个飞行模式的每个全局变量的值。

<figure><img src="/files/3MiFoH9exZtHBIbqBEco" alt=""><figcaption><p>全局变量屏幕</p></figcaption></figure>

从全局变量屏幕中选择一个全局变量将提供以下选项：

* **编辑** - 打开所选全局变量的全局变量配置屏幕。
* **清除** - 清除所选全局变量的所有飞行模式的全局变量值。

<figure><img src="/files/dEMUpGDs3iI5fVPGjhOl" alt=""><figcaption><p>全局变量配置屏幕。</p></figcaption></figure>

全局变量配置屏幕是您为全局变量分配值和其他配置选项的地方。此外，您可以选择如何为每个飞行模式定义全局变量的值 - 要么手动定义值，要么从另一个选定的飞行模式继承。它包含以下配置选项：

* **名称** - 全局变量的名称。允许三个字符。如果留空，将使用默认的 GV# 作为名称。
* **单位** - （可选）允许您在选择时为显示的值添加 **%** 标签。它不影响值的计算方式。
* **精度** - 允许您选择数字精度选项，整数（**0.-**）和小数（**0.0**）。默认值为 **0.-**
* **最小值** - 定义全局变量允许的最小值。
* **最大值** - 定义全局变量允许的最大值。
* **弹出 -** 启用时，当 GV 的值更改为新的 GV 值时，将显示弹出消息（见下图）。
* **FM0** - 飞行模式 0 上的全局变量值。
* **FM1 -> FM8** - 当切换开关启用或禁用时，适用以下情况：
  * 切换开关禁用 - 选定飞行模式的全局变量值从下拉菜单中定义的飞行模式继承。
  * 切换开关启用（高亮） - 选定飞行模式的全局变量值在文本字段中手动定义。

<figure><img src="/files/xetkzEzc6Eulqo5Azeuy" alt=""><figcaption><p>全局变量更改的弹出消息</p></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://zkl2333.gitbook.io/edgetx-user-manual/color-radios/model-settings/global-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
